summaryrefslogtreecommitdiff
path: root/src/procman.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 19:44:39 +0100
committerinfirit <[email protected]>2014-12-18 19:44:39 +0100
commit01735cf7050926fb1c1de8adecb391c657ad2204 (patch)
treebc0dc5a3575654219b8f7727cac028ff52fe2970 /src/procman.cpp
parent89c2ba95156b8ccd9d7493121f4a691ffbe927c1 (diff)
downloadmate-system-monitor-01735cf7050926fb1c1de8adecb391c657ad2204.tar.bz2
mate-system-monitor-01735cf7050926fb1c1de8adecb391c657ad2204.tar.xz
Save column info on change instead of quit
Taken from GSM commit: bc2a8c221604fe335b690ba7d180022bf0430fff From: Robert Roth <[email protected]> Gnome bug: http://bugzilla.gnome.org/show_bug.cgi?id=649398
Diffstat (limited to 'src/procman.cpp')
-rw-r--r--src/procman.cpp29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/procman.cpp b/src/procman.cpp
index c19edb7..4e8d2ce 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -470,7 +470,7 @@ void
procman_save_tree_state (GSettings *settings, GtkWidget *tree, const gchar *child_schema)
{
GtkTreeModel *model;
- GList *it, *columns;
+ GList *columns;
gint sort_col;
GtkSortType order;
@@ -488,31 +488,6 @@ procman_save_tree_state (GSettings *settings, GtkWidget *tree, const gchar *chil
columns = gtk_tree_view_get_columns (GTK_TREE_VIEW (tree));
- if(!g_strcmp0(child_schema, "proctree"))
- {
- for(it = columns; it; it = it->next)
- {
- GtkTreeViewColumn *column;
- gboolean visible;
- gint width;
- gchar *key;
- int id;
-
- column = static_cast<GtkTreeViewColumn*>(it->data);
- id = gtk_tree_view_column_get_sort_column_id (column);
- visible = gtk_tree_view_column_get_visible (column);
- width = gtk_tree_view_column_get_width (column);
-
- key = g_strdup_printf ("col-%d-width", id);
- g_settings_set_int (pt_settings, key, width);
- g_free (key);
-
- key = g_strdup_printf ("col-%d-visible", id);
- g_settings_set_boolean (pt_settings, key, visible);
- g_free (key);
- }
- }
-
if(!g_strcmp0(child_schema, "proctree") || !g_strcmp0(child_schema, "disktreenew"))
{
GSList *order;
@@ -557,6 +532,8 @@ procman_save_config (ProcData *data)
g_settings_set_int (settings, "y-position", data->config.ypos);
g_settings_set_int (settings, "current-tab", data->config.current_tab);
+
+ g_settings_sync ();
}
static guint32