From kde-commits Fri Aug 26 20:53:04 2005 From: Mike Diehl Date: Fri, 26 Aug 2005 20:53:04 +0000 To: kde-commits Subject: extragear/multimedia/amarok/src Message-Id: <1125089584.793268.30842.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=112508959225204 SVN commit 453695 by mdiehl: Remember mount commands. M +11 -0 amarokcore/amarok.kcfg M +18 -6 mediabrowser.cpp M +1 -0 mediabrowser.h --- trunk/extragear/multimedia/amarok/src/amarokcore/amarok.kcfg #453694:453695 @@ -503,4 +503,15 @@ + + + + The mount command used for the media device connection. + + + + The umount command used for the media device connection. + + + --- trunk/extragear/multimedia/amarok/src/mediabrowser.cpp #453694:453695 @@ -61,6 +61,10 @@ { setSpacing( 4 ); + KToolBar* toolbar = new Browser::ToolBar( this ); + KToolBarButton *config = new KToolBarButton( "configure", 0, toolbar ); + QToolTip::add( config, i18n( "Configure media device" ) ); + { // KToolBar* searchToolBar = new Browser::ToolBar( this ); KToolBarButton *button = new KToolBarButton( "locationbar_erase", 0, searchToolBar ); @@ -77,10 +81,11 @@ m_view = new MediaDeviceView( this ); + connect( config, SIGNAL( clicked() ), MediaDevice::instance(), SLOT( config() ) ); + setFocusProxy( m_view ); //default object to get focus } - MediaBrowser::~MediaBrowser() { delete m_view; @@ -443,8 +448,8 @@ openIPod(); - //m_mntcmd = "mount /mnt/ipod"; - //m_umntcmd = "umount /mnt/ipod"; + m_mntcmd = AmarokConfig::mountCommand(); + m_umntcmd = AmarokConfig::umountCommand(); } void @@ -597,14 +602,21 @@ return items; } +void +MediaDevice::config() +{ +} + void MediaDevice::setMountCommand(const QString & mnt) { - m_mntcmd=mnt; + AmarokConfig::setMountCommand( mnt ); + m_mntcmd = mnt; //Update for mount() } void MediaDevice::setUmountCommand(const QString & umnt) { - m_umntcmd=umnt; + AmarokConfig::setUmountCommand( umnt); + m_umntcmd = umnt; //Update for umount() } int MediaDevice::mount() @@ -697,7 +709,7 @@ else debug() << "iPod inconsistent!" << endl; - m_parent->m_transferButton->setEnabled( true ); + m_parent->m_transferButton->setEnabled( false ); } --- trunk/extragear/multimedia/amarok/src/mediabrowser.h #453694:453695 @@ -137,6 +137,7 @@ static MediaDevice *instance() { return s_instance; } public slots: + void config(); void setMountCommand(const QString & mnt); void setUmountCommand(const QString & umnt); int mount();