SVN commit 908159 by cgilles:
digiKam from trunk : - added new option to Metadata settings panel to enable/disable file time stamp updating when metadata are saved. - fix internal Metadata hub accordingly. - add new rule in digiKam kipi-interface to share this settings with kipi-plugins. Note: to use this option, you need libkexiv2 from trunk (KDE 4.3). digiKam still compilable with libkexiv2 for KDE 4.2 but option is not available in gui. CCMAIL: [hidden email] M +14 -0 digikam/albumsettings.cpp M +3 -0 digikam/albumsettings.h M +27 -21 digikam/metadatahub.cpp M +3 -2 digikam/metadatahub.h M +5 -1 utilities/kipiiface/kipiinterface.cpp M +17 -1 utilities/setup/setupmetadata.cpp M +1 -1 utilities/setup/setupmetadata.h --- trunk/extragear/graphics/digikam/digikam/albumsettings.cpp #908158:908159 @@ -125,6 +125,7 @@ bool saveRating; bool writeRawFiles; + bool updateFileTimeStamp; // preview settings bool previewLoadFullImageSize; @@ -264,6 +265,7 @@ d->saveRating = false; d->writeRawFiles = false; + d->updateFileTimeStamp = false; d->previewLoadFullImageSize = false; d->showThumbbar = true; @@ -379,6 +381,7 @@ d->copyright = group.readEntry("Copyright", QString()); d->writeRawFiles = group.readEntry("Write RAW Files", false); + d->updateFileTimeStamp = group.readEntry("Update File Timestamp", false); // --------------------------------------------------------------------- @@ -479,6 +482,7 @@ group.writeEntry("Copyright", d->copyright); group.writeEntry("Write RAW Files", d->writeRawFiles); + group.writeEntry("Update File Timestamp", d->updateFileTimeStamp); // --------------------------------------------------------------------- @@ -845,6 +849,16 @@ return d->writeRawFiles; } +void AlbumSettings::setUpdateFileTimeStamp(bool val) +{ + d->updateFileTimeStamp = val; +} + +bool AlbumSettings::getUpdateFileTimeStamp() const +{ + return d->updateFileTimeStamp; +} + void AlbumSettings::setAuthor(const QString& author) { d->author = author; --- trunk/extragear/graphics/digikam/digikam/albumsettings.h #908158:908159 @@ -175,6 +175,9 @@ void setWriteRawFiles(bool val); bool getWriteRawFiles() const; + void setUpdateFileTimeStamp(bool val); + bool getUpdateFileTimeStamp() const; + void setAuthor(const QString& author); QString getAuthor() const; --- trunk/extragear/graphics/digikam/digikam/metadatahub.cpp #908158:908159 @@ -6,8 +6,8 @@ * Date : 2007-01-05 * Description : Metadata handling * - * Copyright (C) 2007-2008 by Marcel Wiesweg <[hidden email]> - * Copyright (C) 2007-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright (C) 2007-2009 by Marcel Wiesweg <[hidden email]> + * Copyright (C) 2007-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> * * This program is free software you can redistribute it * and/or modify it under the terms of the GNU General @@ -95,30 +95,32 @@ MetadataWriteSettings::MetadataWriteSettings() { - saveComments = false; - saveDateTime = false; - saveRating = false; - saveTags = false; - savePhotographerId = false; - saveCredits = false; - writeRawFiles = false; + saveComments = false; + saveDateTime = false; + saveRating = false; + saveTags = false; + savePhotographerId = false; + saveCredits = false; + writeRawFiles = false; + updateFileTimeStamp = false; } MetadataWriteSettings::MetadataWriteSettings(AlbumSettings *albumSettings) { - saveComments = albumSettings->getSaveComments(); - saveDateTime = albumSettings->getSaveDateTime(); - saveRating = albumSettings->getSaveRating(); - saveTags = albumSettings->getSaveTags(); - savePhotographerId = albumSettings->getSavePhotographerId(); - saveCredits = albumSettings->getSaveCredits(); - writeRawFiles = albumSettings->getWriteRawFiles(); + saveComments = albumSettings->getSaveComments(); + saveDateTime = albumSettings->getSaveDateTime(); + saveRating = albumSettings->getSaveRating(); + saveTags = albumSettings->getSaveTags(); + savePhotographerId = albumSettings->getSavePhotographerId(); + saveCredits = albumSettings->getSaveCredits(); + writeRawFiles = albumSettings->getWriteRawFiles(); + updateFileTimeStamp = albumSettings->getUpdateFileTimeStamp(); - Author = albumSettings->getAuthor(); - AuthorTitle = albumSettings->getAuthorTitle(); - Credit = albumSettings->getCredit(); - Source = albumSettings->getSource(); - Copyright = albumSettings->getCopyright(); + Author = albumSettings->getAuthor(); + AuthorTitle = albumSettings->getAuthorTitle(); + Credit = albumSettings->getCredit(); + Source = albumSettings->getSource(); + Copyright = albumSettings->getCopyright(); } MetadataHub::MetadataHub(DatabaseMode dbmode) @@ -476,6 +478,10 @@ metadata.setWriteRawFiles(settings.writeRawFiles); +#if KEXIV2_VERSION >= 0x000600 + metadata.setUpdateFileTimestamp(settings.updateFileTimeStamp); +#endif + // find out in advance if we have something to write - needed for FullWriteIfChanged mode bool saveComment = (settings.saveComments && d->commentStatus == MetadataAvailable); bool saveDateTime = (settings.saveDateTime && d->dateTimeStatus == MetadataAvailable); --- trunk/extragear/graphics/digikam/digikam/metadatahub.h #908158:908159 @@ -6,8 +6,8 @@ * Date : 2007-01-05 * Description : Metadata handling * - * Copyright (C) 2007-2008 by Marcel Wiesweg <[hidden email]> - * Copyright (C) 2007-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright (C) 2007-2009 by Marcel Wiesweg <[hidden email]> + * Copyright (C) 2007-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -76,6 +76,7 @@ bool savePhotographerId; bool saveCredits; bool writeRawFiles; + bool updateFileTimeStamp; QString Author; QString AuthorTitle; --- trunk/extragear/graphics/digikam/utilities/kipiiface/kipiinterface.cpp #908158:908159 @@ -273,8 +273,12 @@ #if KIPI_VERSION >= 0x000300 QVariant KipiInterface::hostSetting(const QString& settingName) { - if (settingName == QString("WriteMetadataToRAW")) + if (settingName == QString("WriteMetadataUpdateFiletimeStamp")) { + return (AlbumSettings::instance()->getUpdateFileTimeStamp()); + } + else if (settingName == QString("WriteMetadataToRAW")) + { return (AlbumSettings::instance()->getWriteRawFiles()); } else if (settingName == QString("FileExtensions")) --- trunk/extragear/graphics/digikam/utilities/setup/setupmetadata.cpp #908158:908159 @@ -7,7 +7,7 @@ * Description : setup Metadata tab. * * Copyright (C) 2003-2004 by Ralf Holzer <ralf at well.com> - * Copyright (C) 2003-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright (C) 2003-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -47,6 +47,7 @@ // Libkexiv2 includes. +#include <libkexiv2/version.h> #include <libkexiv2/kexiv2.h> // Local includes. @@ -72,6 +73,7 @@ savePhotographerIdBox = 0; saveCreditsBox = 0; writeRawFilesBox = 0; + updateFileTimeStampBox = 0; } bool ExifAutoRotateAsChanged; @@ -86,6 +88,7 @@ QCheckBox *savePhotographerIdBox; QCheckBox *saveCreditsBox; QCheckBox *writeRawFilesBox; + QCheckBox *updateFileTimeStampBox; }; SetupMetadata::SetupMetadata(QWidget* parent ) @@ -154,6 +157,16 @@ "experimental, and disabled by default.")); d->writeRawFilesBox->setEnabled(KExiv2Iface::KExiv2::supportMetadataWritting("image/x-raw")); + d->updateFileTimeStampBox = new QCheckBox(commonGroup); + d->updateFileTimeStampBox->setText(i18n("&Update file timestamp when Metadata are saved")); + d->updateFileTimeStampBox->setWhatsThis( i18n("Turn on this option to update file timestamp when metadata are saved.")); + +#if KEXIV2_VERSION >= 0x000600 + d->updateFileTimeStampBox->show(); +#else + d->updateFileTimeStampBox->hide(); +#endif + gLayout2->addWidget(d->saveTagsBox); gLayout2->addWidget(d->savePhotographerIdBox); gLayout2->addWidget(d->saveCreditsBox); @@ -161,6 +174,7 @@ gLayout2->addWidget(d->saveDateTimeBox); gLayout2->addWidget(d->saveRatingBox); gLayout2->addWidget(d->writeRawFilesBox); + gLayout2->addWidget(d->updateFileTimeStampBox); gLayout2->setMargin(KDialog::spacingHint()); gLayout2->setSpacing(0); @@ -249,6 +263,7 @@ settings->setSavePhotographerId(d->savePhotographerIdBox->isChecked()); settings->setSaveCredits(d->saveCreditsBox->isChecked()); settings->setWriteRawFiles(d->writeRawFilesBox->isChecked()); + settings->setUpdateFileTimeStamp(d->updateFileTimeStampBox->isChecked()); settings->saveSettings(); } @@ -267,6 +282,7 @@ d->savePhotographerIdBox->setChecked(settings->getSavePhotographerId()); d->saveCreditsBox->setChecked(settings->getSaveCredits()); d->writeRawFilesBox->setChecked(settings->getWriteRawFiles()); + d->updateFileTimeStampBox->setChecked(settings->getUpdateFileTimeStamp()); } bool SetupMetadata::exifAutoRotateAsChanged() --- trunk/extragear/graphics/digikam/utilities/setup/setupmetadata.h #908158:908159 @@ -7,7 +7,7 @@ * Description : setup Metadata tab. * * Copyright (C) 2003-2004 by Ralf Holzer <ralf at well.com> - * Copyright (C) 2003-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright (C) 2003-2009 by Gilles Caulier <caulier dot gilles at gmail dot com> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
On Friday 09 January 2009 12:20:58 Gilles Caulier wrote:
> Note: to use this option, you need libkexiv2 from trunk (KDE 4.3). digiKam > still compilable with libkexiv2 for KDE 4.2 but option is not available in > gui. Can we backport the change to libkexiv2 to KDE 4.2 branch? Otherwise this will not get to users at least for another 6 months.... Regards, Luka _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Dnia Saturday 10 January 2009, Luka Renko napisał:
> On Friday 09 January 2009 12:20:58 Gilles Caulier wrote: > > Note: to use this option, you need libkexiv2 from trunk (KDE 4.3). > > digiKam still compilable with libkexiv2 for KDE 4.2 but option is not > > available in gui. > > Can we backport the change to libkexiv2 to KDE 4.2 branch? Otherwise > this will not get to users at least for another 6 months.... Truly I don't think this should be an option :) Just make it that changes in metadata don't change timestamp and 99.9% of users will be happy. m. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
2009/1/10 Mikolaj Machowski <[hidden email]> Dnia Saturday 10 January 2009, Luka Renko napisał: By default this option is disable. So you don't need to change it. During bugs triage, i have seen that some people want to change file time stamp, others no. It's a wish in B.K.O. Making this stuff as optional is the better way. In fact it's similar than option available in Exiv2 command line tool. Same peoples use it, and have the same wishes. Gilles _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |