#include <modest-defs.h>
#include <modest-scrollable.h>
#include <modest-runtime.h>
-#include <modest-main-window.h>
#include <modest-header-view.h>
#include "modest-hildon2-global-settings-dialog.h"
#include "modest-widget-memory.h"
#include <osso-mem.h>
#include "hildon2/modest-hildon2-details-dialog.h"
#include "widgets/modest-window-mgr.h"
+#include "widgets/modest-msg-view-window.h"
#ifdef MODEST_USE_PROFILE
#include <profiled/keys_nokia.h>
#include <profiled/libprofile.h>
hildon_banner_show_information (gtk_widget_get_parent (GTK_WIDGET (dialog)),
NULL, _CS_FOLDER_ALREADY_EXISTS);
/* Select the text */
- gtk_entry_select_region (GTK_ENTRY (entry), 0, -1);
+ gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
gtk_widget_grab_focus (entry);
/* Do not close the dialog */
g_signal_stop_emission_by_name (dialog, "response");
scrollable = modest_toolkit_factory_create_scrollable (modest_runtime_get_toolkit_factory ());
folder_view = modest_platform_create_folder_view (NULL);
- gtk_window_set_title (GTK_WINDOW (userdata.dialog), _FM_CHANGE_FOLDER("ckdg_ti_change_folder"));
+ gtk_window_set_title (GTK_WINDOW (userdata.dialog), _FM_CHANGE_FOLDER);
modest_folder_view_copy_model (MODEST_FOLDER_VIEW (original),
MODEST_FOLDER_VIEW (folder_view));
gtk_entry_set_width_chars (GTK_ENTRY (entry),
MAX (g_utf8_strlen (gtk_entry_get_text (GTK_ENTRY (entry)), -1),
g_utf8_strlen (_FM_NEW_FOLDER_NAME_STUB, -1)));
- gtk_entry_select_region (GTK_ENTRY (entry), 0, -1);
+ gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
}
if (show_parent) {
gchar *from;
TnyAccountStore *acc_store;
TnyAccount *account;
+ gchar *acc_name;
data = (ModestMsgNotificationData *) URI_list->data;
/* Set the account of the headers */
acc_store = (TnyAccountStore *) modest_runtime_get_account_store ();
account = tny_account_store_find_account (acc_store, data->uri);
+ acc_name = NULL;
if (account) {
- const gchar *acc_name;
- acc_name =
- modest_tny_account_get_parent_modest_account_name_for_server_account (account);
+ acc_name = g_strdup (modest_tny_account_get_parent_modest_account_name_for_server_account (account));
notify_notification_set_hint_string(NOTIFY_NOTIFICATION (notification),
"email-account",
acc_name);
GSList *notifications_list = NULL;
/* Get previous notifications ids */
- notifications_list = modest_conf_get_list (modest_runtime_get_conf (),
- MODEST_CONF_NOTIFICATION_IDS,
- MODEST_CONF_VALUE_INT, NULL);
+ if (acc_name) {
+ notifications_list = modest_account_mgr_get_list (modest_runtime_get_account_mgr (), acc_name,
+ MODEST_ACCOUNT_NOTIFICATION_IDS,
+ MODEST_CONF_VALUE_INT, FALSE);
+ }
/* Save id in the list */
g_object_get(G_OBJECT (notification), "id", ¬if_id, NULL);
not to store the list in gconf */
/* Save the ids */
- modest_conf_set_list (modest_runtime_get_conf (), MODEST_CONF_NOTIFICATION_IDS,
- notifications_list, MODEST_CONF_VALUE_INT, NULL);
-
+ if (acc_name)
+ modest_account_mgr_set_list (modest_runtime_get_account_mgr (), acc_name,
+ MODEST_ACCOUNT_NOTIFICATION_IDS,
+ notifications_list, MODEST_CONF_VALUE_INT, FALSE);
+
g_slist_free (notifications_list);
} else {
g_warning ("Failed to send notification");
}
+ g_free (acc_name);
#endif /*MODEST_HAVE_HILDON_NOTIFY*/
}
void
-modest_platform_remove_new_mail_notifications (gboolean only_visuals)
+modest_platform_remove_new_mail_notifications (gboolean only_visuals, const gchar *acc_name)
{
if (only_visuals) {
#ifdef MODEST_HAVE_MCE
GSList *notif_list = NULL;
/* Get previous notifications ids */
- notif_list = modest_conf_get_list (modest_runtime_get_conf (),
- MODEST_CONF_NOTIFICATION_IDS,
- MODEST_CONF_VALUE_INT, NULL);
+ notif_list = modest_account_mgr_get_list (modest_runtime_get_account_mgr (),
+ acc_name,
+ MODEST_ACCOUNT_NOTIFICATION_IDS,
+ MODEST_CONF_VALUE_INT, FALSE);
while (notif_list) {
gint notif_id;
}
/* Save the ids */
- modest_conf_set_list (modest_runtime_get_conf (), MODEST_CONF_NOTIFICATION_IDS,
- notif_list, MODEST_CONF_VALUE_INT, NULL);
+ if (notif_list) {
+ modest_account_mgr_set_list (modest_runtime_get_account_mgr (), acc_name,
+ MODEST_ACCOUNT_NOTIFICATION_IDS,
+ notif_list, MODEST_CONF_VALUE_INT, FALSE);
- g_slist_free (notif_list);
+ g_slist_free (notif_list);
+ }
#endif /* MODEST_HAVE_HILDON_NOTIFY */
}
/***************/
typedef struct {
- GtkWindow *parent_window;
+ ModestWindow *parent_window;
ModestConnectedPerformer callback;
TnyAccount *account;
gpointer user_data;
}
void
-modest_platform_connect_and_perform (GtkWindow *parent_window,
+modest_platform_connect_and_perform (ModestWindow *parent_window,
gboolean force,
TnyAccount *account,
ModestConnectedPerformer callback,
info->account = NULL;
if (parent_window)
- info->parent_window = (GtkWindow *) g_object_ref (parent_window);
+ info->parent_window = (ModestWindow *) g_object_ref (parent_window);
else
info->parent_window = NULL;
info->user_data = user_data;
info->account = TNY_ACCOUNT (g_object_ref (account));
if (parent_window)
- info->parent_window = (GtkWindow *) g_object_ref (parent_window);
+ info->parent_window = (ModestWindow *) g_object_ref (parent_window);
else
info->parent_window = NULL;
}
void
-modest_platform_connect_if_remote_and_perform (GtkWindow *parent_window,
+modest_platform_connect_if_remote_and_perform (ModestWindow *parent_window,
gboolean force,
TnyFolderStore *folder_store,
ModestConnectedPerformer callback,
static void
src_account_connect_performer (gboolean canceled,
GError *err,
- GtkWindow *parent_window,
+ ModestWindow *parent_window,
TnyAccount *src_account,
gpointer user_data)
{
}
-void
-modest_platform_double_connect_and_perform (GtkWindow *parent_window,
+void
+modest_platform_double_connect_and_perform (ModestWindow *parent_window,
gboolean force,
TnyFolderStore *folder_store,
DoubleConnectionInfo *connect_info)
{
- modest_platform_connect_if_remote_and_perform(parent_window,
+ modest_platform_connect_if_remote_and_perform(parent_window,
force,
folder_store,
src_account_connect_performer,