[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Mike Diehl <madpenguin8 () yahoo ! com>
Date:       2005-08-27 1:15:43
Message-ID: 1125105343.072360.8024.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 453758 by mdiehl:

Add dialog to configure (u)mount commands. This makes (u)mounting via the connect button functional.

BUG:111012


 M  +19 -1     mediabrowser.cpp  


--- trunk/extragear/multimedia/amarok/src/mediabrowser.cpp #453757:453758
@@ -16,6 +16,7 @@
 #include "mediabrowser.h"
 
 #include <qdatetime.h>
+#include <qgroupbox.h>
 #include <qimage.h>
 #include <qlabel.h>
 #include <qpainter.h>
@@ -605,6 +606,23 @@
 void
 MediaDevice::config()
 {
+    KDialogBase dialog( m_parent, 0, false );
+    kapp->setTopWidget( &dialog );
+    dialog.setCaption( kapp->makeStdCaption( i18n("Configure Media Device") ) );
+    dialog.showButtonApply( false );
+    QVBox *box = dialog.makeVBoxMainWidget();
+    QLabel *mntLabel = new QLabel( box );
+    mntLabel->setText( i18n ( "Mount Command:" ) );
+    QLineEdit *mntcmd = new QLineEdit( m_mntcmd, box );
+    QLabel *umntLabel = new QLabel( box );
+    umntLabel->setText( i18n ( "Unmount Command:" ) );
+    QLineEdit *umntcmd = new QLineEdit( m_umntcmd, box );
+
+       if ( dialog.exec() != QDialog::Rejected )
+    {
+        setMountCommand( mntcmd->text() );
+        setUmountCommand( umntcmd->text() );
+    }
 }
 
 void MediaDevice::setMountCommand(const QString & mnt)
@@ -615,7 +633,7 @@
 
 void MediaDevice::setUmountCommand(const QString & umnt)
 {
-    AmarokConfig::setUmountCommand( umnt);
+    AmarokConfig::setUmountCommand( umnt );
     m_umntcmd = umnt;        //Update for umount()
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic