diff options
author | monsta <[email protected]> | 2016-03-01 15:12:49 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-03-01 15:12:49 +0300 |
commit | 08a5f99c1d53e27f6517c129c79fe4e7b887a843 (patch) | |
tree | 899981822d6d2f763be51a88e8a1a2452f266212 /src | |
parent | dc2c4085936c4768bbfa03260dfd93ebaa3f8fad (diff) | |
download | mate-system-monitor-08a5f99c1d53e27f6517c129c79fe4e7b887a843.tar.bz2 mate-system-monitor-08a5f99c1d53e27f6517c129c79fe4e7b887a843.tar.xz |
process table: replace useless callback with single function
all columns except for the first one were already made reorderable,
so there's no need for this callback with a loop. just make the first
column reorderable too and we're done.
from
https://git.gnome.org/browse/gnome-system-monitor/commit/?id=3bd1b01b5e983379e69c02613280a218e8873914
Diffstat (limited to 'src')
-rw-r--r-- | src/proctable.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/proctable.cpp b/src/proctable.cpp index cf8fdf3..9eb93ba 100644 --- a/src/proctable.cpp +++ b/src/proctable.cpp @@ -71,24 +71,6 @@ ProcInfo* ProcInfo::find(pid_t pid) } - -static void -set_proctree_reorderable(ProcData *procdata) -{ - GList *columns, *col; - GtkTreeView *proctree; - - proctree = GTK_TREE_VIEW(procdata->tree); - - columns = gtk_tree_view_get_columns (proctree); - - for(col = columns; col; col = col->next) - gtk_tree_view_column_set_reorderable(static_cast<GtkTreeViewColumn*>(col->data), TRUE); - - g_list_free(columns); -} - - static void cb_columns_changed(GtkTreeView *treeview, gpointer user_data) { @@ -355,6 +337,7 @@ proctable_new (ProcData * const procdata) gtk_tree_view_column_set_resizable (column, TRUE); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_min_width (column, 20); + gtk_tree_view_column_set_reorderable (column, TRUE); g_signal_connect(G_OBJECT(column), "notify::fixed-width", G_CALLBACK(cb_proctable_column_resized), procdata->settings); gtk_tree_view_append_column (GTK_TREE_VIEW (proctree), column); gtk_tree_view_set_expander_column (GTK_TREE_VIEW (proctree), column); @@ -482,8 +465,6 @@ proctable_new (ProcData * const procdata) procdata->tree = proctree; - set_proctree_reorderable(procdata); - procman_get_tree_state (procdata->settings, proctree, "proctree"); /* Override column settings by hiding this column if it's meaningless: */ |