diff options
author | infirit <[email protected]> | 2014-12-18 20:32:15 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-18 20:32:15 +0100 |
commit | db877ef14b15c2c2f8572954589fc81fcf6d8626 (patch) | |
tree | bf53a755c8b0c16ef77681d418d47cc9b7948139 /src/procman.cpp | |
parent | 01735cf7050926fb1c1de8adecb391c657ad2204 (diff) | |
download | mate-system-monitor-db877ef14b15c2c2f8572954589fc81fcf6d8626.tar.bz2 mate-system-monitor-db877ef14b15c2c2f8572954589fc81fcf6d8626.tar.xz |
Use a tuple to store window state
Taken from GSM commit: d347dd13681b7f57b28bc609d94cbcc597049951
From: Stefano Facchini <[email protected]>
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=649398
Diffstat (limited to 'src/procman.cpp')
-rw-r--r-- | src/procman.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/procman.cpp b/src/procman.cpp index 4e8d2ce..6e99dc8 100644 --- a/src/procman.cpp +++ b/src/procman.cpp @@ -249,10 +249,9 @@ procman_data_new (GSettings *settings) pd = ProcData::get_instance(); - pd->config.width = g_settings_get_int (settings, "width"); - pd->config.height = g_settings_get_int (settings, "height"); - pd->config.xpos = g_settings_get_int (settings, "x-position"); - pd->config.ypos = g_settings_get_int (settings, "y-position"); + g_settings_get (settings, "window-state", "(iiii)", + &pd->config.width, &pd->config.height, + &pd->config.xpos, &pd->config.ypos); pd->config.show_tree = g_settings_get_boolean (settings, "show-tree"); g_signal_connect (G_OBJECT(settings), "changed::show-tree", G_CALLBACK(tree_changed_cb), pd); @@ -526,14 +525,10 @@ procman_save_config (ProcData *data) data->config.height = gdk_window_get_height(gtk_widget_get_window(data->app)); gtk_window_get_position(GTK_WINDOW(data->app), &data->config.xpos, &data->config.ypos); - g_settings_set_int (settings, "width", data->config.width); - g_settings_set_int (settings, "height", data->config.height); - g_settings_set_int (settings, "x-position", data->config.xpos); - g_settings_set_int (settings, "y-position", data->config.ypos); - + g_settings_set (settings, "window-state", "(iiii)", + data->config.width, data->config.height, + data->config.xpos, data->config.ypos); g_settings_set_int (settings, "current-tab", data->config.current_tab); - - g_settings_sync (); } static guint32 |