Use set_label api for incoming server captions
[modest] / src / hildon2 / modest-platform.c
index 2f5ea4c..890233d 100644 (file)
@@ -43,6 +43,7 @@
 #include <tny-maemo-conic-device.h>
 #include <tny-simple-list.h>
 #include <tny-folder.h>
+#include <tny-account-store-view.h>
 #include <gtk/gtkicontheme.h>
 #include <gtk/gtkmenuitem.h>
 #include <gtk/gtkmain.h>
@@ -92,6 +93,7 @@
 #define COMMON_FOLDER_DIALOG_ENTRY "entry"
 #define COMMON_FOLDER_DIALOG_ACCOUNT_PICKER "account-picker"
 #define FOLDER_PICKER_CURRENT_FOLDER "current-folder"
+#define MODEST_ALARMD_APPID PACKAGE_NAME
 
 
 static void _modest_platform_play_email_tone (void);
@@ -520,7 +522,7 @@ modest_platform_get_icon (const gchar *name, guint icon_size)
         */
        if (!name || strlen(name) == 0)
                return NULL;
-       
+
        current_theme = gtk_icon_theme_get_default ();
        pixbuf = gtk_icon_theme_load_icon (current_theme, name, icon_size,
                                           GTK_ICON_LOOKUP_NO_SVG,
@@ -694,7 +696,8 @@ folder_chooser_dialog_run (ModestFolderView *original)
        modest_folder_view_set_filter (MODEST_FOLDER_VIEW (folder_view),
                                       MODEST_FOLDER_VIEW_FILTER_CAN_HAVE_FOLDERS);
 
-       modest_folder_view_copy_model (MODEST_FOLDER_VIEW (original), MODEST_FOLDER_VIEW (folder_view));
+       modest_folder_view_copy_model (MODEST_FOLDER_VIEW (original), 
+                                      MODEST_FOLDER_VIEW (folder_view));
 
        visible_id = 
                modest_folder_view_get_account_id_of_visible_server_account (MODEST_FOLDER_VIEW(original));
@@ -1324,7 +1327,7 @@ modest_platform_set_update_interval (guint minutes)
        /* Delete any existing alarm,
         * because we will replace it: */
        if (alarm_cookie) {
-               if (alarmd_event_del(alarm_cookie) != 1)
+               if (alarmd_event_del(alarm_cookie) != 0)
                        g_warning ("%s: alarm %d was not on the queue", __FUNCTION__, (int)alarm_cookie);
                alarm_cookie = 0;
                modest_conf_set_int (conf, MODEST_CONF_ALARM_ID, 0, NULL);
@@ -1341,6 +1344,7 @@ modest_platform_set_update_interval (guint minutes)
        alarm_event_t *event = alarm_event_create ();
        alarm_event_add_actions (event, 1);
        alarm_action_t *action = alarm_event_get_action (event, 0);
+       alarm_event_set_alarm_appid (event, MODEST_ALARMD_APPID);
        event->alarm_time = minutes * 60; /* seconds */
        
        /* Set recurrence every few minutes: */
@@ -1354,7 +1358,7 @@ modest_platform_set_update_interval (guint minutes)
        action->dbus_interface = g_strdup (MODEST_DBUS_IFACE);
        action->dbus_service = g_strdup (MODEST_DBUS_SERVICE);
        action->dbus_name = g_strdup (MODEST_DBUS_METHOD_SEND_RECEIVE);
-       action->flags = ALARM_ACTION_TYPE_DBUS | ALARM_ACTION_DBUS_USE_ACTIVATION;
+       action->flags = ALARM_ACTION_WHEN_TRIGGERED | ALARM_ACTION_TYPE_DBUS | ALARM_ACTION_DBUS_USE_ACTIVATION;
 
        /* Use ALARM_EVENT_NO_DIALOG: Otherwise, a dialog will be shown if 
         * exec_name or dbus_path is NULL, even though we have specified no dialog text.
@@ -2434,6 +2438,9 @@ modest_platform_create_move_to_dialog (GtkWindow *parent_window,
                           G_CALLBACK (on_move_to_dialog_folder_activated),
                           dialog);
 
+       tny_account_store_view_set_account_store (TNY_ACCOUNT_STORE_VIEW (*folder_view),
+                                                 (TnyAccountStore *) modest_runtime_get_account_store ());
+
        /* Create pannable and add it to the dialog */
        folder_view_container = hildon_pannable_area_new ();
        gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), folder_view_container);