Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: ShowReplayMode bug (was Re: Video Disk Recorder version 0.97)



Stefan Huelswitt wrote:
> 
> On 27 Oct 2001 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
> 
> > I was hoping to keep the interface of Hide() clean from this,
> > but apparently we do need this. However, I made another attempt to
> > keep the impact low, by inverting the condition:
> >
> > --- menu.c      2001/10/27 13:47:12     1.134
> > +++ menu.c      2001/10/27 15:38:33
> [...]
> 
> I think you missed one when closing the OSD after a
> TimeSearch ...
> 
> But what about this solution to keep Hide() interface clean (not
> tested, vdr is currently recording):
> 
> --- VDR-0.97-orig/menu.c        Sun Oct 21 16:28:14 2001
> +++ VDR-0.97-osd-fix2/menu.c    Sat Oct 27 20:22:55 2001
> @@ -2418,10 +2418,7 @@
>    if (visible) {
>       Interface->Close();
>       needsFastResponse = visible = false;
> -     if (!modeOnly)
> -        ShowMode();
> -     else
> -        modeOnly = false;
> +     modeOnly = false;
>       }
>  }
> 
> @@ -2673,6 +2670,7 @@
>       }
>    else
>       Interface->Error(tr("Editing process already active!"));
> +  ShowMode();
>  }
> 
>  void cReplayControl::EditTest(void)
> @@ -2699,7 +2697,7 @@
>       return osEnd;
>    if (visible) {
>       if (timeoutShow && time(NULL) > timeoutShow) {
> -        Hide();
> +        Hide(); ShowMode();
>          timeoutShow = 0;
>          }
>       else if (!modeOnly)
> @@ -2749,8 +2747,9 @@
>            switch (Key) {
>              // Menu control:
>              case kMenu:    Hide(); return osMenu; // allow direct switching to menu
> -            case kOk:      if (visible && !modeOnly)
> -                              Hide();
> +            case kOk:      if (visible && !modeOnly) {
> +                              Hide(); DoShowMode = true;
> +                              }
>                             else
>                                Show();
>                             break;
> 
> --

YES! I like that!
Especially because it takes the side effects out of Hide().

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index