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

List:       kde-multimedia
Subject:    [PATCH] juk: set directory mode for the music folder dialog of file
From:       Γι <ge
Date:       2011-04-19 19:49:09
Message-ID: BANLkTimpAWo5_8=VKkFJKwziv1TSoAU4ew () mail ! gmail ! com
[Download RAW message or body]

(Please tell me if this is the wrong mailing list to submit patches
for kdemultimedia applications)

Hi all,

I have written the attached patch for juk, concerning the "Music
Folder" selection in the File Renamer settings. I believe it should be
set to directory mode (KFile::Directory), instead of the default file
mode.

Regards,

-- 
Γιώργος Κυλάφας (Giorgos Kylafas)
http://en.wikipedia.org/wiki/Posting_style#Inline_replying

["directory-mode.patch" (text/x-diff)]

commit 3d3b0e83faad99b73424a85723092ad6277481d2
Author: Γιώργος Κυλάφας (Giorgos Kylafas) <gekylafas@gmail.com>
Date:   Tue Apr 19 22:23:17 2011 +0300

    juk: set directory mode for the music folder dialog of file renamer.
    
    Also, remove a compilation warning by replacing deprecated setPath()
    with setUrl().
---
 juk/filerenamer.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/juk/filerenamer.cpp b/juk/filerenamer.cpp
index 09aeffb..1e0ecc8 100644
--- a/juk/filerenamer.cpp
+++ b/juk/filerenamer.cpp
@@ -274,7 +274,10 @@ void FileRenamerWidget::loadConfig()
     }
 
     QString path = config.readEntry("MusicFolder", "${HOME}/music");
-    m_ui->m_musicFolder->setPath(path);
+    m_ui->m_musicFolder->setUrl(KUrl(path));
+    m_ui->m_musicFolder->setMode(KFile::Directory |
+                                 KFile::ExistingOnly |
+                                 KFile::LocalOnly);
 
     m_ui->m_separator->setEditText(config.readEntry("Separator", " - "));
 }


_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


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

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