Bug 89358 - delete tag should be disabled when no tag is assigned
Summary: delete tag should be disabled when no tag is assigned
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Engine (show other bugs)
Version: 0.7.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-12 16:16 UTC by Tom Albers
Modified: 2022-01-22 14:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Albers 2004-09-12 16:16:00 UTC
Version:           0.7.0-cvs (using KDE 3.3.0,  (3.1))
Compiler:          gcc version 3.3.4 (Debian 1:3.3.4-7)
OS:                Linux (i686) release 2.6.5-1-k7

In the context menu of the image the option to delete a tag should be disabled or removed when there is no tag assigned to that image.
Comment 1 Renchi Raju 2004-09-12 17:01:50 UTC
CVS commit by pahlibar: 


context specific enabling/disabling of album/tag specific actions in the
menubar
CCMAIL: 89358-done@bugs.kde.org


  M +8 -0      digikamapp.cpp   1.55
  M +1 -0      digikamapp.h   1.21
  M +11 -1     digikamview.cpp   1.17
  M +1 -0      digikamview.h   1.11


--- kdeextragear-3/digikam/digikam/digikamapp.cpp  #1.54:1.55
@@ -153,4 +153,6 @@ void DigikamApp::setupView()
     connect(mView, SIGNAL(signal_albumSelected(bool)),
             this, SLOT(slot_albumSelected(bool)));
+    connect(mView, SIGNAL(signal_tagSelected(bool)),
+            this, SLOT(slot_tagSelected(bool)));
             
     connect(mView, SIGNAL(signal_imageSelected(bool)),
@@ -480,4 +482,10 @@ void DigikamApp::slot_albumSelected(bool
 }
 
+void DigikamApp::slot_tagSelected(bool val)
+{
+    mDeleteTagAction->setEnabled(val);
+    mEditTagAction->setEnabled(val);
+}
+
 void DigikamApp::slot_imageSelected(bool val)
 {

--- kdeextragear-3/digikam/digikam/digikamapp.h  #1.20:1.21
@@ -175,4 +175,5 @@ private slots:
 
     void slot_albumSelected(bool val);
+    void slot_tagSelected(bool val);
     void slot_imageSelected(bool val);
     void slot_exit();

--- kdeextragear-3/digikam/digikam/digikamview.cpp  #1.16:1.17
@@ -169,8 +169,18 @@ void DigikamView::slot_albumSelected(Alb
         mIconView->setAlbum(0);
         emit signal_albumSelected(false);
+        emit signal_tagSelected(false);
         return;
     }
 
+    if (album->type() == Album::PHYSICAL)
+    {
     emit signal_albumSelected(true);
+        emit signal_tagSelected(false);
+    }
+    else if (album->type() == Album::TAG)
+    {
+        emit signal_albumSelected(false);
+        emit signal_tagSelected(true);
+    }
     mIconView->setAlbum(album);
 }

--- kdeextragear-3/digikam/digikam/digikamview.h  #1.10:1.11
@@ -115,4 +115,5 @@ signals:
 
     void signal_albumSelected(bool val);
+    void signal_tagSelected(bool val);
     void signal_imageSelected(bool val);
 };