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

List:       kde-commits
Subject:    [kdepim-runtime/KDE/4.7] resources/maildir: When creating a new
From:       Andras Mantia <amantia () kde ! org>
Date:       2011-09-27 6:24:43
Message-ID: 20110927062443.42A84A60C9 () git ! kde ! org
[Download RAW message or body]

Git commit 85245a6a137d8cdfe0ad3f45081d7b48f8e98a8c by Andras Mantia, on behalf of Till Adam.
Committed on 16/09/2011 at 16:44.
Pushed by amantia into branch 'KDE/4.7'.

When creating a new maildir resource, set its name to the folder name.

This looks much nicer than some random resource identifier.

M  +7    -0    resources/maildir/maildirresource.cpp

http://commits.kde.org/kdepim-runtime/85245a6a137d8cdfe0ad3f45081d7b48f8e98a8c

diff --git a/resources/maildir/maildirresource.cpp b/resources/maildir/maildirresource.cpp
index 29392c9..2e99d42 100644
--- a/resources/maildir/maildirresource.cpp
+++ b/resources/maildir/maildirresource.cpp
@@ -169,6 +169,13 @@ void MaildirResource::configure( WId windowId )
   if ( windowId )
     KWindowSystem::setMainWindow( &dlg, windowId );
   if ( dlg.exec() ) {
+      // if we have no name, or the default one,
+      // better use the name of the top level collection
+      // that looks nicer
+      if ( name().isEmpty() || name() == identifier() ) {
+        Maildir md( mSettings->path() );
+        setName( md.name() );
+      }
     emit configurationDialogAccepted();
   } else {
     emit configurationDialogRejected();


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

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