mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remember window size
This commit has gone through a few iterations and I trimmed it down to what I consider the "conservative minimum" - so this only stores window size, not window position. And in my mind that's the more relevant part, anyway. Have your window manager position the window at a "smart" spot on your screen... Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cfdde3ff63
commit
d742d7b391
5 changed files with 64 additions and 0 deletions
14
linux.c
14
linux.c
|
@ -38,6 +38,11 @@ void subsurface_set_conf_bool(char *name, int value)
|
|||
gconf_client_set_bool(gconf, gconf_name(name), value > 0, NULL);
|
||||
}
|
||||
|
||||
void subsurface_set_conf_int(char *name, int value)
|
||||
{
|
||||
gconf_client_set_int(gconf, gconf_name(name), value , NULL);
|
||||
}
|
||||
|
||||
const void *subsurface_get_conf(char *name)
|
||||
{
|
||||
return gconf_client_get_string(gconf, gconf_name(name), NULL);
|
||||
|
@ -56,6 +61,15 @@ int subsurface_get_conf_bool(char *name)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int subsurface_get_conf_int(char *name)
|
||||
{
|
||||
int val = gconf_client_get_int(gconf, gconf_name(name), NULL);
|
||||
if(!val)
|
||||
return -1;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void subsurface_flush_conf(void)
|
||||
{
|
||||
/* this is a no-op */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue