* Removed an invalid g_source_remove
[modest] / src / maemo / modest-platform.c
index 4d61dbd..c4af06c 100644 (file)
@@ -1659,9 +1659,11 @@ modest_platform_information_banner (GtkWidget *parent,
                                    const gchar *text)
 {
        GtkWidget *banner;
-       ModestWindowMgr *mgr;
+       ModestWindowMgr *mgr = modest_runtime_get_window_mgr ();
+
+       if (modest_window_mgr_num_windows (mgr) == 0)
+               return;
 
-       mgr = modest_runtime_get_window_mgr ();
        banner = hildon_banner_show_information (parent, icon_name, text);
 
        modest_window_mgr_register_banner (mgr);
@@ -1676,6 +1678,10 @@ modest_platform_information_banner_with_timeout (GtkWidget *parent,
                                                 gint timeout)
 {
        GtkWidget *banner;
+
+       if (modest_window_mgr_num_windows (modest_runtime_get_window_mgr ()) == 0)
+               return;
+
        banner = hildon_banner_show_information (parent, icon_name, text);
        hildon_banner_set_timeout(HILDON_BANNER(banner), timeout);
 }
@@ -1689,6 +1695,9 @@ modest_platform_animation_banner (GtkWidget *parent,
 
        g_return_val_if_fail (text != NULL, NULL);
 
+       if (modest_window_mgr_num_windows (modest_runtime_get_window_mgr ()) == 0)
+               return NULL;
+
        /* If the parent is not visible then do not show */
        if (parent && !GTK_WIDGET_VISIBLE (parent))
                return NULL;