#include <modest-account-settings-dialog.h>
#include <easysetup/modest-easysetup-wizard-dialog.h>
#include <hildon/hildon-sound.h>
+#include <osso-mem.h>
#ifdef MODEST_HAVE_MCE
#include <mce/dbus-names.h>
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;
}
GtkWidget *
-modest_platform_get_account_settings_wizard ()
+modest_platform_get_account_settings_wizard (void)
{
ModestEasysetupWizardDialog *dialog = modest_easysetup_wizard_dialog_new ();
#endif /* MODEST_HAVE_CONIC */
return retval;
}
+
+
+
+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? */
+ lowmem = osso_mem_in_lowmem_state () ? TRUE : FALSE;
+
+ if (win && lowmem)
+ modest_platform_run_information_dialog (
+ 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;
+}