Bug 113913

Summary: Image Editor: disable "remove tags" menu item when there are no common tags.
Product: [Applications] digikam Reporter: Tung NGUYEN <ntung>
Component: Usability-MenusAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 0.8.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 8.4.0
Sentry Crash Report:

Description Tung NGUYEN 2005-10-05 21:35:01 UTC
Version:           0.8.0-beta2 (using KDE KDE 3.4.2)
Installed from:    Compiled From Sources
OS:                Linux

For menu coherence, is it possible to apply the fixed report http://bugs.kde.org/show_bug.cgi?id=111798 to the image contextual menu in the DigiKam Image Editor (where "remove tags" remains always enabled) ?
Comment 1 Tom Albers 2005-10-23 23:01:46 UTC
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);
             }
         }
         
Comment 2 Tung NGUYEN 2005-10-24 01:34:26 UTC
Tom, thank you for the fix.
Comment 3 Tom Albers 2005-10-24 10:11:32 UTC
Thank you for your excellent reports! Keep up the good work.
Comment 4 Joern Ahrens 2005-10-24 17:46:45 UTC
Yes, indeed!!
Comment 5 caulier.gilles 2005-10-24 20:38:35 UTC
and me, i propose to add Tung like digiKam bug reporter in about dialog. Are you agree ?

Gilles
Comment 6 Joern Ahrens 2005-10-24 20:51:50 UTC
Yes, I fully agree.
Welcome to the team.

Index: digikam/main.cpp
===================================================================
--- digikam/main.cpp    (revision 471774)
+++ digikam/main.cpp    (working copy)
@@ -191,6 +191,12 @@
                           "yves dot chaufour at wanadoo.fr",
                           0);

+    aboutData.addCredit ( "Tung Nguyen",
+                          I18N_NOOP("Bug reports and Feedback"),
+                          "ntung at free.fr",
+                          0);
+
+
     KCmdLineArgs::init( argc, argv, &aboutData );
     KCmdLineArgs::addCmdLineOptions( options );


Comment 7 Tung NGUYEN 2005-10-24 21:12:29 UTC
Gilles, Joern, Tom,

once again thank you :-)