Re: Gnome Q: Application window save-data for restore when reopened?

2011-07-03 Thread 夜神 岩男
On Sun, 2011-07-03 at 12:04 -0700, Daniel B. Thurman wrote:
> I am sorry if this question was asked before,
> but I was wondering why is it, that most app-
> lication's main window do not restore it's
> last save-data the next time it is opened?
> What I am talking about is window position
> and size data, but not limited to these only.

This is an issue that exists per-application. It has been possible to
have an application remember its most recent settings for as long as I
can remember, and that detail has been overlooked by most new projects
in their first few iterations for as long as I can remember.

> How many times does an application have to be
> repositioned & resized every time it is opened?

42.

> Further, is there a Gnome application design framework,
> that includes built-in support for application save-data
> which include things as position, size, workspace location
> session-save hooks, and any window specific save-data
> so that designers will automatically have this code when
> developing new windows applications? (Yeah, dream on?)

This already exists. Most people writing their first app just don't
focus on this sort of thing, and the issue often goes overlooked for a
very long time before someone in the upstream project realizes "Bagh! My
highly useful application is really irritating to resize all the time!"

> It would also be nice if this was standardized, so that a
> Desktop configuration tool would recognize these apps
> and allow for Global & User property changes saved
> either in the the global or user's (~/.config "database")
> or whatever is appropriate.

This would be very difficult to implement because it would require
crystal-ball technology. How would a global settings file/function
anticipate the creation of all new apps, window libraries and possible
locations in the future and make a slot for each of them?

The standardish way of handling this (and this is the same on Windows,
OSX and our Linux constellation of window managers) is to have the
application record its last state in a file somewhere in the users home
directory. Usually if you go hunting through your dot folders you can
find current state data or cumulative data for an app inside an XML or
other data file in there somewhere.

A good open source example is X-chat's ~/.xchat2/xchat.conf file.

A good example in a multi-platform closed source app would be Skype's
~/.Skype/shared.xml file.

Whenever an application doesn't behave like this, it is usually the
fault of the application, not the window manager. The place to focus
your attention is upstream. Either patch the application to add this
sort of functionality (fairly easy to do if you've got experience, and
if not a good way to start learning the libraries involved in your
favorite apps), or bug upstream to do it.

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


Re: Gnome Q: Application window save-data for restore when reopened?

2011-07-03 Thread Sam Sharpe
On 3 July 2011 22:35, Alan Cox  wrote:
>> I am sorry if this question was asked before,
>> but I was wondering why is it, that most app-
>> lication's main window do not restore it's
>> last save-data the next time it is opened?
>
> Because you are using Gnome ? and Gnome 3 even gets rid of the bits of it
> they didn't manage to hose before.
>
> I run XFCE, generally speaking all my apps re-appear almost immediately.
> One or two don;'t seem to set proper session info but most get it right.
>
>
> A useful experiment in your case might be to run XFCE and see if your
> apps then come back when you restart - it'll tell you if its the apps or
> the desktop are your root cause, and that tells you where to file the
> relevant bugs.

I think you are answering the wrong problem. That would be the debug
steps for the "my Desktop Session doesn't save" question, which is
slightly different to the "Why don't my applications remember their
last position and size when started" ;o)

-- 
Sam
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


Re: Gnome Q: Application window save-data for restore when reopened?

2011-07-03 Thread Alan Cox
> I am sorry if this question was asked before,
> but I was wondering why is it, that most app-
> lication's main window do not restore it's
> last save-data the next time it is opened?

Because you are using Gnome ? and Gnome 3 even gets rid of the bits of it
they didn't manage to hose before.

I run XFCE, generally speaking all my apps re-appear almost immediately.
One or two don;'t seem to set proper session info but most get it right.


A useful experiment in your case might be to run XFCE and see if your
apps then come back when you restart - it'll tell you if its the apps or
the desktop are your root cause, and that tells you where to file the
relevant bugs.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


Re: Gnome Q: Application window save-data for restore when reopened?

2011-07-03 Thread Joe Zeff
On 07/03/2011 12:04 PM, Daniel B. Thurman wrote:
> I am sorry if this question was asked before,
> but I was wondering why is it, that most app-
> lication's main window do not restore it's
> last save-data the next time it is opened?
> What I am talking about is window position
> and size data, but not limited to these only.

That's strictly up to whoever wrote the app.  If the devs decide to 
save/restore position it will, if they don't, neither will it.  From 
what I can tell, it's gotten to be fairly standard for Gatesware apps to 
do this, but not, as yet, for Linux.  I've no idea why not, as it seems 
to be a fairly obvious thing to do.
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


Gnome Q: Application window save-data for restore when reopened?

2011-07-03 Thread Daniel B. Thurman

I am sorry if this question was asked before,
but I was wondering why is it, that most app-
lication's main window do not restore it's
last save-data the next time it is opened?
What I am talking about is window position
and size data, but not limited to these only.

How many times does an application have to be
repositioned & resized every time it is opened?

We do have a startup session save for apps
that supports session-saves, and restores
saved apps to its last position, size, & workspace
locations. (BTW, as of F13, session-saves do not
work well.) In any case, session-saves are for
applications that will be restored when a new
session is opened.  But this is a different application
for a specific purpose.

If I am not being clear, let me try to explain.

Let's take an application such as Totem.

Now if one opens Totem, one notes that this app
positions itself at the top-left corner with a rather
large window size. Annoyed, totem is repositioned,
resized for viewing pleasure. Now, I am done with
totem, I closed it.  Later in time, I decided to open
Totem again, and the behaviour is exactly the same
as before, top-left and a large window size.  Drat!

If there was window-app save-data, the next time
Totem opened, apps window would obtain the save-
data and reposition and resize the app is exactly as
it was the last time it was opened.

Further, is there a Gnome application design framework,
that includes built-in support for application save-data
which include things as position, size, workspace location
session-save hooks, and any window specific save-data
so that designers will automatically have this code when
developing new windows applications? (Yeah, dream on?)

It would also be nice if this was standardized, so that a
Desktop configuration tool would recognize these apps
and allow for Global & User property changes saved
either in the the global or user's (~/.config "database")
or whatever is appropriate.

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines