Mail Archives: geda-user/2016/06/14/01:55:07
Hi all!
I've arrived at the gtk hid's "window width/height save/restore" code in
my conf-rewrite in pcb-rnd. Long story short: the gtk hid tries to
remember window geometry and tries to restore it to the last known
state (?) when pcb is started.
Thinking it over, I am not sure this is a good idea (while I totally see
why many users probably want it).
I am interested in your input, as an user of GUI apps in general (I don't
think this is pcb-specific) about how this is best done. Conceptually the
question is, assuming pcb-rnd needs to save/restore window sizes, whose
property window sizes is? The program's? The user's? The desing's? The
session's? This gets tricky especially in corner cases like laptops with
variable screen sizes (large external screen when docked and small screen
on the road).
Please comment on the following options, or add extra options if you see
any:
1. Do not try to save window geometry, let the window manager do its
job. This is how I do it: my wm runs an awk script that regex-matches pcb
windows and arranges the on the fly, overriding whatever pcb says. PCB
windows are automatically arranged in the way I like them, no matter how
big my screen is. This probably won't work for most users because they use
less capable window managers and/or spend less time configuring it.
2. Save it as an user configuration (~/.pcb-rnd/);
this is good as long as you are running only one instance of pcb. When you
start running two in parallel, and chose different window sizes,
they will overwrite eachother's settings so it's random which one wins
(e.g. the one you closed last will overwrite window geometry last). I
think this is how the gtk hid does it these days, but I am not 100% sure.
3. Save it as a per-design configuration; it's much less likely that the
same user on the same system opens the same design twice and if he does,
his save operations will fight anyway; however, editing the same design on
multiple screens (or multiple systems, by multiple users!) makes it pretty
wrong to save this setting in the design. Having some local settings
stored in an unversioned config file next to the .pcb file solves some of
the problems, but not all (e.g. same user, same system, screen size
changes)
4. make it an "explicit save" thing so it doesn't try to save it
automatically, it makes a snapshot only when you explicitly click a
button. Window geometry is saved in ~/.pcb-rnd/ (user config). So if you
know you are going to use a given screen size for the next period of time,
you rearrange your windows, save the arrangement then if you start new pcb
instances they start with this saved setting.
NOTE: I am not proposing any change to pcb or gschem or geda/gaf.
Regards,
Igor2
- Raw text -