Bug 118920

Summary: [PATCH] Don't popup dialog at startup when there are no themes on desktop
Product: [Unmaintained] superkaramba Reporter: Kurt Hindenburg <khindenburg>
Component: generalAssignee: Ryan Nickell <p0z3r>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kurt Hindenburg 2005-12-23 21:17:30 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

This may be an usability issue; I think this is a bug myself.  I find it annoying when KDE starts and there are no superkaramba themes loaded on the desktop, the 'theme dialog' popups....

Index: main.cpp
===================================================================
--- main.cpp    (revision 488735)
+++ main.cpp    (working copy)
@@ -134,13 +134,6 @@
     {
       //Not a saved session - check for themes given on command line
       app.checkCommandLine(args, lst);
-
-      if(lst.size() == 0)
-      {
-        //No themes given on command line and no saved session.
-        //Show welcome dialog.
-        app.globalShowThemeDialog();
-      }
     }

     args->clear();
Comment 1 Ryan Nickell 2006-01-06 03:00:51 UTC
This patch would also remove the theme dialog from appearing when someone runs SuperKaramba without themes passed as an argument for instance from the Kmenu or from a shell.

We'd expect anyone running SuperKaramba upon logout to have at least one theme running when the session is saved.  

Couple of options:
1) don't save SK in the session if there are no themes running upon logout
2) have some way to identify if the app was loaded from a session or from user interaction

There may other solutions and I'm open to suggestions.
Comment 2 Kurt Hindenburg 2006-01-06 06:23:19 UTC
"We'd expect anyone running SuperKaramba upon logout to have at least one theme running when the session is saved."
My reaction to this is why?  I don't think it is a valid assumption to make offhand.


Try this:
Index: main.cpp
===================================================================
--- main.cpp    (revision 493011)
+++ main.cpp    (working copy)
@@ -130,7 +130,7 @@

     // Try to restore a previous session if applicable.
     app.checkPreviousSession(app, lst);
-    if(lst.size() == 0)
+    if( (lst.size() == 0) && !app.isRestored() )
     {
       //Not a saved session - check for themes given on command line
       app.checkCommandLine(args, lst);
Comment 3 Ryan Nickell 2006-01-06 06:49:54 UTC
Not so much an assumption as a usual behavior pattern.  People use SK themes almost in the same manner as a wallpaper or desktop color.  It is expected to be there or the value in running a background handling utility when restoring a session doesn't have much value, in my opinion.  There is obviously some value in it so I will apply and commit once I finish what I'm working on currently.
Comment 4 Ryan Nickell 2006-01-08 21:10:43 UTC
SVN commit 495750 by nickell:

BUG:118920 Don't pop up the Theme Dialog when restoring a session and
there aren't any themes saved in the session.


 M  +1 -1      main.cpp  


--- branches/KDE/3.5/kdeutils/superkaramba/src/main.cpp #495749:495750
@@ -130,7 +130,7 @@
 
     // Try to restore a previous session if applicable.
     app.checkPreviousSession(app, lst);
-    if(lst.size() == 0)
+    if( (lst.size() == 0) && !app.isRestored() )
     {
       //Not a saved session - check for themes given on command line
       app.checkCommandLine(args, lst);