[Bug 113913] Image Editor: disable "remove tags" menu item when there are no common tags.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 113913] Image Editor: disable "remove tags" menu item when there are no common tags.

Bugzilla from tomalbers@kde.nl
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=113913         
tomalbers kde nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From tomalbers kde nl  2005-10-23 23:01 -------
SVN commit 473489 by toma:

disable "remove tag" when no tags are available.
BUG: 113913


 M  +7 -2      imagewindow.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/imagewindow.cpp #473488:473489
 @ -134,7 +134,7  @
         }
     }
 
-    m_contextMenu = dynamic_cast<QPopupMenu*>(factory()->container("RMBMenu", this));
+    m_contextMenu = dynamic_cast<QPopupMenu*>(factory()->container("RMBMenu", this));
     
     // -- Some Accels not available from actions -------------
 
 @ -743,13 +743,18  @
                                                    TagsPopupMenu::REMOVE);
 
                 separatorID = m_contextMenu->insertSeparator();
+
                 m_contextMenu->insertItem(i18n("Assign Tag"), assignTagsMenu);
-                m_contextMenu->insertItem(i18n("Remove Tag"), removeTagsMenu);
+                int i = m_contextMenu->insertItem(i18n("Remove Tag"), removeTagsMenu);
 
                 connect(assignTagsMenu, SIGNAL(signalTagActivated(int)),
                         SLOT(slotAssignTag(int)));
                 connect(removeTagsMenu, SIGNAL(signalTagActivated(int)),
                         SLOT(slotRemoveTag(int)));
+
+                AlbumDB* db = AlbumManager::instance()->albumDB();
+                if (!db->hasTags( idList ))
+                    m_contextMenu->setItemEnabled(i,false);
             }
         }
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Loading...