From b4429775bef8b1e884f0e4c70b4fc1a033f9c1ea Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Wed, 5 Dec 2007 15:26:45 +0000 Subject: [PATCH] New function modest_platform_information_banner_with_timeout() Set a short timeout to the "Opening" banner so it disappears earlier Fixes NB#76842 pmo-trunk-r3880 --- src/gnome/modest-platform.c | 9 +++++++++ src/maemo/modest-platform.c | 11 +++++++++++ src/modest-platform.h | 6 ++++++ src/modest-ui-actions.c | 3 ++- 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/gnome/modest-platform.c b/src/gnome/modest-platform.c index 368e076..a38b5c5 100644 --- a/src/gnome/modest-platform.c +++ b/src/gnome/modest-platform.c @@ -344,6 +344,15 @@ modest_platform_information_banner (GtkWidget *widget, g_message ("NOT IMPLEMENTED");; } +void +modest_platform_information_banner_with_timeout (GtkWidget *widget, + const gchar *icon_name, + const gchar *text, + gint timeout) +{ + g_message ("NOT IMPLEMENTED");; +} + GtkWidget * modest_platform_animation_banner (GtkWidget *widget, const gchar *icon_name, diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 006f097..12954c5 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -1558,6 +1558,17 @@ modest_platform_information_banner (GtkWidget *parent, hildon_banner_show_information (parent, icon_name, text); } +void +modest_platform_information_banner_with_timeout (GtkWidget *parent, + const gchar *icon_name, + const gchar *text, + gint timeout) +{ + GtkWidget *banner; + banner = hildon_banner_show_information (parent, icon_name, text); + hildon_banner_set_timeout(HILDON_BANNER(banner), timeout); +} + GtkWidget * modest_platform_animation_banner (GtkWidget *parent, const gchar *animation_name, diff --git a/src/modest-platform.h b/src/modest-platform.h index 00f4010..a671e73 100644 --- a/src/modest-platform.h +++ b/src/modest-platform.h @@ -337,6 +337,12 @@ void modest_platform_information_banner (GtkWidget *widget, const gchar *icon_name, const gchar *text); +/* Timeout is in miliseconds */ +void modest_platform_information_banner_with_timeout (GtkWidget *parent, + const gchar *icon_name, + const gchar *text, + gint timeout); + GtkWidget * modest_platform_animation_banner (GtkWidget *parent, const gchar *annimation_name, diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 3cd52fc..58a8490 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -936,7 +936,8 @@ open_msg_cb (ModestMailOperation *mail_op, /* Show banner */ - modest_platform_information_banner (NULL, NULL, _("mail_ib_opening_draft_message")); + modest_platform_information_banner_with_timeout + (NULL, NULL, _("mail_ib_opening_draft_message"), 1200); } else { gchar *uid = modest_tny_folder_get_header_unique_id (header); -- 1.7.9.5