NULL);
/* new message */
- modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_new_message"), "<Ctrl>n",
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self),
+ _("mcen_me_new_message"),
+ "<Ctrl>n",
APP_MENU_CALLBACK (modest_ui_actions_on_new_msg),
NULL);
/* send receive actions should be only one visible always */
- modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_sendandreceive"), NULL,
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self),
+ _("mcen_me_inbox_sendandreceive"),
+ NULL,
APP_MENU_CALLBACK (modest_ui_actions_on_send_receive),
- MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_send_receive_all));
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_send_receive));
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_outbox_cancelsend"), NULL,
APP_MENU_CALLBACK (modest_ui_actions_cancel_send),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_cancel_sending_all));
{
ModestDimmingRule *rule = NULL;
gboolean dimmed = FALSE;
-
+ ModestAccountMgr *mgr;
+ const gchar* account_name;
+
g_return_val_if_fail (MODEST_IS_DIMMING_RULE (user_data), FALSE);
rule = MODEST_DIMMING_RULE (user_data);
-
- /* Check dimmed rule */
- dimmed = !modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(),
- TRUE);
+ mgr = modest_runtime_get_account_mgr();
+
+ /* Check dimmed rule */
+ account_name = modest_window_get_active_account (win);
+ dimmed = modest_account_mgr_account_is_busy (mgr, account_name);
+
if (dimmed)
modest_dimming_rule_set_notification (rule, _("mcen_nc_no_email_acnts_defined"));
dimmed = TRUE;
if (dimmed)
modest_dimming_rule_set_notification (rule, _("mcen_nc_no_email_acnts_defined"));
-
+
modest_account_mgr_free_account_names (account_names);
if (!dimmed) {