Bug 98559 - save and restore active window
Summary: save and restore active window
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-04 17:10 UTC by Nicolas Brisset
Modified: 2005-02-08 17:05 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 Nicolas Brisset 2005-02-04 17:10:56 UTC
Version:           1.1.0_dr1 (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.3.2
OS:                SunOS (sun4u) release 5.8

Currently, if you are in tab mode, working in W2 in a plot having e.g. 4 windows, when you save the plot the next time you load it the last window (W4) is activated.
It would be nice to remember the active window and give it focus again when loading the document.
Comment 1 George Staikos 2005-02-08 07:14:46 UTC
This is easy to add, but how do we deal with when to save it?  If a user opens a .kst file and changes tabs, then closes, should we prompt the user to save?  That doesn't make much sense to me.  If we don't, then what's the point of the feature since it only saves sometimes?
Comment 2 Netterfield 2005-02-08 15:57:08 UTC
I think saving window tab is a nice feature.

We already have a concept of not saving if the change is trivial.  Eg, if you 
open a kst file, re-zoom, and then exit, it doesn't (shouldn't) query for 
save.  This is the correct behavior - you can save it if you want, but let's 
not bug the user over a trivial save.  The same thing should apply to 
changing tabs.


On February 8, 2005 01:14 am, George Staikos wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=98559
>
>
>
>
> ------- Additional Comments From staikos kde org  2005-02-08 07:14 -------
> This is easy to add, but how do we deal with when to save it?  If a user
> opens a .kst file and changes tabs, then closes, should we prompt the user
> to save?  That doesn't make much sense to me.  If we don't, then what's the
> point of the feature since it only saves sometimes?
> _______________________________________________
> Kst mailing list
> Kst@kde.org
> https://mail.kde.org/mailman/listinfo/kst

Comment 3 George Staikos 2005-02-08 16:07:19 UTC
On Tuesday 08 February 2005 09:57, netterfield@astro.utoronto.ca wrote:
> 15:57 ------- I think saving window tab is a nice feature.
>
> We already have a concept of not saving if the change is trivial.  Eg, if
> you open a kst file, re-zoom, and then exit, it doesn't (shouldn't) query
> for save.  This is the correct behavior - you can save it if you want, but
> let's not bug the user over a trivial save.  The same thing should apply to
> changing tabs.

   Ok, I'll implement it asap.  It's about 10 lines of code I think. :-)

Comment 4 George Staikos 2005-02-08 17:05:16 UTC
CVS commit by staikos: 

Remember the last active window and restore it.  Remembers it with a node in
<windowsize> which maybe isn't completely ideal, but it's easier than storing
an <active/> node in the window since that would require iterating through the
windows and storing a flag, or walking the XML again.  Maybe we'll get to clean
the XML up one day and fix this then.

Also cleans up KstApp::inst(), app, and parent() usage to be uniform.

FEATURE: 98559


  M +52 -40    kstdoc.cpp   1.148