osdir.com
mailing list archive

Subject: Re: user-controllable treeview column suppression - msg#00204

List: gnome.gtk+.python

Date: Prev Next Index Thread: Prev Next Index
On 21 Jul 2004 19:18:25 -0500
Doug Quale <quale1@xxxxxxxxxxx> wrote:

> I was imagining a simple system that required the application
> programmer to save the preferences and load them into the appropriate
> widgets by hand. This would be very tedious, but smarter mechanisms
> could be built on top of those low level facilities. Maybe this is
> aiming too low.

Well, here's some code that aims even lower -- I use the attached class in my
applications as a way to remember where a user has positioned a window and the
state of various widgets (panes, toggles). I haven't yet used it for
scrollbars, but it should be do-able. I ran into some trouble with adjustable
column-widths as I couldn't find a reliable way to get and set them while still
allowing the user to reset them (I believe this has already been commented on).
I haven't even thought about touching the parts of the TreeView that would
require knowing something about the TreeModel.

Tom

Attachment: WidgetSaver.py
Description: Text Data

_______________________________________________
pygtk mailing list pygtk@xxxxxxxxxx
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: user-controllable treeview column suppression

On Wed, Jul 21, 2004 at 07:18:25PM -0500, Doug Quale wrote: > > You'd also need to specify a way to discover, store (and restore on > > startup/widget construction) these preferences per-user and per-widget > > -- or is that up to the application programmer? > > I was imagining a simple system that required the application > programmer to save the preferences and load them into the appropriate > widgets by hand. This would be very tedious, but smarter mechanisms > could be built on top of those low level facilities. Maybe this is > aiming too low. > > A more integrated facility such as what bonobo docks and toolbars > provide (automatically remembers and restores toolbar configuration at > application shutdown and startup) would be even better. I'd shoot for something transparent, that you simply threw a switch in the application and ~user/.appname/state was generated and kept up to date automatically for you. That'd be a killer feature for app-writers. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331 _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Next Message by Date: click to view message preview

Re: user-controllable treeview column suppression

On 21 Jul 2004 19:18:25 -0500 Doug Quale <quale1@xxxxxxxxxxx> wrote: > I was imagining a simple system that required the application > programmer to save the preferences and load them into the appropriate > widgets by hand. This would be very tedious, but smarter mechanisms > could be built on top of those low level facilities. Maybe this is > aiming too low. Well, here's some code that aims even lower -- I use the attached class in my applications as a way to remember where a user has positioned a window and the state of various widgets (panes, toggles). I haven't yet used it for scrollbars, but it should be do-able. I ran into some trouble with adjustable column-widths as I couldn't find a reliable way to get and set them while still allowing the user to reset them (I believe this has already been commented on). I haven't even thought about touching the parts of the TreeView that would require knowing something about the TreeModel. Tom WidgetSaver.py Description: Text Data _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Previous Message by Thread: click to view message preview

Re: user-controllable treeview column suppression

"Gustavo J. A. M. Carneiro" <gjc@xxxxxxxxxxxxx> writes: > A Qui, 2004-07-22 Ãs 15:09, Doug Quale escreveu: > > "Gustavo J. A. M. Carneiro" <gjc@xxxxxxxxxxxxx> writes: > > > > > BonoboUI stores toolbar state in GConf. But the programmer has to > > > specify the GConf key, so it isn't 100% automatic (thankfully). > > > > Isn't the gconf key set up automatically when you call > > gnome.program_init()? I don't know, but it seemed to work that way > > when I played around with it. > > Nope. You need some code like this: > window.get_ui_engine().config_set_path(UICONFIG_KEY) Sorry, I got that wrong again. If you use GnomeApp, I think calling gnome.ui.App(appname, title) is all that's required to setup the gconf key appname, but I've been wrong a couple of times recently, so ... _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Next Message by Thread: click to view message preview

Re: user-controllable treeview column suppression

On 21 Jul 2004 19:18:25 -0500 Doug Quale <quale1@xxxxxxxxxxx> wrote: > I was imagining a simple system that required the application > programmer to save the preferences and load them into the appropriate > widgets by hand. This would be very tedious, but smarter mechanisms > could be built on top of those low level facilities. Maybe this is > aiming too low. Well, here's some code that aims even lower -- I use the attached class in my applications as a way to remember where a user has positioned a window and the state of various widgets (panes, toggles). I haven't yet used it for scrollbars, but it should be do-able. I ran into some trouble with adjustable column-widths as I couldn't find a reliable way to get and set them while still allowing the user to reset them (I believe this has already been commented on). I haven't even thought about touching the parts of the TreeView that would require knowing something about the TreeModel. Tom WidgetSaver.py Description: Text Data _______________________________________________ pygtk mailing list pygtk@xxxxxxxxxx http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by