Save sort column/type in config

(Old svn revision: 4755)
This commit is contained in:
Mike Massonnet
2008-05-09 12:22:54 +00:00
parent 8d28b1969f
commit 8f6ca38ea2
3 changed files with 11 additions and 1 deletions

View File

@@ -196,6 +196,9 @@ void load_config(void)
show_other_tasks = xfce_rc_read_bool_entry(rc_file, "show_other_tasks", FALSE);
show_cached_as_free = xfce_rc_read_bool_entry(rc_file, "show_cached_as_free", TRUE);
sort_column = xfce_rc_read_int_entry(rc_file, "sort_column", COLUMN_PID);
sort_type = xfce_rc_read_int_entry(rc_file, "sort_type", GTK_SORT_ASCENDING);
full_view = xfce_rc_read_bool_entry(rc_file, "full_view", FALSE);
win_width = xfce_rc_read_int_entry(rc_file, "win_width", 500);
@@ -215,6 +218,10 @@ void save_config(void)
xfce_rc_write_bool_entry(rc_file, "show_other_tasks", show_other_tasks);
xfce_rc_write_bool_entry(rc_file, "show_cached_as_free", show_cached_as_free);
gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(list_store), &sort_column, &sort_type);
xfce_rc_write_int_entry(rc_file, "sort_column", sort_column);
xfce_rc_write_int_entry(rc_file, "sort_type", sort_type);
xfce_rc_write_bool_entry(rc_file, "full_view", full_view);
gtk_window_get_size(GTK_WINDOW (main_window), (gint *) &win_width, (gint *) &win_height);

View File

@@ -87,7 +87,7 @@ GtkWidget* create_main_window (void)
gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(list_store));
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(list_store), 1, GTK_SORT_ASCENDING);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(list_store), sort_column, sort_type);
bbox1 = gtk_hbutton_box_new();
gtk_box_pack_start(GTK_BOX(vbox1), bbox1, FALSE, TRUE, 0);

View File

@@ -71,6 +71,9 @@ gboolean show_other_tasks;
gboolean show_cached_as_free; /* Show memory used Cache as free memory */
guint sort_column;
guint sort_type;
gboolean full_view;
guint win_width;