]> git.sesse.net Git - vlc/commitdiff
Qt4 - Save Message Dialog position and Size on quit. use it on load. Ref #1374
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 8 Feb 2008 08:36:43 +0000 (08:36 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 8 Feb 2008 08:36:43 +0000 (08:36 +0000)
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs_provider.cpp

index b288ce8ada81c9185712ba4dee7cf17761d938aa..34b14a0c9a631e4d9bce793e4dd470012170479a 100644 (file)
@@ -74,10 +74,8 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) :  QVLCFrame( _p_intf )
     BUTTONACT( clearButton, clear() );
     BUTTONACT( saveLogButton, save() );
     ON_TIMEOUT( updateLog() );
-}
 
-MessagesDialog::~MessagesDialog()
-{
+    readSettings( "Messages" );
 }
 
 void MessagesDialog::updateLog()
index a25ddbf9cbf4084f2dbc2350110c33d752f28c74..375248ec8285da245e75ea8594ffc3e8ee791250 100644 (file)
@@ -42,7 +42,13 @@ public:
             instance = new MessagesDialog( p_intf );
         return instance;
     }
-    virtual ~MessagesDialog();
+    static void killInstance()
+    {
+        if( instance ) delete instance;
+        instance = NULL;
+    }
+
+    virtual ~MessagesDialog(){ writeSettings( "messages" ); };
 
 private:
     MessagesDialog( intf_thread_t * );
index b636742bc805577918cbca5873bb29d71e1de549..16b08db0c25ec2c76c92b795fafb43106c2031a7 100644 (file)
@@ -72,8 +72,10 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
 
 DialogsProvider::~DialogsProvider()
 {
+    msg_Dbg( p_intf, "Destroying the Dialog Provider" );
     PlaylistDialog::killInstance();
     MediaInfoDialog::killInstance();
+    MessagesDialog::killInstance();
     fixed_timer->stop();
 }