summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/procman.cpp3
-rw-r--r--src/proctable.cpp13
2 files changed, 13 insertions, 3 deletions
diff --git a/src/procman.cpp b/src/procman.cpp
index 6e99dc8..6f4057e 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -518,9 +518,6 @@ procman_save_config (ProcData *data)
g_assert(data);
- procman_save_tree_state (data->settings, data->tree, "proctree");
- procman_save_tree_state (data->settings, data->disk_list, "disktreenew");
-
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);
diff --git a/src/proctable.cpp b/src/proctable.cpp
index 686ca45..6824124 100644
--- a/src/proctable.cpp
+++ b/src/proctable.cpp
@@ -95,6 +95,16 @@ cb_columns_changed(GtkTreeView *treeview, gpointer user_data)
"proctree");
}
+static void
+cb_sort_changed (GtkTreeSortable *model, gpointer user_data)
+{
+ ProcData * const procdata = static_cast<ProcData*>(user_data);
+
+ procman_save_tree_state (procdata->settings,
+ GTK_WIDGET (procdata->tree),
+ "proctree");
+}
+
static GtkTreeViewColumn*
my_gtk_tree_view_get_column_with_sort_column_id(GtkTreeView *treeview, int id)
@@ -436,6 +446,9 @@ proctable_new (ProcData * const procdata)
g_signal_connect (G_OBJECT(proctree), "columns-changed",
G_CALLBACK(cb_columns_changed), procdata);
+ g_signal_connect (G_OBJECT (model), "sort-column-changed",
+ G_CALLBACK (cb_sort_changed), procdata);
+
return scrolled;
}