* Fixed a corner case when finalizing modest
[modest] / src / maemo / modest-platform.c
index e15d2a4..4d61dbd 100644 (file)
@@ -1689,6 +1689,10 @@ modest_platform_animation_banner (GtkWidget *parent,
 
        g_return_val_if_fail (text != NULL, NULL);
 
+       /* If the parent is not visible then do not show */
+       if (parent && !GTK_WIDGET_VISIBLE (parent))
+               return NULL;
+
        inf_note = hildon_banner_show_animation (parent, animation_name, text);
 
        return inf_note;
@@ -2265,7 +2269,7 @@ gboolean
 modest_platform_check_memory_low (ModestWindow *win)
 {
        gboolean lowmem;
-       
+
        g_return_val_if_fail (win == NULL || MODEST_IS_WINDOW(win), FALSE);
        
        /* are we in low memory state? */
@@ -2276,6 +2280,10 @@ modest_platform_check_memory_low (ModestWindow *win)
                        GTK_WINDOW(win),
                        dgettext("ke-recv","memr_ib_operation_disabled"),
                        TRUE);
-       
+
+       if (lowmem)
+               g_warning ("%s: low memory reached. disallowing some operations",
+                          __FUNCTION__);
+
        return lowmem;
 }