2007-05-08 Murray Cumming <murrayc@murrayc.com>
[modest] / src / maemo / modest-msg-view-window.c
index 5c4cfdf..2f9dc9b 100644 (file)
@@ -178,6 +178,23 @@ modest_msg_view_window_get_type (void)
 }
 
 static void
+save_state (ModestWindow *self)
+{
+       modest_widget_memory_save (modest_runtime_get_conf (),
+                                  G_OBJECT(self), 
+                                  MODEST_CONF_MSG_VIEW_WINDOW_KEY);
+}
+
+
+static void
+restore_settings (ModestMsgViewWindow *self)
+{
+       modest_widget_memory_restore (modest_runtime_get_conf (),
+                                     G_OBJECT(self), 
+                                     MODEST_CONF_MSG_VIEW_WINDOW_KEY);
+}
+
+static void
 modest_msg_view_window_class_init (ModestMsgViewWindowClass *klass)
 {
        GObjectClass *gobject_class;
@@ -195,6 +212,8 @@ modest_msg_view_window_class_init (ModestMsgViewWindowClass *klass)
        modest_window_class->show_toolbar_func = modest_msg_view_window_show_toolbar;
 
        g_type_class_add_private (gobject_class, sizeof(ModestMsgViewWindowPrivate));
+
+       modest_window_class->save_state_func = save_state;
 }
 
 static void
@@ -211,23 +230,6 @@ modest_msg_view_window_init (ModestMsgViewWindow *obj)
 
 }
 
-static void
-save_settings (ModestMsgViewWindow *self)
-{
-       modest_widget_memory_save (modest_runtime_get_conf (),
-                                  G_OBJECT(self), 
-                                  MODEST_CONF_MSG_VIEW_WINDOW_KEY);
-}
-
-
-static void
-restore_settings (ModestMsgViewWindow *self)
-{
-       modest_widget_memory_restore (modest_runtime_get_conf (),
-                                     G_OBJECT(self), 
-                                     MODEST_CONF_MSG_VIEW_WINDOW_KEY);
-}
-
 
 static void 
 set_toolbar_mode (ModestMsgViewWindow *self, 
@@ -413,7 +415,7 @@ modest_msg_view_window_finalize (GObject *obj)
 static gboolean
 on_delete_event (GtkWidget *widget, GdkEvent *event, ModestMsgViewWindow *self)
 {
-       save_settings (self);
+       modest_window_save_state (MODEST_WINDOW (self));
        return FALSE;
 }
 
@@ -1181,7 +1183,7 @@ modest_msg_view_window_clipboard_owner_change (GtkClipboard *clipboard,
        parent_priv = MODEST_WINDOW_GET_PRIVATE (window);
        selection = gtk_clipboard_wait_for_text (clipboard);
 
-       g_message ("SELECTION %s", selection);
+       /* g_message ("SELECTION %s", selection); */
        is_address = ((selection != NULL) && (modest_text_utils_validate_recipient (selection)));
        g_free (selection);