Re: About applications remembering size



Here's my take on the remember size/position issue.  I don't think all
applications should remember both size and position.  Rather, I think it
depends on the style of the application.  Basically, I'm looking at apps
based on the window-to-object ratio.  Here's the breakdown:

One-to-One: Applications where each window represents exactly one thing,
and each thing is represented by exactly one window.  This would include
Nautilus in spatial mode and any simple preview app.  These apps should
remember both size and position on a per-object basis.

Many-to-Many: Applications where each window browses multiple objects. 
There doesn't really exist a 'One-to-Many' category, because all of
these types of programs allow multiple windows to be open, any one of
which could be looking at the same thing.  This includes Nautilus in
navigator mode, a web browser, and Yelp.  These apps should remember
size, but not position.  The user is likely to have some size that he
considers optimal, and he'll generally want most of the windows to be
around that size.  The remembered size should simply apply to all the
windows.  If the app tries to do some mapping of objects to sizes, it's
just going to fail and be very unpredictable.

The argument against this case is that, if I resize a window for one
particular instance, I might not want all my windows that size.  That
is, my resizing was sort of a one-shot deal.  This is a problem, and
it's one that will annoy the user from time to time.  But if the app
doesn't remember position at all, the user is likely to resize every
window every time.  It's better to annoy the user 1% of the time than
100% of the time.

(Of course, if we were really slick, we could have these types of apps
figure out an optimal window size based on some sort of averaging of
previous window sizes that you've used.)

Many-to-One: Applications where you may have multiple views of a single
object.  This would include The GIMP.  If the app has different types of
views, then it might try remembering size and position based on the type
of view of the object.  Otherwise, it shouldn't try to remember either.

All applications:  If an app doesn't remember size, or if it does but it
doesn't have a remembered size yet, then it should really try to size
the window intelligently based on the content.  Currently, Nautilus just
has a single default size for windows.  It would be way cool if it could
actually try to pick a reasonable size for each directory, based on how
much stuff is in there.


I don't think the window manager should be doing this, unless we can
develop a set of hints that can handle all cases.  However, it is a bit
annoying that programmers need to rewrite the same code over and over. 
It might be a good idea to have some GtkWindow subclass that's capable
of remembering size and position and is controlled by two properties,
"remember-size" and "remember-position".  It would remember stuff based
on an "id" attribute.  (Or would the "name" attribute of GtkWidget serve
this roll?)

Just my $0.02.

--
Shaun





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]