Bug 307467

Summary: Missing slide show button in digiKam 3.0.0 beta1
Product: [Applications] digikam Reporter: nucleo <nucleo>
Component: Plugin-Generic-SlideShowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, dodonvictor
Priority: NOR    
Version: 3.0.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 3.0.0
Sentry Crash Report:

Description nucleo 2012-09-26 22:58:54 UTC
Slide show toolbar button is missing in digiKam 3.0.0 beta1.

Reproducible: Always

Actual Results:  
The only way to run slideshow is from View menu where it still available.

Expected Results:  
Using slide show toolbar button is more convenient than running slideshow from View menu.
Comment 1 caulier.gilles 2012-09-27 06:15:23 UTC
Do you talk about digiKam simple Slideshow or Advanced Slideshow kipi plugin ?

Gilles Caulier
Comment 2 nucleo 2012-09-27 10:11:21 UTC
There is drop down menu appears with both Slideshow and Advanced Slideshow when pressing on Slideshow button in digiKam 2.9 but in 3.0 this button missing and both Slideshow and Advanced Slideshow available only in menu View - Slideshow.
Comment 3 Victor Dodon 2012-10-06 22:11:46 UTC
Can you try now and mark this as solved? Thank you.

Victor Dodon.
Comment 4 nucleo 2012-10-06 22:16:56 UTC
(In reply to comment #3)
> Can you try now and mark this as solved? Thank you.

You mean there is some particular commit that fixes bug?
Comment 5 caulier.gilles 2012-10-07 03:40:06 UTC
Victor,

Just checked your last commit. It's fixed for 3.0.0-beta2

Gilles Caulier
Comment 6 nucleo 2012-10-13 22:31:00 UTC
Bug not completely fixed in 3.0.0-beta2 because "Advanced slide show" missing in drop down "Slideshow" menu as it was in 2.9.0.
"Advanced slide show" still available from View menu.
Comment 7 Victor Dodon 2012-10-14 07:48:41 UTC
@nucleo, in digiKam 3.0.0, plugins can be added to the toolbar(i.e. Advanced Slideshow can be added directly to the toolbar).
You can see how it looks now:
http://imageshack.us/a/img594/27/shot99.png
Comment 8 nucleo 2012-10-14 10:39:43 UTC
By default Advanced Slideshow is not on the panel so  it should be added in every new Digikam installation. Can it be added on panel by default? Also it would be nice if Advanced Slideshow will be grouped in Slideshow menu as it was in previous Digikam versions.
Comment 9 nucleo 2012-10-19 18:25:39 UTC
And this is not obvious how to add plugins on panel.
At first I searched for Advanced slideshow in <digikam> panlel but it was not there.
It added on digikam panel only when I tried to edit <kipiplugin_advancedslideshow> panel.
Comment 10 Victor Dodon 2012-10-19 19:04:17 UTC
@nucleo, this is the way that KDE XML-GUI works: to be able to add plugin actions to the toolbar, now each plugin is a KXmlGuiClient with own actions, and each client has it's own toolbar, that's why you must select kipiplugin_advancedslideshow in the Toolbar dropdown.
Comment 11 nucleo 2012-10-19 19:12:44 UTC
If I didn't know that it should be possible to add Advanced slideshow on panel then I wouldn't guess that I should edit <kipiplugin_advancedslideshow> toolbar.
Adding plugins should be simplified for example by adding options somewhere in Kipi-plugins Digikam settings.
Comment 12 Marcel Wiesweg 2012-10-23 19:29:50 UTC
Victor: I'd say the bug is not to explain a complex way (which I for instance dont understand spontaneously) to add kipi actions manually. We have always placed this special action in the slide show toolbar drop down. Is it still there?
Comment 13 caulier.gilles 2012-10-23 22:31:05 UTC
Git commit 2481d371b619ac6e9cb3dfd7c64a6d64f5c96205 by Victor Dodon.
Committed on 24/10/2012 at 00:21.
Pushed by dodon into branch 'master'.

Add advancedslideshow action to the Slideshow menu. BUGS: 307467 FIXED-IN: 3.0.0

M  +18   -0    utilities/kipiiface/kipipluginloader.cpp

http://commits.kde.org/digikam/2481d371b619ac6e9cb3dfd7c64a6d64f5c96205

diff --git a/utilities/kipiiface/kipipluginloader.cpp b/utilities/kipiiface/kipipluginloader.cpp
index d6ca604..9c965d2 100644
--- a/utilities/kipiiface/kipipluginloader.cpp
+++ b/utilities/kipiiface/kipipluginloader.cpp
@@ -230,6 +230,13 @@ QList<QAction*> KipiPluginLoader::kipiActionsByCategory(Category cat) const

 void KipiPluginLoader::slotKipiPluginPlug()
 {
+    // Ugly hack. Remove "advancedslideshow" action from Slideshow menu
+    foreach(QAction* action, d->app->slideShowMenu()->menu()->actions())
+    {
+        if (action->objectName() == "advancedslideshow")
+            d->app->slideShowMenu()->removeAction(action);
+    }
+
     // Delete all action categories
     for (QMap<int, KActionCategory*>::iterator it = d->kipiCategoryMap.begin();
          it != d->kipiCategoryMap.end();
@@ -315,6 +322,17 @@ void KipiPluginLoader::slotKipiPluginPlug()
             continue;
         }

+        // Ugly hack. Remove "advancedslideshow action from AdvancedSlideshow plugin
+        // actionCollection() and add it to the Slideshow menu
+        if (plugin->objectName() == QString("AdvancedSlideshow"))
+        {
+            QAction* action = plugin->actionCollection()->action("advancedslideshow");
+            if (action)
+            {
+                QAction* _action = plugin->actionCollection()->takeAction(action);
+                d->app->slideShowMenu()->addAction(_action);
+            }
+        }
         d->app->guiFactory()->addClient(plugin);
     }