[Digikam-devel] [Bug 91812] wishlist: viewer/editor for IPTC meta data

Gilles Caulier caulier.gilles at free.fr
Sun Oct 22 09:08:19 BST 2006


------- 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=91812         
caulier.gilles free fr changed:

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



------- Additional Comments From caulier.gilles free fr  2006-10-22 10:08 -------
SVN commit 597975 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : Finalize plugin

BUG: 91812, 103255

 M  +17 -14    metadataitem.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/metadataitem.cpp #597974:597975
 @ -44,15 +44,17  @
 
     MetadataItemPriv()
     {
-        enabled    = false;
-        dirty      = false;
-        eraseExif  = false;
-        eraseIptc  = false;
-        readOnly   = false;
+        enabled   = false;
+        dirtyExif = false;
+        dirtyIptc = false;
+        eraseExif = false;
+        eraseIptc = false;
+        readOnly  = false;
     }
 
     bool       enabled;
-    bool       dirty;
+    bool       dirtyExif;
+    bool       dirtyIptc;
     bool       eraseExif;
     bool       eraseIptc;
     bool       readOnly;
 @ -103,7 +105,7  @
 void MetadataItem::setExif(const QByteArray& exifData, bool dirty)
 {
     setEnabled(true);
-    d->dirty     = dirty;
+    d->dirtyExif = dirty;
     d->exifData  = exifData;
     d->eraseIptc = false;
     setText(2, hasExif() ? i18n("Yes") : i18n("No"));
 @ -113,7 +115,7  @
 void MetadataItem::setIptc(const QByteArray& iptcData, bool dirty)
 {
     setEnabled(true);
-    d->dirty     = dirty;
+    d->dirtyIptc = dirty;
     d->iptcData  = iptcData;
     d->eraseIptc = false;
     setText(3, hasIptc() ? i18n("Yes") : i18n("No"));
 @ -135,7 +137,7  @
     if (!isReadOnly())
     {
         d->eraseExif = true;
-        d->dirty     = true;
+        d->dirtyExif = true;
         setText(2, i18n("Removed!"));
         setText(4, i18n("Dirty!"));
         repaint();
 @ -147,7 +149,7  @
     if (!isReadOnly())
     {
         d->eraseIptc = true;
-        d->dirty     = true;
+        d->dirtyIptc = true;
         setText(3, i18n("Removed!"));
         setText(4, i18n("Dirty!"));
         repaint();
 @ -181,7 +183,7  @
         {
             ret &= exiv2Iface.clearExif();
         }
-        else
+        else if (d->dirtyExif)
         {
             ret &= exiv2Iface.setExif(d->exifData);
         }
 @ -190,7 +192,7  @
         {
             ret &= exiv2Iface.clearIptc();
         }
-        else
+        else if (d->dirtyIptc)
         {
             ret &= exiv2Iface.setIptc(d->iptcData);
         }
 @ -202,7 +204,8  @
         else
             setPixmap(1, SmallIcon("cancel"));
 	
-	    d->dirty = false;
+        d->dirtyExif = false;
+        d->dirtyIptc = false;
     }
 }
 
 @ -219,7 +222,7  @
 
 bool MetadataItem::isDirty()    
 {
-    return d->dirty;
+    return (d->dirtyExif || d->dirtyIptc);
 }
 
 bool MetadataItem::isReadOnly()



More information about the Digikam-devel mailing list