From: Sergio Villar Senin Date: Wed, 28 May 2008 11:50:36 +0000 (+0000) Subject: * Ported fix for bug #85931 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=63e9f7d4d5fc4e9406ee0f333f0b73c30928ecae;p=modest * Ported fix for bug #85931 pmo-diablo-r4579 --- diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index 8e4c047..f1b0dc7 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -1209,6 +1209,21 @@ on_top_application(GArray * arguments, gpointer data, osso_rpc_t * retval) return OSSO_OK; } + +static gboolean +on_idle_show_memory_low (gpointer user_data) +{ + ModestWindow *main_win = NULL; + + gdk_threads_enter (); + main_win = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr (), FALSE); + modest_platform_run_information_dialog (GTK_WINDOW (main_win), + dgettext("ke-recv","memr_ib_operation_disabled"), + TRUE); + gdk_threads_leave (); + + return FALSE; +} /* Callback for normal D-BUS messages */ gint @@ -1216,6 +1231,12 @@ modest_dbus_req_handler(const gchar * interface, const gchar * method, GArray * arguments, gpointer data, osso_rpc_t * retval) { + /* Check memory low conditions */ + if (modest_platform_check_memory_low (NULL, FALSE)) { + g_idle_add (on_idle_show_memory_low, NULL); + goto param_error; + } + if (g_ascii_strcasecmp (method, MODEST_DBUS_METHOD_MAIL_TO) == 0) { if (arguments->len != MODEST_DBUS_MAIL_TO_ARGS_COUNT) goto param_error;