summaryrefslogtreecommitdiff
path: root/src/procman.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 19:07:46 +0100
committerinfirit <[email protected]>2014-12-18 19:07:46 +0100
commit89c2ba95156b8ccd9d7493121f4a691ffbe927c1 (patch)
tree1b169ab49596d727aa2afc895f044de4a1e4e951 /src/procman.cpp
parent61a40499507138fd1620475487c1b6772be3e37a (diff)
downloadmate-system-monitor-89c2ba95156b8ccd9d7493121f4a691ffbe927c1.tar.bz2
mate-system-monitor-89c2ba95156b8ccd9d7493121f4a691ffbe927c1.tar.xz
Also remember the window position, not only the size
Taken from GSM commit: c123b59145d3b5aa9ba6f65985037b63bcdf2a67 From: Robert Roth <[email protected]> Gnome bug: http://bugzilla.gnome.org/show_bug.cgi?id=343861
Diffstat (limited to 'src/procman.cpp')
-rw-r--r--src/procman.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/procman.cpp b/src/procman.cpp
index d11c7eb..c19edb7 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -251,6 +251,9 @@ procman_data_new (GSettings *settings)
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");
+
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);
@@ -546,9 +549,13 @@ procman_save_config (ProcData *data)
data->config.width = gdk_window_get_width(gtk_widget_get_window(data->app));
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_int (settings, "current-tab", data->config.current_tab);
}