Re: saving geometry to disk on window resize
- From: "muppet" <scott asofyet org>
- To: gtk-perl-list gnome org
- Subject: Re: saving geometry to disk on window resize
- Date: Fri, 12 Mar 2004 15:03:15 -0500 (EST)
Joe Smith said:
muppet wrote:
this works for me...
# load from disk if it exists.
if (-f 'saved') {
eval join "", `cat saved`;
}
I know it's only an example, but that probably ought to have a warning
label. You hope that the contents of 'saved' never looks like:
system('rm -rf $HOME')
honestly, i spent more time on the comments than the code. besides, updating
the stored location at every change is a huge waste, as well, just updating at
close would be sufficient. given that i did the whole thing in less than
five minutes, i think that's doing pretty well. ;-)
still, this list is archived and that evil code is now available on google
with my name on it. bad muppet, no biscuit.
Is there a simple way to save/restore stuff like this in a relatively
safe way, without a lot of hassle?
that's what Gnome2::GConf is all about.
Examples really shouldn't include unexploded ordinance.
ah, another addition for my random sig engine...
--
muppet <scott at asofyet dot org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]