Refactor adding items to menu in hildon2. Now we have method
[modest] / src / widgets / modest-account-view.c
index a990788..c8ebff7 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include "modest-account-view.h"
 
 #include <modest-account-mgr.h>
 #include <modest-runtime.h>
 #include <modest-signal-mgr.h>
 
-#include <gtk/gtkcellrenderertoggle.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtkliststore.h>
 #include <string.h> /* For strcmp(). */
 #include <modest-account-mgr-helpers.h>
 #include <modest-datetime-formatter.h>
 #ifdef MODEST_TOOLKIT_HILDON2
 #include <hildon/hildon-defines.h>
 #endif
+#ifdef MODEST_USE_LIBTIME
+#include <clockd/libtime.h>
+#endif
 
 /* 'private'/'protected' functions */
 static void modest_account_view_class_init    (ModestAccountViewClass *klass);
@@ -208,6 +208,7 @@ get_last_updated_string(ModestAccountView *self, ModestAccountMgr* account_mgr,
        server_settings = modest_account_settings_get_store_settings (settings);
        store_account_name = modest_server_account_settings_get_account_name (server_settings);
        last_updated = modest_account_mgr_get_last_updated (account_mgr, store_account_name);
+
        g_object_unref (server_settings);
        account_name = modest_account_settings_get_account_name (settings);
        if (!modest_account_mgr_account_is_busy(account_mgr, account_name)) {
@@ -221,7 +222,7 @@ get_last_updated_string(ModestAccountView *self, ModestAccountMgr* account_mgr,
        } else  {
                last_updated_string = _("mcen_va_refreshing");
        }
-       
+
        return last_updated_string;
 }
 
@@ -230,9 +231,9 @@ update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view)
 {
        GSList *account_names, *cursor;
        GtkListStore *model;
-               
+
        model = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(view)));
-       
+
        /* Get the ID of the currently-selected account,
         * so we can select it again after rebuilding the list.
         * Note that the name doesn't change even when the display name changes.
@@ -606,10 +607,6 @@ init_view (ModestAccountView *self)
         *
         * djcb: indeed, they have been removed for post-bora, i added the ifdefs...
                 */
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
-       g_object_set(G_OBJECT(self), "allow-checkbox-mode", FALSE, NULL);
-       g_object_set(G_OBJECT(toggle_renderer), "checkbox-mode", FALSE, NULL);
-#endif /* MODEST_HAVE_HILDON0_WIDGETS */
 
        priv->sig_handlers = 
                modest_signal_mgr_connect (priv->sig_handlers,