Bug 119073 - wish list rescan option
Summary: wish list rescan option
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 0.8.0
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-27 20:04 UTC by Ted Hansen
Modified: 2017-08-17 06:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Hansen 2005-12-27 20:04:02 UTC
Version:           0.8.0 (using KDE 3.5.0, Debian Package 4:3.5.0-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.13-kanotix-9

Occasional digikam fails to show newly downloaded photos in the directory listing. The easiest way to get them to show up is to close digikam then it will automatically rescan when it is reopened. 
Please include a 'rescan' menu item so that the database can be updated without having to restart digikam.
Comment 1 Tom Albers 2005-12-29 18:45:20 UTC
Have you got any idea in which situation the pictures dont show up?
Comment 2 Ted Hansen 2005-12-29 19:10:58 UTC
Not really. There didn't seem to be anything consistent. It happened when I downloaded photos from several days with the 'automatically create subfolders' on so there were several subfolders created. The photos appeared in some but not all subfolders. Closed digikam & reopened & all the photos did appear. Then I tried the same procedure again and the photos did appear immediately as they should. I don't know what was different & of course it never recorded as an error so there was no backtrace. 
Comment 3 Tom Albers 2005-12-29 19:34:27 UTC
SVN commit 492366 by toma:

Add a rescan possibility to the menu, so you dont have to close and start digiKam again when the app does not detect changes in the album library path (which it should detect in all cases by the way, so if you spot a logic, please open a new bugreport)

Also makes it possible to turn off scan at start in the settings and do it manually when needed, this will gain a bit in the startup time of digiKam.

BUG: 119073


 M  +11 -0     digikamapp.cpp  
 M  +1 -0      digikamapp.h  
 M  +4 -1      digikamui.rc  


--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #492365:492366
@@ -72,6 +72,7 @@
 #include "digikamapp.h"
 #include "splashscreen.h"
 #include "thumbnailsize.h"
+#include "scanlib.h"
 
 DigikamApp::DigikamApp(bool detectCamera)
           : KMainWindow( 0, "Digikam" )
@@ -549,6 +550,10 @@
     findAction->setText(i18n("Advanced Search..."));
     findAction->setShortcut("Ctrl+Alt+F");
 
+    new KAction(i18n("Scan for New Images"), "reload_page", 0,
+                this, SLOT(slotDatabaseRescan()), actionCollection(), 
+                "database_rescan");
+
     // -----------------------------------------------------------
 
     // Provides a menu entry that allows showing/hiding the toolbar(s)
@@ -1152,6 +1157,12 @@
     }
 }
 
+void DigikamApp::slotDatabaseRescan()
+{
+    ScanLib sLib;
+    sLib.startScan();
+}
+
 DigikamApp* DigikamApp::m_instance = 0;
 
 #include "digikamapp.moc"
--- trunk/extragear/graphics/digikam/digikam/digikamapp.h #492365:492366
@@ -207,6 +207,7 @@
     void slotEditKeys();
     void slotConfToolbars();
     void slotToggleFullScreen();
+    void slotDatabaseRescan();
 
     void slotChangeTheme(const QString& theme);
 };
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #492365:492366
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="6" name="digikam" >
+<kpartgui version="7" name="digikam" >
 
  <MenuBar>
 
@@ -65,6 +65,9 @@
   <Menu name="Tools"><text>&amp;Tools</text>
       <Action name="search_quick" />
       <Action name="search_advanced" />
+      <Separator/>
+      <Action name="database_rescan" />
+      <Separator/>
       <ActionList name="album_actions"/>
       <Separator/>
       <Action name="gamma_adjustment" />
Comment 4 Tom Albers 2005-12-29 19:43:22 UTC
SVN commit 492369 by toma:

Backport of SVN commit 492366 by toma:

Add a rescan possibility to the menu, so you dont have to close and start digiKam again when the app does not detect changes in the album library path (which it should detect in all cases by the way, so if you spot a logic, please open a new bugreport)

Also makes it possible to turn off scan at start in the settings and do it manually when needed, this will gain a bit in the startup time of digiKam.

CCBUG: 119073



 M  +11 -0     digikamapp.cpp  
 M  +1 -0      digikamapp.h  
 M  +4 -1      digikamui.rc  


--- branches/stable/extragear/graphics/digikam/digikam/digikamapp.cpp #492368:492369
@@ -74,6 +74,7 @@
 #include "digikamapp.h"
 #include "splashscreen.h"
 #include "thumbnailsize.h"
+#include "scanlib.h"
 
 DigikamApp::DigikamApp(bool detectCamera)
           : KMainWindow( 0, "Digikam" )
@@ -571,6 +572,10 @@
     findAction->setText(i18n("Advanced Search..."));
     findAction->setShortcut("Ctrl+Alt+F");
 
+    new KAction(i18n("Scan for New Images"), "reload_page", 0,
+                this, SLOT(slotDatabaseRescan()), actionCollection(), 
+                "database_rescan");
+
     // -----------------------------------------------------------
 
     // Provides a menu entry that allows showing/hiding the toolbar(s)
@@ -1179,6 +1184,12 @@
     }
 }
 
+void DigikamApp::slotDatabaseRescan()
+{
+    ScanLib sLib;
+    sLib.startScan();
+}
+
 DigikamApp* DigikamApp::m_instance = 0;
 
 #include "digikamapp.moc"
--- branches/stable/extragear/graphics/digikam/digikam/digikamapp.h #492368:492369
@@ -212,6 +212,7 @@
     void slotEditKeys();
     void slotConfToolbars();
     void slotToggleFullScreen();
+    void slotDatabaseRescan();
 
     void slotChangeTheme(const QString& theme);
 };
--- branches/stable/extragear/graphics/digikam/digikam/digikamui.rc #492368:492369
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="6" name="digikam" >
+<kpartgui version="7" name="digikam" >
 
  <MenuBar>
 
@@ -67,6 +67,9 @@
   <Menu name="Tools"><text>&amp;Tools</text>
       <Action name="search_quick" />
       <Action name="search_advanced" />
+      <Separator/>
+      <Action name="database_rescan" />
+      <Separator/>
       <ActionList name="album_actions"/>
       <Separator/>
       <Action name="gamma_adjustment" />
Comment 5 Mikolaj Machowski 2005-12-30 01:33:39 UTC
> Add a rescan possibility to the menu, so you dont have to close and
> start digiKam again when the app does not detect changes in the album
> library path (which it should detect in all cases by the way, so if you
> spot a logic, please open a new bugreport)

Auto detection will not work(?) with FAM daemon not working. I turned
it off and know several people who did it due to fact FAM is real
resource hog. Usually FAM runs as "silent" dependency of KDE but can be
turned off by distro or user who wants to increase performance of
computer (losing some niceties of KDE).

Just some explanation.