X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-widget-memory.c;h=4526b4eac136c7f19dba3b658a6930113406c2c3;hp=a5fba5e323e887f8130d4b4656432f29c1020581;hb=HEAD;hpb=0fdbbf3fb1f46a38a41104ae435e7e745fa5177f diff --git a/src/modest-widget-memory.c b/src/modest-widget-memory.c index a5fba5e..4526b4e 100644 --- a/src/modest-widget-memory.c +++ b/src/modest-widget-memory.c @@ -38,7 +38,6 @@ #include #include #include -#include "widgets/modest-main-window.h" #include gchar* @@ -159,15 +158,6 @@ save_settings_window (ModestConf *conf, GtkWindow *win, const gchar *name) modest_conf_set_int (conf, key, width, NULL); g_free (key); - /* Save also the main window style */ - if (MODEST_IS_MAIN_WINDOW (win)) { - ModestMainWindowStyle style = modest_main_window_get_style (MODEST_MAIN_WINDOW (win)); - - key = _modest_widget_memory_get_keyname (name, MODEST_WIDGET_MEMORY_PARAM_WINDOW_STYLE); - modest_conf_set_int (conf, key, style, NULL); - g_free (key); - } - return TRUE; } @@ -200,17 +190,6 @@ restore_settings_window (ModestConf *conf, GtkWindow *win, const gchar *name) gtk_window_set_default_size (win, width, height); #endif - /* Restore also the main window style */ - if (MODEST_IS_MAIN_WINDOW (win)) { - ModestMainWindowStyle style; - - key = _modest_widget_memory_get_keyname (name, MODEST_WIDGET_MEMORY_PARAM_WINDOW_STYLE); - if (modest_conf_key_exists (conf, key, NULL)) { - style = (ModestMainWindowStyle) modest_conf_get_int (conf, key, NULL); - modest_main_window_set_style (MODEST_MAIN_WINDOW (win), style); - g_free (key); - } - } return TRUE; } @@ -395,7 +374,7 @@ restore_settings_header_view (ModestConf *conf, ModestHeaderView *header_view, GList *cols = NULL; GList *colwidths = NULL; GList *colsortables = NULL; - GtkTreeModel *sortable; + GtkTreeModel *sortable, *filter; cursor = data = modest_conf_get_string (conf, key, NULL); while (cursor && sscanf (cursor, "%d:%d:%d ", &col, &width, &sort) == 3) { @@ -422,7 +401,8 @@ restore_settings_header_view (ModestConf *conf, ModestHeaderView *header_view, if (cols) { GList *viewcolumns, *colcursor, *widthcursor; modest_header_view_set_columns (header_view, cols, type); - sortable = gtk_tree_view_get_model (GTK_TREE_VIEW (header_view)); + filter = gtk_tree_view_get_model (GTK_TREE_VIEW (header_view)); + sortable = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (filter)); widthcursor = colwidths; colcursor = viewcolumns = gtk_tree_view_get_columns (GTK_TREE_VIEW(header_view)); @@ -451,16 +431,15 @@ restore_settings_header_view (ModestConf *conf, ModestHeaderView *header_view, } if (sort_colid >= 0) { - GtkTreeModel *sortable = - gtk_tree_model_filter_get_model ( - GTK_TREE_MODEL_FILTER (gtk_tree_view_get_model (GTK_TREE_VIEW (header_view)))); + GtkTreeModel *filter_model = gtk_tree_view_get_model (GTK_TREE_VIEW (header_view)); + GtkTreeModel *sortable = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (filter_model)); if (sort_colid == TNY_GTK_HEADER_LIST_MODEL_FLAGS_COLUMN) modest_header_view_sort_by_column_id (header_view, 0, sort_type); - gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(sortable), + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sortable), sort_colid, sort_type); modest_header_view_sort_by_column_id (header_view, sort_colid, sort_type); - gtk_tree_sortable_sort_column_changed (GTK_TREE_SORTABLE(sortable)); + gtk_tree_sortable_sort_column_changed (GTK_TREE_SORTABLE (sortable)); } g_free (key);