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:
> 
> > ---
> >  menu.c      2001/10/21 14:28:14     1.131
> > +++ menu.c      2001/10/27 10:20:04
> > @@ -2365,6 +2365,8 @@
> >  cReplayControl::~cReplayControl()
> >  {
> >    Hide();
> > +  if (Setup.ShowReplayMode)
> > +     Hide(); // the initial Hide() may have reopened the small mode display window
> >    dvbApi->StopReplay();
> >  }
> 
> I think this doesn't fixes the problem if you starts cutting
> process or if you opens main menu when the progress bar (big
> window) is open. In this case the destructor is not called.
> And what about the blue key?

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
@@ -2419,12 +2417,12 @@
      }
 }

-void cReplayControl::Hide(void)
+void cReplayControl::Hide(bool KeepMode)
 {
   if (visible) {
      Interface->Close();
      needsFastResponse = visible = false;
-     if (!modeOnly)
+     if (!modeOnly && KeepMode)
         ShowMode();
      else
         modeOnly = false;
@@ -2707,7 +2705,7 @@
      return osEnd;
   if (visible) {
      if (timeoutShow && time(NULL) > timeoutShow) {
-        Hide();
+        Hide(true);
         timeoutShow = 0;
         }
      else if (!modeOnly)
@@ -2758,7 +2756,7 @@
             // Menu control:
             case kMenu:    Hide(); return osMenu; // allow direct switching to menu
             case kOk:      if (visible && !modeOnly)
-                              Hide();
+                              Hide(true);
                            else
                               Show();
                            break;
--- menu.h      2001/10/21 14:26:01     1.33
+++ menu.h      2001/10/27 15:37:36
@@ -110,7 +110,7 @@
   void TimeSearchProcess(eKeys Key);
   void TimeSearch(void);
   void Show(int Seconds = 0);
-  void Hide(void);
+  void Hide(bool KeepMode = false);
   static char *fileName;
 #ifdef DVDSUPPORT
   static cDVD *dvd;//XXX member really necessary???


The line numbers may not correspond directly to the original version 0.97,
because in the meantime I have made some other changes. But from what I have
seen it behaves correctly now in all cases (unless you can point out another one ;-)

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