diff options
author | infirit <[email protected]> | 2014-12-18 19:44:39 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-18 19:44:39 +0100 |
commit | 01735cf7050926fb1c1de8adecb391c657ad2204 (patch) | |
tree | bc0dc5a3575654219b8f7727cac028ff52fe2970 /src/procdialogs.cpp | |
parent | 89c2ba95156b8ccd9d7493121f4a691ffbe927c1 (diff) | |
download | mate-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/procdialogs.cpp')
-rw-r--r-- | src/procdialogs.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp index e44fd20..449679d 100644 --- a/src/procdialogs.cpp +++ b/src/procdialogs.cpp @@ -382,6 +382,9 @@ field_toggled (GtkCellRendererToggle *cell, gchar *path_str, gpointer data) GtkTreeIter iter; GtkTreeViewColumn *column; gboolean toggled; + GSettings *settings = g_settings_get_child (ProcData::get_instance()->settings, "proctree"); + gchar *key; + int id; if (!path) return; @@ -394,6 +397,12 @@ field_toggled (GtkCellRendererToggle *cell, gchar *path_str, gpointer data) gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, !toggled, -1); gtk_tree_view_column_set_visible (column, !toggled); + id = gtk_tree_view_column_get_sort_column_id (column); + + key = g_strdup_printf ("col-%d-visible", id); + g_settings_set_boolean (settings, key, !toggled); + g_free (key); + gtk_tree_path_free (path); } |