Revert "Save screenshot on closing modest (fixes NB#139348)."
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 16 Nov 2009 09:29:59 +0000 (10:29 +0100)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 16 Nov 2009 09:29:59 +0000 (10:29 +0100)
This won't go in Modest 3.1

This reverts commit c01765104ff23f3e86ff8ffa2be05320e23f49ee.

src/hildon2/modest-accounts-window.c
src/widgets/modest-account-view.c
src/widgets/modest-account-view.h

index c7f65e5..ef34a4d 100644 (file)
@@ -84,9 +84,6 @@ static void row_count_changed (ModestAccountsWindow *self);
 static gboolean on_key_press(GtkWidget *widget,
                                GdkEventKey *event,
                                gpointer user_data);
-static gboolean on_delete_event (GtkWidget *widget,
-                                GdkEvent *event,
-                                gpointer userdata);
 
 typedef struct _ModestAccountsWindowPrivate ModestAccountsWindowPrivate;
 struct _ModestAccountsWindowPrivate {
@@ -374,8 +371,6 @@ modest_accounts_window_new (void)
        g_signal_connect (G_OBJECT (self), "map-event",
                          G_CALLBACK (_modest_accounts_window_map_event),
                          G_OBJECT (self));
-       g_signal_connect (G_OBJECT (self), "delete-event",
-                         G_CALLBACK (on_delete_event), self);
        update_progress_hint (MODEST_ACCOUNTS_WINDOW (self));
 
        row_count_changed (MODEST_ACCOUNTS_WINDOW (self));
@@ -702,25 +697,3 @@ on_key_press(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 
        return FALSE;
 }
-
-static gboolean
-on_delete_event (GtkWidget *widget,
-                GdkEvent *event,
-                gpointer userdata)
-{
-       ModestAccountsWindowPrivate *priv;
-
-       priv = MODEST_ACCOUNTS_WINDOW_GET_PRIVATE (widget);
-
-       modest_account_view_set_show_last_update (MODEST_ACCOUNT_VIEW (priv->account_view), FALSE);
-
-       gtk_widget_queue_resize (widget);
-
-       gdk_window_process_updates (priv->account_view->window, TRUE);
-       hildon_gtk_window_take_screenshot (GTK_WINDOW (widget), TRUE);
-
-       modest_account_view_set_show_last_update (MODEST_ACCOUNT_VIEW (priv->account_view), TRUE);
-
-       return FALSE;
-
-}
index fd9f115..b5bed2c 100644 (file)
@@ -74,7 +74,7 @@ static void on_account_updated (ModestAccountMgr* mgr, gchar* account_name,
                     gpointer user_data);
 static void update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view);
 static void on_notify_style (GObject *obj, GParamSpec *spec, gpointer userdata);
-static void update_display_mode (ModestAccountView *self);
+static void update_picker_mode (ModestAccountView *self);
 
 typedef enum {
        MODEST_ACCOUNT_VIEW_NAME_COLUMN,
@@ -93,7 +93,6 @@ struct _ModestAccountViewPrivate {
 
        ModestDatetimeFormatter *datetime_formatter;
        gboolean picker_mode;
-       gboolean show_last_updated;
 
        /* Signal handlers */
        GSList *sig_handlers;
@@ -161,7 +160,6 @@ modest_account_view_init (ModestAccountView *obj)
 
        priv->datetime_formatter = modest_datetime_formatter_new ();
        priv->picker_mode = FALSE;
-       priv->show_last_updated = TRUE;
        g_signal_connect (G_OBJECT (priv->datetime_formatter), "format-changed", 
                          G_CALLBACK (datetime_format_changed), (gpointer) obj);
 #ifdef MODEST_TOOLKIT_HILDON2
@@ -236,9 +234,7 @@ update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view)
 {
        GSList *account_names, *cursor;
        GtkListStore *model;
-       ModestAccountViewPrivate *priv;
-       
-       priv = MODEST_ACCOUNT_VIEW_GET_PRIVATE(view);
+
        model = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(view)));
 
        /* Get the ID of the currently-selected account,
@@ -290,13 +286,9 @@ update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view)
 #ifdef MODEST_TOOLKIT_HILDON2
                                gchar *last_updated_hildon2;
 
-                               if (priv->show_last_updated) {
-                                       last_updated_hildon2 = g_strconcat (_("mcen_ti_lastupdated"), "\n", 
-                                                                           last_updated_string,
-                                                                           NULL);
-                               } else {
-                                       last_updated_hildon2 = g_strconcat (_("mcen_ti_lastupdated"), "\n", NULL);
-                               }
+                               last_updated_hildon2 = g_strconcat (_("mcen_ti_lastupdated"), "\n", 
+                                                                  last_updated_string,
+                                                                  NULL);
 #endif
                                protocol_registry = modest_runtime_get_protocol_registry ();
                                protocol_type = modest_server_account_settings_get_protocol (store_settings);
@@ -666,7 +658,7 @@ init_view (ModestAccountView *self)
        gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(self), TRUE);
 #endif
 
-       update_display_mode (self);
+       update_picker_mode (self);
 
        priv->sig_handlers = 
                modest_signal_mgr_connect (priv->sig_handlers, 
@@ -894,7 +886,7 @@ on_notify_style (GObject *obj, GParamSpec *spec, gpointer userdata)
 }
 
 static void
-update_display_mode (ModestAccountView *self)
+update_picker_mode (ModestAccountView *self)
 {
        ModestAccountViewPrivate *priv;
        GtkTreeViewColumn *column;
@@ -928,7 +920,7 @@ modest_account_view_set_picker_mode (ModestAccountView *self, gboolean enable)
        priv = MODEST_ACCOUNT_VIEW_GET_PRIVATE(self);
 
        priv->picker_mode = enable;
-       update_display_mode (self);
+       update_picker_mode (self);
 }
 
 gboolean 
@@ -941,27 +933,3 @@ modest_account_view_get_picker_mode (ModestAccountView *self)
 
        return priv->picker_mode;
 }
-
-void
-modest_account_view_set_show_last_update (ModestAccountView *self, 
-                                         gboolean show)
-{
-       ModestAccountViewPrivate *priv;
-       
-       g_return_if_fail (MODEST_IS_ACCOUNT_VIEW (self));
-       priv = MODEST_ACCOUNT_VIEW_GET_PRIVATE(self);
-
-       priv->show_last_updated = show;
-       update_account_view (priv->account_mgr, self);
-}
-
-gboolean 
-modest_account_view_get_show_last_updated (ModestAccountView *self)
-{
-       ModestAccountViewPrivate *priv;
-       
-       g_return_val_if_fail (MODEST_IS_ACCOUNT_VIEW (self), FALSE);
-       priv = MODEST_ACCOUNT_VIEW_GET_PRIVATE(self);
-
-       return priv->show_last_updated;
-}
index b354469..31a7674 100644 (file)
@@ -118,25 +118,6 @@ void modest_account_view_set_picker_mode (ModestAccountView *self, gboolean enab
  */
 gboolean modest_account_view_get_picker_mode (ModestAccountView *self);
 
-/**
- * modest_account_view_set_show_last_update:
- * @self: a #ModestAccountView
- * @show: a #gboolean
- *
- * show/hide the last update column
- */
-void modest_account_view_set_show_last_update (ModestAccountView *self, gboolean show);
-
-/**
- * modest_account_view_get_show_last_update:
- * @self: a #ModestAccountView
- *
- * tell if it's showing  the last update column
- *
- * Returns: a #gboolean
- */
-gboolean modest_account_view_get_show_last_update (ModestAccountView *self);
-
 G_END_DECLS
 
 #endif /* __MODEST_ACCOUNT_VIEW_H__ */