From 81e12ef7b4138298662137f3494d86dc3232c6e0 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Thu, 22 Oct 2009 16:53:35 +0200 Subject: [PATCH] Replaced hildon_banner_* calls by modest_platform_* calls --- .../modest-connection-specific-smtp-edit-window.c | 2 +- src/hildon2/modest-easysetup-wizard-dialog.c | 4 ++-- src/hildon2/modest-msg-edit-window.c | 12 +++++----- src/hildon2/modest-msg-view-window.c | 24 ++++++++++---------- src/hildon2/modest-number-editor.c | 8 +++---- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/hildon2/modest-connection-specific-smtp-edit-window.c b/src/hildon2/modest-connection-specific-smtp-edit-window.c index 5268249..6a90d19 100644 --- a/src/hildon2/modest-connection-specific-smtp-edit-window.c +++ b/src/hildon2/modest-connection-specific-smtp-edit-window.c @@ -254,7 +254,7 @@ on_response (GtkDialog *dialog, int response_id, gpointer user_data) if (hostname && (hostname[0] != '\0') && (!modest_text_utils_validate_domain_name (hostname))) { g_signal_stop_emission_by_name (dialog, "response"); - hildon_banner_show_information (NULL, NULL, _("mcen_ib_invalid_servername")); + modest_platform_system_banner (NULL, NULL, _("mcen_ib_invalid_servername")); gtk_widget_grab_focus (priv->entry_outgoingserver); gtk_editable_select_region (GTK_EDITABLE (priv->entry_outgoingserver), 0, -1); return; diff --git a/src/hildon2/modest-easysetup-wizard-dialog.c b/src/hildon2/modest-easysetup-wizard-dialog.c index 9017334..b2a3b55 100644 --- a/src/hildon2/modest-easysetup-wizard-dialog.c +++ b/src/hildon2/modest-easysetup-wizard-dialog.c @@ -1946,7 +1946,7 @@ on_before_next (ModestWizardDialog *dialog, GtkWidget *current_page, GtkWidget * if (name_in_use) { /* Warn the user via a dialog: */ - hildon_banner_show_information(NULL, NULL, _("mail_ib_account_name_already_existing")); + modest_platform_system_banner(NULL, NULL, _("mail_ib_account_name_already_existing")); return FALSE; } @@ -1962,7 +1962,7 @@ on_before_next (ModestWizardDialog *dialog, GtkWidget *current_page, GtkWidget * if (!modest_text_utils_validate_email_address (email_address, NULL)) { /* Warn the user via a dialog: */ - hildon_banner_show_information (NULL, NULL, _("mcen_ib_invalid_email")); + modest_platform_system_banner (NULL, NULL, _("mcen_ib_invalid_email")); /* Return focus to the email address entry: */ gtk_widget_grab_focus (priv->entry_user_email); diff --git a/src/hildon2/modest-msg-edit-window.c b/src/hildon2/modest-msg-edit-window.c index b7d2d78..7eaf6b5 100644 --- a/src/hildon2/modest-msg-edit-window.c +++ b/src/hildon2/modest-msg-edit-window.c @@ -2702,7 +2702,7 @@ modest_msg_edit_window_remove_attachments (ModestMsgEditWindow *window, } if (tny_list_get_length (att_list) == 0) { - hildon_banner_show_information (NULL, NULL, _("TODO: no attachments selected to remove")); + modest_platform_system_banner (NULL, NULL, _("TODO: no attachments selected to remove")); } else { gboolean dialog_response; gchar *message = NULL; @@ -3716,7 +3716,7 @@ subject_field_insert_text (GtkEditable *editable, } if (result_len + old_length > 1000) { - hildon_banner_show_information (GTK_WIDGET (window), NULL, + modest_platform_system_banner (GTK_WIDGET (window), NULL, _CS("ckdg_ib_maximum_characters_reached")); } g_string_free (result, TRUE); @@ -3815,7 +3815,7 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget, if (message_is_empty (window)) { g_free (priv->last_search); priv->last_search = NULL; - hildon_banner_show_information (GTK_WIDGET (window), NULL, _("mail_ib_nothing_to_find")); + modest_platform_system_banner (GTK_WIDGET (window), NULL, _("mail_ib_nothing_to_find")); return; } @@ -3825,7 +3825,7 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget, g_free (priv->last_search); priv->last_search = NULL; /* Information banner about empty search */ - hildon_banner_show_information (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text")); + modest_platform_system_banner (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text")); return; } @@ -3841,14 +3841,14 @@ modest_msg_edit_window_find_toolbar_search (GtkWidget *widget, result = gtk_text_iter_forward_search_insensitive (&selection_end, current_search, &match_start, &match_end); if (!result) - hildon_banner_show_information (NULL, NULL, _HL("ckct_ib_find_search_complete")); + modest_platform_system_banner (NULL, NULL, _HL("ckct_ib_find_search_complete")); } else { GtkTextIter buffer_start; gtk_text_buffer_get_start_iter (priv->text_buffer, &buffer_start); result = gtk_text_iter_forward_search_insensitive (&buffer_start, current_search, &match_start, &match_end); if (!result) - hildon_banner_show_information (NULL, NULL, _HL("ckct_ib_find_no_matches")); + modest_platform_system_banner (NULL, NULL, _HL("ckct_ib_find_no_matches")); } /* Mark as selected the string found in search */ diff --git a/src/hildon2/modest-msg-view-window.c b/src/hildon2/modest-msg-view-window.c index 37e45a6..d43cd4e 100644 --- a/src/hildon2/modest-msg-view-window.c +++ b/src/hildon2/modest-msg-view-window.c @@ -1578,7 +1578,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, ModestMsgViewWindowPrivate *priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (obj); if (modest_mime_part_view_is_empty (MODEST_MIME_PART_VIEW (priv->msg_view))) { - hildon_banner_show_information (NULL, NULL, _("mail_ib_nothing_to_find")); + modest_platform_system_banner (NULL, NULL, _("mail_ib_nothing_to_find")); return; } @@ -1586,7 +1586,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, if ((current_search == NULL) || (strcmp (current_search, "") == 0)) { g_free (current_search); - hildon_banner_show_information (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text")); + modest_platform_system_banner (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text")); return; } @@ -1597,7 +1597,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, result = modest_isearch_view_search (MODEST_ISEARCH_VIEW (priv->msg_view), priv->last_search); if (!result) { - hildon_banner_show_information (NULL, NULL, + modest_platform_system_banner (NULL, NULL, _HL("ckct_ib_find_no_matches")); g_free (priv->last_search); priv->last_search = NULL; @@ -1606,7 +1606,7 @@ modest_msg_view_window_find_toolbar_search (GtkWidget *widget, } } else { if (!modest_isearch_view_search_next (MODEST_ISEARCH_VIEW (priv->msg_view))) { - hildon_banner_show_information (NULL, NULL, + modest_platform_system_banner (NULL, NULL, _HL("ckct_ib_find_search_complete")); g_free (priv->last_search); priv->last_search = NULL; @@ -1659,7 +1659,7 @@ modest_msg_view_window_zoom_plus (ModestWindow *window) zoom_level = modest_zoomable_get_zoom (MODEST_ZOOMABLE (priv->msg_view)); if (zoom_level >= 2.0) { - hildon_banner_show_information (NULL, NULL, + modest_platform_system_banner (NULL, NULL, _CS("ckct_ib_max_zoom_level_reached")); return FALSE; } else if (zoom_level >= 1.5) { @@ -1700,7 +1700,7 @@ modest_msg_view_window_zoom_minus (ModestWindow *window) zoom_level = modest_zoomable_get_zoom (MODEST_ZOOMABLE (priv->msg_view)); if (zoom_level <= 0.5) { - hildon_banner_show_information (NULL, NULL, + modest_platform_system_banner (NULL, NULL, _CS("ckct_ib_min_zoom_level_reached")); return FALSE; } else if (zoom_level <= 0.8) { @@ -2700,7 +2700,7 @@ modest_msg_view_window_view_attachment (ModestMsgViewWindow *window, if (selected_attachments == NULL || tny_list_get_length (selected_attachments) == 0) { error = TRUE; } else if (tny_list_get_length (selected_attachments) > 1) { - hildon_banner_show_information (NULL, NULL, _("mcen_ib_unable_to_display_more")); + modest_platform_system_banner (NULL, NULL, _("mcen_ib_unable_to_display_more")); error = TRUE; } else { TnyIterator *iter; @@ -2907,11 +2907,11 @@ static gboolean idle_save_mime_part_show_result (SaveMimePartInfo *info) { /* This is a GDK lock because we are an idle callback and - * hildon_banner_show_information is or does Gtk+ code */ + * modest_platform_system_banner is or does Gtk+ code */ gdk_threads_enter (); /* CHECKED */ if (info->result == GNOME_VFS_OK) { - hildon_banner_show_information (NULL, NULL, _CS("sfil_ib_saved")); + modest_platform_system_banner (NULL, NULL, _CS("sfil_ib_saved")); } else if (info->result == GNOME_VFS_ERROR_NO_SPACE) { gchar *msg = NULL; @@ -2923,7 +2923,7 @@ idle_save_mime_part_show_result (SaveMimePartInfo *info) modest_platform_information_banner (NULL, NULL, msg); g_free (msg); } else { - hildon_banner_show_information (NULL, NULL, _("mail_ib_file_operation_failed")); + modest_platform_system_banner (NULL, NULL, _("mail_ib_file_operation_failed")); } save_mime_part_info_free (info, FALSE); gdk_threads_leave (); /* CHECKED */ @@ -3092,7 +3092,7 @@ save_attachments_response (GtkDialog *dialog, #else err_msg = _FM("sfil_ib_readonly_location"); #endif - hildon_banner_show_information (NULL, NULL, err_msg); + modest_platform_system_banner (NULL, NULL, err_msg); } else { TnyIterator *iter; @@ -3270,7 +3270,7 @@ show_remove_attachment_information (gpointer userdata) } priv->remove_attachment_banner = g_object_ref ( - hildon_banner_show_animation (NULL, NULL, _("mcen_me_inbox_remove_attachments"))); + modest_platform_animation_banner (NULL, NULL, _("mcen_me_inbox_remove_attachments"))); gdk_threads_leave (); diff --git a/src/hildon2/modest-number-editor.c b/src/hildon2/modest-number-editor.c index 2a1dc73..6a01919 100644 --- a/src/hildon2/modest-number-editor.c +++ b/src/hildon2/modest-number-editor.c @@ -61,8 +61,7 @@ #include "modest-marshal.h" #include #include "modest-text-utils.h" - -#define _(String) dgettext("modest-libs", String) +#include "modest-platform.h" typedef struct _ModestNumberEditorPrivate ModestNumberEditorPrivate; @@ -428,9 +427,8 @@ modest_number_editor_range_error (ModestNumberEditor *editor, } /* Infoprint error */ - if (err_msg) - { - hildon_banner_show_information (GTK_WIDGET (GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET(editor), + if (err_msg) { + modest_platform_system_banner (GTK_WIDGET (GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET(editor), GTK_TYPE_WINDOW))), NULL, err_msg); g_free(err_msg); } -- 1.7.9.5