* [gtk|maemo]/modest-main-window.c:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 3 Dec 2006 19:59:41 +0000 (19:59 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Sun, 3 Dec 2006 19:59:41 +0000 (19:59 +0000)
  - update to new ModestHeaderView api
  - use the widget memory feature

pmo-trunk-r519

src/gtk/modest-main-window.c
src/maemo/modest-main-window.c

index 3f943ba..5f07051 100644 (file)
@@ -446,7 +446,7 @@ static ModestHeaderView*
 header_view_new (ModestMainWindow *self)
 {
        int i;
-       GSList *columns = NULL;
+       GList *columns = NULL;
        ModestHeaderView *header_view;
        ModestMainWindowPrivate *priv;
        ModestHeaderViewColumn cols[] = {
@@ -460,11 +460,11 @@ header_view_new (ModestMainWindow *self)
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
        
        for (i = 0 ; i != sizeof(cols) / sizeof(ModestHeaderViewColumn); ++i)
-               columns = g_slist_append (columns, GINT_TO_POINTER(cols[i]));
+               columns = g_list_append (columns, GINT_TO_POINTER(cols[i]));
 
        header_view = modest_widget_factory_get_header_view (priv->widget_factory);
        modest_header_view_set_columns (header_view, columns);
-       g_slist_free (columns);
+       g_list_free (columns);
 
        return header_view;
 }
@@ -576,6 +576,9 @@ restore_sizes (ModestMainWindow *self)
                                               "modest-msg-paned");
        modest_widget_memory_restore_settings (conf, GTK_WIDGET(priv->main_paned),
                                               "modest-main-paned");
+       modest_widget_memory_restore_settings (conf, GTK_WIDGET(priv->header_view),
+                                              "modest-header-view");
+
 }
 
 
@@ -596,6 +599,8 @@ save_sizes (ModestMainWindow *self)
                                            "modest-msg-paned");
        modest_widget_memory_save_settings (conf, GTK_WIDGET(priv->main_paned),
                                            "modest-main-paned");
+       modest_widget_memory_save_settings (conf, GTK_WIDGET(priv->header_view),
+                                           "modest-header-view");
 }
 
 static GtkWidget*
index 712245b..8658f96 100644 (file)
@@ -413,29 +413,30 @@ static ModestHeaderView*
 header_view_new (ModestMainWindow *self)
 {
        int i;
-       GSList *columns = NULL;
+       GList *columns = NULL;
        ModestHeaderView *header_view;
        ModestMainWindowPrivate *priv;
        ModestHeaderViewColumn cols[] = {
                MODEST_HEADER_VIEW_COLUMN_MSGTYPE,
                MODEST_HEADER_VIEW_COLUMN_ATTACH,
-/*             MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER, */
-               MODEST_HEADER_VIEW_COLUMN_FROM,
-               MODEST_HEADER_VIEW_COLUMN_SUBJECT,
-               MODEST_HEADER_VIEW_COLUMN_RECEIVED_DATE
+               MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER
+//             MODEST_HEADER_VIEW_COLUMN_FROM,
+//             MODEST_HEADER_VIEW_COLUMN_SUBJECT,
+//             MODEST_HEADER_VIEW_COLUMN_RECEIVED_DATE
        };
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
        
        for (i = 0 ; i != sizeof(cols) / sizeof(ModestHeaderViewColumn); ++i)
-               columns = g_slist_append (columns, GINT_TO_POINTER(cols[i]));
+               columns = g_list_append (columns, GINT_TO_POINTER(cols[i]));
 
        header_view = modest_widget_factory_get_header_view (priv->widget_factory);
        modest_header_view_set_columns (header_view, columns);
-       g_slist_free (columns);
+       g_list_free (columns);
 
        return header_view;
 }
 
+
 static void
 on_toolbar_button_clicked (ModestToolbar *toolbar, ModestToolbarButton button_id,
                           ModestMainWindow *self)