Bug 118920 - [PATCH] Don't popup dialog at startup when there are no themes on desktop
Summary: [PATCH] Don't popup dialog at startup when there are no themes on desktop
Status: RESOLVED FIXED
Alias: None
Product: superkaramba
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Ryan Nickell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-23 21:17 UTC by Kurt Hindenburg
Modified: 2006-01-08 21:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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);