[vlc-devel] commit: [Qt] Put the extended dialog on the left of the Main Interface by default. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Nov 3 08:41:39 CET 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Oct 23 06:47:22 2008 -0700| [46ff46aba5a5632de15490d659e2353186178704] | committer: Jean-Baptiste Kempf 

[Qt] Put the extended dialog on the left of the Main Interface by default.

Close ticket

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46ff46aba5a5632de15490d659e2353186178704
---

 modules/gui/qt4/dialogs/extended.cpp |   16 +++++++++-------
 modules/gui/qt4/dialogs_provider.cpp |    5 ++---
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/modules/gui/qt4/dialogs/extended.cpp b/modules/gui/qt4/dialogs/extended.cpp
index 476bdc3..a67d0b1 100644
--- a/modules/gui/qt4/dialogs/extended.cpp
+++ b/modules/gui/qt4/dialogs/extended.cpp
@@ -88,17 +88,19 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
     layout->addWidget( closeButton, 1, 4, 1, 1 );
     CONNECT( closeButton, clicked(), this, close() );
 
-    QPoint startPoint( 450, 0 );
-    MainInterface *p_mi = p_intf->p_sys->p_mi;
-    if( p_mi )
+    /* Restore geometry or move this dialog on the left pane of the MI */
+    if( !restoreGeometry(getSettings()->value("EPanel/geometry").toByteArray()))
     {
-        startPoint.setX( p_mi->x() );
-        startPoint.setY( p_mi->y() + p_mi->frameGeometry().height() );
+        resize( QSize( 400, 280 ) );
+        
+        MainInterface *p_mi = p_intf->p_sys->p_mi;
+        if( p_mi )
+            move( ( p_mi->x() - frameGeometry().width() - 10 ), p_mi->y() );
+        else
+            move ( 450 , 0 );
     }
-    readSettings( "EPanel", QSize( 400, 280 ), startPoint );
 
     CONNECT( THEMIM->getIM(), statusChanged( int ), this, changedItem( int ) );
-
 }
 
 ExtendedDialog::~ExtendedDialog()
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index c9f3920..12d05f0 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -427,9 +427,8 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
 
     if (!dir.isEmpty() )
     {
-        QString mrl = dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive )
-            ? "dvd://" : "directory://" + toNativeSeparators( dir );
-        msg_Dbg( p_intf, "Directory opening: %s", qtu( dir ) );
+        QString mrl = dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ?
+            "dvd://" : "directory://" + toNativeSeparators( dir );
         input_item_t *p_input = input_item_NewExt( THEPL, qtu( mrl ),
                               NULL, 0, NULL, -1 );
 




More information about the vlc-devel mailing list