Add emision of signals for account created and removed through dbus
[modest] / src / maemo / modest-main-window.c
index e63d715..d6bdc1f 100644 (file)
@@ -64,6 +64,9 @@
 #include "maemo/modest-osso-state-saving.h"
 #include "modest-text-utils.h"
 #include "modest-signal-mgr.h"
+#ifdef MODEST_USE_LIBTIME
+#include <clockd/libtime.h>
+#endif
 
 #define MODEST_MAIN_WINDOW_ACTION_GROUP_ADDITIONS "ModestMainWindowActionAdditions"
 
@@ -1810,14 +1813,12 @@ static gchar *
 get_gray_color_markup (GtkWidget *styled_widget)
 {
        gchar *gray_color_markup = NULL;
-#ifndef MODEST_HAVE_HILDON0_WIDGETS
        /* Obtain the secondary text color. We need a realized widget, that's why 
           we get styled_widget from outside */
        GdkColor color;
        if (gtk_style_lookup_color (styled_widget->style, "SecondaryTextColor", &color)) 
                gray_color_markup = modest_text_utils_get_color_string (&color);
-#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
-       
+
        if (!gray_color_markup) 
                gray_color_markup = g_strdup ("#BBBBBB");
 
@@ -2028,6 +2029,16 @@ create_details_widget (GtkWidget *styled_widget, TnyAccount *account)
                last_updated = modest_account_mgr_get_last_updated (modest_runtime_get_account_mgr (), 
                                                                    tny_account_get_id (account));
 
+#ifdef MODEST_USE_LIBTIME
+               /* If we use libtime, we are storing the time in UTC so we have to convert to currently
+                * selected time */
+               time_t now;
+               struct tm *localtime_tm;
+               time (&now);
+               localtime_tm = localtime (&now);
+               last_updated -= time_get_utc_offset (localtime_tm->tm_zone);
+#endif
+
                if (last_updated > 0) 
                        last_updated_string = modest_text_utils_get_display_date(last_updated);
                else
@@ -2765,7 +2776,8 @@ on_zoom_minus_plus_not_implemented (ModestWindow *window)
 {
        g_return_val_if_fail (MODEST_IS_MAIN_WINDOW (window), FALSE);
 
-       hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_cannot_zoom_here"));
+       hildon_banner_show_information (NULL, NULL, 
+                                       _CS("ckct_ib_cannot_zoom_here"));
        return FALSE;
 
 }