Bug 231092 - Amarok Play media dialog not remember last path
Summary: Amarok Play media dialog not remember last path
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.3.0
Platform: Gentoo Packages Unspecified
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 13:16 UTC by Fest
Modified: 2010-06-03 16:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.3.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fest 2010-03-17 13:16:26 UTC
Version:            (using KDE 4.4.1)
Installed from:    Gentoo Packages

When adding media to Amarok playlist by Play media (ctrl+o) it's not remember last used path. It's always opening home directory.

As far as i know, other KDE applications remember last used folder, so i presume it's bug, not wishlist.
Comment 1 Myriam Schweingruber 2010-03-17 13:53:15 UTC
And which exact Amarok version are you talking about?
Comment 2 Fest 2010-03-17 13:56:54 UTC
Sorry. Amarok 2.3.0.
Comment 3 Myriam Schweingruber 2010-03-17 14:20:43 UTC
Thank you for the feedback. I am just curious: didn't you see the version field when you reported the bug? Apparently a lot of people don't set the version.
Comment 4 Fest 2010-03-17 14:37:57 UTC
I'm sorry, my bad. Didn't saw that field and forgot to mention inside bug report.

By the way, i checked bug report wizard now, to find that field. It's blurred out by find field and looks like another search field - maybe better to add this field in "General Information" page and make it like KDE version menu ? Create wish report ?
Comment 5 Myriam Schweingruber 2010-03-17 19:45:42 UTC
That would be indeed an idea, since the field is easily missed. But AFAIK there already is a bug report for that.
Back to Amarok :)
Comment 6 Mark Kretschmann 2010-06-03 15:56:38 UTC
commit cb10244db2f377b96fefb7751d0448d234a06fd4
Author: Mark Kretschmann <kretschmann@kde.org>
Date:   Thu Jun 3 15:52:10 2010 +0200

    Remember last directory in "Play Media" dialog.
    
    BUG: 231092

diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 2600d9d..7387e96 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -616,15 +616,23 @@ MainWindow::slotPlayMedia() //SLOT
 void
 MainWindow::slotAddLocation( bool directPlay ) //SLOT
 {
+    static KUrl lastDirectory;
+
     // open a file selector to add media to the playlist
     KUrl::List files;
     KFileDialog dlg( KUrl(QDesktopServices::storageLocation(QDesktopServices::MusicLocation)), QString("*.*|"), this );
+
+    if( !lastDirectory.isEmpty() )
+        dlg.setUrl( lastDirectory );
+
     dlg.setCaption( directPlay ? i18n("Play Media (Files or URLs)") : i18n("Add Media (Files or URLs)") );
     dlg.setMode( KFile::Files | KFile::Directory );
     dlg.setObjectName( "PlayMedia" );
     dlg.exec();
     files = dlg.selectedUrls();
 
+    lastDirectory = dlg.baseUrl();
+
     if( files.isEmpty() )
         return;