main view and viewer windows toolbar and menu items.
pmo-trunk-r2691
priv = MODEST_DIMMING_RULE_GET_PRIVATE(rule);
/* Free previous notification */
priv = MODEST_DIMMING_RULE_GET_PRIVATE(rule);
/* Free previous notification */
- if (priv->notification != NULL)
+ if (priv->notification != NULL) {
g_free(priv->notification);
g_free(priv->notification);
+ priv->notification = NULL;
+ }
/* Set new notification message */
/* Set new notification message */
- priv->notification = g_strdup(notification);
+ if (notification != NULL)
+ priv->notification = g_strdup(notification);
/* Check dimmed rule */
if (!dimmed) {
dimmed = _selected_folder_is_root (MODEST_MAIN_WINDOW(win));
/* Check dimmed rule */
if (!dimmed) {
dimmed = _selected_folder_is_root (MODEST_MAIN_WINDOW(win));
- if (dimmed)
- modest_dimming_rule_set_notification (rule, "");
+ modest_dimming_rule_set_notification (rule, NULL);
if (MODEST_IS_MSG_VIEW_WINDOW (win))
dimmed = _msg_download_in_progress (MODEST_MSG_VIEW_WINDOW (win));
if (dimmed)
if (MODEST_IS_MSG_VIEW_WINDOW (win))
dimmed = _msg_download_in_progress (MODEST_MSG_VIEW_WINDOW (win));
if (dimmed)
- modest_dimming_rule_set_notification (rule, "");
+ modest_dimming_rule_set_notification (rule, _("mcen_ib_unable_to_reply"));
if (!dimmed) {
dimmed = _selected_msg_sent_in_progress (win);
if (dimmed)
if (!dimmed) {
dimmed = _selected_msg_sent_in_progress (win);
if (dimmed)
- modest_dimming_rule_set_notification (rule, _("ckct_ib_unable_to_delete]"));
+ modest_dimming_rule_set_notification (rule, _("ckct_ib_unable_to_delete"));
}
}
else if (MODEST_IS_MSG_VIEW_WINDOW (win)) {
}
}
else if (MODEST_IS_MSG_VIEW_WINDOW (win)) {
modest_dimming_rule_set_notification (rule, _("mail_ib_notavailable_downloading"));
}
if (!dimmed) {
modest_dimming_rule_set_notification (rule, _("mail_ib_notavailable_downloading"));
}
if (!dimmed) {
- if (MODEST_IS_MSG_VIEW_WINDOW (win))
- dimmed = !modest_msg_view_window_has_headers_model (MODEST_MSG_VIEW_WINDOW (win));
+ dimmed = _marked_as_deleted (win);
+ if (dimmed)
+ modest_dimming_rule_set_notification (rule, _("mcen_ib_message_already_deleted"));
+ }
+ if (!dimmed) {
+ dimmed = !modest_msg_view_window_has_headers_model (MODEST_MSG_VIEW_WINDOW(win));
- gchar *num = g_strdup("1");
- gchar *message = g_strdup_printf(_("mcen_nc_unable_to_delete_n_messages"), num);
-/* modest_dimming_rule_set_notification (rule, _("mcen_nc_unable_to_delete_n_messages")); */
- modest_dimming_rule_set_notification (rule, message);
- g_free(message);
- g_free(num);
+ modest_dimming_rule_set_notification (rule, _("ckct_ib_unable_to_delete"));
if (!dimmed) {
if (MODEST_IS_MSG_VIEW_WINDOW (win))
dimmed = modest_msg_view_window_first_message_selected (MODEST_MSG_VIEW_WINDOW(win));
if (!dimmed) {
if (MODEST_IS_MSG_VIEW_WINDOW (win))
dimmed = modest_msg_view_window_first_message_selected (MODEST_MSG_VIEW_WINDOW(win));
-/* if (dimmed) */
-/* modest_dimming_rule_set_notification (rule, ""); */
+ modest_dimming_rule_set_notification (rule, NULL);
if (!dimmed) {
if (MODEST_IS_MSG_VIEW_WINDOW (win))
dimmed = modest_msg_view_window_last_message_selected (MODEST_MSG_VIEW_WINDOW (win));
if (!dimmed) {
if (MODEST_IS_MSG_VIEW_WINDOW (win))
dimmed = modest_msg_view_window_last_message_selected (MODEST_MSG_VIEW_WINDOW (win));
-/* if (dimmed) */
-/* modest_dimming_rule_set_notification (rule, ""); */
+ modest_dimming_rule_set_notification (rule, NULL);