]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/vlm.cpp
Rework a bit the OpenDialog calls in order to fix the double-click issue when transco...
[vlc] / modules / gui / qt4 / dialogs / vlm.cpp
index 607dc16a7e2d25c3056539eebd6cae0013505956..12ad9bf4e4411750dd8266dee0557cd307bea3e4 100644 (file)
@@ -80,9 +80,9 @@ VLMDialog::VLMDialog( QWidget *parent, intf_thread_t *_p_intf ) : QVLCDialog( pa
 
     /* Schedule Stuffs */
     QGridLayout *schetimelayout = new QGridLayout( ui.schedBox );
-    QLabel *schetimelabel = new QLabel( qtr( "Hours/Minutes/Seconds:" ) );
+    QLabel *schetimelabel = new QLabel( qtr( "Hours / Minutes / Seconds:" ) );
     schetimelayout->addWidget( schetimelabel, 0, 0 );
-    QLabel *schedatelabel = new QLabel( qtr( "Day Month Year:" ) );
+    QLabel *schedatelabel = new QLabel( qtr( "Day / Month / Year:" ) );
     schetimelayout->addWidget( schedatelabel, 1, 0 );
     QLabel *scherepeatLabel = new QLabel( qtr( "Repeat:" ) );
     schetimelayout->addWidget( scherepeatLabel, 2, 0 );
@@ -130,13 +130,13 @@ VLMDialog::VLMDialog( QWidget *parent, intf_thread_t *_p_intf ) : QVLCDialog( pa
         new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
     vlmItemLayout->addItem( spacer );
 
-    QPushButton *importButton = new QPushButton( qtr(  "Import" ) );
+    QPushButton *importButton = new QPushButton( qtr( "Import" ) );
     ui.buttonBox->addButton( importButton, QDialogButtonBox::ActionRole );
 
     QPushButton *exportButton = new QPushButton( qtr( "Export" ) );
     ui.buttonBox->addButton( exportButton, QDialogButtonBox::ActionRole );
 
-    QPushButton *closeButton = new QPushButton( qtr( "Close" ) );
+    QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
     ui.buttonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
 
 
@@ -162,7 +162,6 @@ VLMDialog::VLMDialog( QWidget *parent, intf_thread_t *_p_intf ) : QVLCDialog( pa
 
 VLMDialog::~VLMDialog()
 {
-    msg_Dbg( p_intf, "Destroying VLM Dialog" );
     delete vlmWrapper;
 
    /* FIXME :you have to destroy vlm here to close
@@ -204,7 +203,7 @@ void VLMDialog::addVLMItem()
     QString name = ui.nameLedit->text();
     if( name.isEmpty() || !isNameGenuine( name ) )
     {
-        msg_Dbg( p_intf, "VLM Name is empty or already exists, I can't do it" );
+        msg_Err( p_intf, "VLM Name is empty or already exists, I can't do it" );
         return;
     }
 
@@ -265,7 +264,7 @@ bool VLMDialog::exportVLMConf()
 {
     QString saveVLMConfFileName = QFileDialog::getSaveFileName(
             this, qtr( "Choose a filename to save the VLM configuration..." ),
-            qfu( p_intf->p_libvlc->psz_homedir ),
+            qfu( config_GetHomeDir() ),
             qtr( "VLM conf (*.vlm) ;; All (*.*)" ) );
 
     if( !saveVLMConfFileName.isEmpty() )
@@ -334,8 +333,8 @@ void VLMDialog::mediasPopulator()
 bool VLMDialog::importVLMConf()
 {
     QString openVLMConfFileName = QFileDialog::getOpenFileName(
-            this, qtr( "Choose a VLM configuration file to open..." ),
-            qfu( p_intf->p_libvlc->psz_homedir ),
+            this, qtr( "Open a VLM Configuration File" ),
+            qfu( config_GetHomeDir() ),
             qtr( "VLM conf (*.vlm) ;; All (*.*)" ) );
 
     if( !openVLMConfFileName.isEmpty() )
@@ -351,7 +350,7 @@ bool VLMDialog::importVLMConf()
         }
         else
         {
-            msg_Dbg( p_intf, "Failed to import vlm configuration file : %s", qtu( command ) );
+            msg_Warn( p_intf, "Failed to import vlm configuration file : %s", qtu( command ) );
             return false;
         }
         return true;
@@ -376,7 +375,7 @@ void VLMDialog::clearWidgets()
 
 void VLMDialog::selectInput()
 {
-    OpenDialog *o = OpenDialog::getInstance( this, p_intf, SELECT, true );
+    OpenDialog *o = OpenDialog::getInstance( this, p_intf, false, SELECT, true );
     o->exec();
     ui.inputLedit->setText( o->getMRL() );
 }
@@ -405,7 +404,6 @@ void VLMDialog::startModifyVLMItem( VLMAWidget *vlmObj )
     currentIndex = vlmItems.indexOf( vlmObj );
     if( currentIndex < 0 ) return;
 
-    msg_Dbg( p_intf, "Type: %i", vlmObj->type );
     ui.vlmListItem->setCurrentRow( currentIndex );
     ui.nameLedit->setText( vlmObj->name );
     ui.inputLedit->setText( vlmObj->input );