Summary: | finish transfering music before disconecting media devices (iPod) | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Ryan Neufeld <beatryder> |
Component: | Collections/iPod iPhone | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | matej |
Priority: | NOR | ||
Version: | 1.4.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ryan Neufeld
2006-06-23 20:27:51 UTC
SVN commit 566401 by aumuell: sk if transfer to media device should be finished for all queued tracks or should be interrupted after current track when pressing disconnect BUG: 129716 M +2 -2 ChangeLog M +24 -0 src/mediabrowser.cpp M +2 -0 src/mediabrowser.h --- trunk/extragear/multimedia/amarok/ChangeLog #566400:566401 @@ -29,8 +29,8 @@ to iTunes, Firefly Media Server etc. (BR 100513) CHANGES: - * It's now possible to edit scores and ratings for multiple tracks in - TagDialog. + * Optionally finish transferring all queued tracks to media device after + pressing disconnect button. (BR 129716) * TagDialog won't make Amarok unresponsive while committing tags changes to files anymore. * Exact playtime as tooltip in statusbar. Patch by Markus Kaufhold --- trunk/extragear/multimedia/amarok/src/mediabrowser.cpp #566400:566401 @@ -1828,6 +1828,7 @@ , m_transferring( false ) , m_deleting( false ) , m_deferredDisconnect( false ) + , m_scheduledDisconnect( false ) , m_transfer( true ) , m_configure( true ) , m_customButton( false ) @@ -2292,6 +2293,24 @@ void MediaBrowser::disconnectClicked() { + if( currentDevice() && currentDevice()->isTransferring() ) + { + int action = KMessageBox::questionYesNoCancel( MediaBrowser::instance(), + i18n( "Transfer in progress. Finish or stop after current track?" ), + i18n( "Stop Transfer?" ), + KGuiItem(i18n("&Finish"), "goto"), + KGuiItem(i18n("&Stop"), "player_eject") ); + if( action == KMessageBox::Cancel ) + { + return; + } + else if( action == KMessageBox::Yes ) + { + currentDevice()->scheduleDisconnect(); + return; + } + } + m_toolbar->getButton(TRANSFER)->setEnabled( false ); m_toolbar->getButton(DISCONNECT)->setEnabled( false ); @@ -2771,6 +2790,11 @@ m_deferredDisconnect = false; disconnectDevice( m_runDisconnectHook ); } + else if( m_scheduledDisconnect ) + { + disconnectDevice( true ); + } + m_scheduledDisconnect = false; } int --- trunk/extragear/multimedia/amarok/src/mediabrowser.h #566400:566401 @@ -465,6 +465,7 @@ virtual void expandItem( QListViewItem *item ) {(void)item; } bool connectDevice( bool silent=false ); bool disconnectDevice( bool postdisconnecthook=true ); + void scheduleDisconnect() { m_scheduledDisconnect = true; } protected slots: void fileTransferred( KIO::Job *job ); @@ -587,6 +588,7 @@ bool m_transferring; bool m_deleting; bool m_deferredDisconnect; + bool m_scheduledDisconnect; bool m_runDisconnectHook; bool m_spacesToUnderscores; bool m_transfer; |