Summary: | [PATCH] Don't popup dialog at startup when there are no themes on desktop | ||
---|---|---|---|
Product: | [Unmaintained] superkaramba | Reporter: | Kurt Hindenburg <khindenburg> |
Component: | general | Assignee: | 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
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. "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); 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. 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); |