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

List:       kde-commits
Subject:    [kdepim/akregator_port] akregator2/src: Disable 'New Feed' action if AllowSubfolders property is fal
From:       Dan_Vrátil <dvratil () redhat ! com>
Date:       2013-03-02 22:23:05
Message-ID: 20130302222305.730BCA60C6 () git ! kde ! org
[Download RAW message or body]

Git commit 41008b95441fcadc936a633a98db4ac727204aea by Dan Vrátil.
Committed on 02/03/2013 at 23:22.
Pushed by dvratil into branch 'akregator_port'.

Disable 'New Feed' action if AllowSubfolders property is false

The Google Reader and OwnCloud RSS resources don't support
more than one level of subfolders. The resource can set the
AllowSubfolder property to false to disable this feature in
Akregator2 UI.

M  +4    -0    akregator2/src/actionmanagerimpl.cpp

http://commits.kde.org/kdepim/41008b95441fcadc936a633a98db4ac727204aea

diff --git a/akregator2/src/actionmanagerimpl.cpp b/akregator2/src/actionmanagerimpl.cpp
index a2ff5fc..589eab5 100644
--- a/akregator2/src/actionmanagerimpl.cpp
+++ b/akregator2/src/actionmanagerimpl.cpp
@@ -119,6 +119,10 @@ void ActionManagerImpl::slotNodeSelected( const Akonadi::Collection& c )
         QAction* hp = action("feed_homepage");
         if (hp)
             hp->setEnabled(false);
+        QAction *newFolder = action("folder_add");
+        if (newFolder) {
+            newFolder->setEnabled( fc.allowSubfolders() );
+        }
 
         action("feed_fetch")->setText(i18n("&Fetch Feeds"));
         action("feed_mark_feed_as_read")->setText(i18n("&Mark Feeds as Read"));
[prev in list] [next in list] [prev in thread] [next in thread] 

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