Save sort column/type in config
(Old svn revision: 4755)
This commit is contained in:
@@ -196,6 +196,9 @@ void load_config(void)
|
|||||||
show_other_tasks = xfce_rc_read_bool_entry(rc_file, "show_other_tasks", FALSE);
|
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);
|
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);
|
full_view = xfce_rc_read_bool_entry(rc_file, "full_view", FALSE);
|
||||||
|
|
||||||
win_width = xfce_rc_read_int_entry(rc_file, "win_width", 500);
|
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_other_tasks", show_other_tasks);
|
||||||
xfce_rc_write_bool_entry(rc_file, "show_cached_as_free", show_cached_as_free);
|
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);
|
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);
|
gtk_window_get_size(GTK_WINDOW (main_window), (gint *) &win_width, (gint *) &win_height);
|
||||||
|
|||||||
@@ -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_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();
|
bbox1 = gtk_hbutton_box_new();
|
||||||
gtk_box_pack_start(GTK_BOX(vbox1), bbox1, FALSE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(vbox1), bbox1, FALSE, TRUE, 0);
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ gboolean show_other_tasks;
|
|||||||
|
|
||||||
gboolean show_cached_as_free; /* Show memory used Cache as free memory */
|
gboolean show_cached_as_free; /* Show memory used Cache as free memory */
|
||||||
|
|
||||||
|
guint sort_column;
|
||||||
|
guint sort_type;
|
||||||
|
|
||||||
gboolean full_view;
|
gboolean full_view;
|
||||||
|
|
||||||
guint win_width;
|
guint win_width;
|
||||||
|
|||||||
Reference in New Issue
Block a user