[Digikam-devel] [Bug 120308] batch cration of thumbails
Gilles Caulier
caulier.gilles at free.fr
Wed Aug 30 11:48:10 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=120308
caulier.gilles free fr changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From caulier.gilles free fr 2006-08-30 12:48 -------
Daniel,
A new batch thumbnails generator have been added to svn trunk (will be availalbe for the next digiKam 0.9.0-beta2). I don't know why the commit in svn have not notified this B.K.O file.
This is the resume of my commit :
SVN commit 578791 by cgilles:
digikam from trunk : new batch tool to re-generate all albums items thumbnails for all icon sizes. Use the new Tools/Rebuild all Thumbnails option for that.
This tool can take a while on slow computers (you can take a coffee (:=)). Note : you cannot use digiKam during thumbnails processing.
BUG : 128308
CCBUGS : 110658, 127179
M +1 -1 Makefile.am
A batchthumbsgenerator.cpp [License: GPL]
A batchthumbsgenerator.h [License: GPL]
M +28 -7 digikamapp.cpp
M +1 -0 digikamapp.h
M +8 -7 digikamui.rc
--- trunk/extragear/graphics/digikam/digikam/Makefile.am #578790:578791
@ -49,7 +49,7 @
kdatepickerpopup.cpp folderview.cpp folderitem.cpp \
upgradedb_sqlite2tosqlite3.cpp \
ratingwidget.cpp digikamfirstrun.cpp imageattributeswatch.cpp \
- albumthumbnailloader.cpp \
+ albumthumbnailloader.cpp batchthumbsgenerator.cpp \
dcopiface.cpp dcopiface.skel
libdigikam_la_LIBADD = $(LIB_KIO) $(LIB_SQLITE3) $(LIB_KABC) \
--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #578790:578791
@ -62,30 +62,31 @
// Local includes.
-#include "kipiinterface.h"
#include "albummanager.h"
+#include "album.h"
#include "albumlister.h"
-#include "album.h"
-#include "themeengine.h"
+#include "albumsettings.h"
+#include "albumthumbnailloader.h"
#include "cameralist.h"
#include "cameratype.h"
#include "cameraui.h"
-#include "albumsettings.h"
#include "setup.h"
#include "setupplugins.h"
#include "setupeditor.h"
#include "setupimgplugins.h"
-#include "digikamview.h"
#include "imagepluginloader.h"
#include "imagewindow.h"
#include "splashscreen.h"
#include "thumbnailsize.h"
+#include "themeengine.h"
+#include "kipiinterface.h"
#include "scanlib.h"
#include "loadingcacheinterface.h"
#include "imageattributeswatch.h"
#include "dcrawbinary.h"
+#include "batchthumbsgenerator.h"
+#include "digikamview.h"
#include "digikamapp.h"
-#include "albumthumbnailloader.h"
using KIO::Job;
using KIO::UDSEntryList;
@ -94,6 +95,8 @
namespace Digikam
{
+DigikamApp* DigikamApp::m_instance = 0;
+
DigikamApp::DigikamApp()
: KMainWindow( 0, "Digikam" )
{
@ -753,6 +756,10 @
this, SLOT(slotDatabaseRescan()), actionCollection(),
"database_rescan");
+ new KAction(i18n("Rebuild all Thumbnails..."), "reload_page", 0,
+ this, SLOT(slotRebuildAllThumbs()), actionCollection(),
+ "thumbs_rebuild");
+
// -----------------------------------------------------------
// Provides a menu entry that allows showing/hiding the toolbar(s)
@ -1582,8 +1589,22 @
sLib.startScan();
}
-DigikamApp* DigikamApp::m_instance = 0;
+void DigikamApp::slotRebuildAllThumbs()
+{
+ QString msg = i18n("Rebuild all album item thumbnails can take a while.\n"
+ "Do you want to continue?");
+ int result = KMessageBox::warningContinueCancel(this, msg);
+ if (result != KMessageBox::Continue)
+ return;
+ BatchThumbsGenerator *thumbsGenerator = new BatchThumbsGenerator(this);
+
+ connect(thumbsGenerator, SIGNAL(signalRebuildAllThumbsDone()),
+ mView, SLOT(slot_albumRefresh()));
+
+ thumbsGenerator->exec();
+}
+
} // namespace Digikam
#include "digikamapp.moc"
--- trunk/extragear/graphics/digikam/digikam/digikamapp.h #578790:578791
@ -155,6 +155,7 @
void slotConfToolbars();
void slotToggleFullScreen();
void slotDatabaseRescan();
+ void slotRebuildAllThumbs();
void slotChangeTheme(const QString& theme);
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #578790:578791
@ -1,5 +1,5 @
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="9" name="digikam" >
+<kpartgui version="10" name="digikam" >
<MenuBar>
@ -65,15 +65,16 @
</Menu>
<Menu name="Tools"><text>&Tools</text>
- <action name="search_quick" />
- <action name="search_advanced" />
+ <action name="search_quick" />
+ <action name="search_advanced" />
<Separator/>
- <action name="database_rescan" />
+ <action name="database_rescan" />
+ <action name="thumbs_rebuild" />
<Separator/>
- <actionList name="album_actions"/>
+ <actionList name="album_actions"/>
<Separator/>
- <action name="gamma_adjustment" />
- <actionList name="tool_actions"/>
+ <action name="gamma_adjustment" />
+ <actionList name="tool_actions"/>
<Menu name="BatchProcesses"><text>&Batch Processes</text>
<actionList name="batch_actions"/>
</Menu>
-------------------------------------------------------------------------------------------------------
I close this file now.
Gilles
More information about the Digikam-devel
mailing list