mimeview_select_mimepart_icon(messageview->mimeview, root);
done:
+ messageview_set_menu_sensitive(messageview);
/* plugins may hook in here to work with the message view */
hooks_invoke(MESSAGE_VIEW_SHOW_DONE_HOOKLIST, messageview);
void messageview_set_menu_sensitive(MessageView *messageview)
{
- if (!messageview || !messageview->new_window)
+ if (!messageview || !messageview->ui_manager)
return;
- /* do some smart things */
- if (!messageview->menubar) return;
cm_toggle_menu_set_active_full(messageview->ui_manager, "Menu/View/Quotes/CollapseAll", (prefs_common.hide_quotes == 1));
cm_toggle_menu_set_active_full(messageview->ui_manager, "Menu/View/Quotes/Collapse2", (prefs_common.hide_quotes == 2));
break;
}
if (mycode == SIGNATURE_UNCHECKED) {
+ GtkUIManager *ui_manager;
gchar *tmp = privacy_mimeinfo_sig_info_short(mimeinfo);
- text = g_strdup_printf("%s %s",
- tmp, _("Click the icon or hit 'C' to check it."));
+ gchar *shortcut;
+
+ if (mimeview->messageview->window != NULL)
+ ui_manager = mimeview->messageview->ui_manager;
+ else
+ ui_manager = mimeview->messageview->mainwin->ui_manager;
+
+ shortcut = cm_menu_item_get_shortcut(ui_manager, "Menu/Message/CheckSignature");
+
+ text = g_strdup_printf(_("%s Click the icon or hit '%s' to check it."),
+ tmp, shortcut);
g_free(tmp);
+ g_free(shortcut);
} else if (mycode != SIGNATURE_CHECK_TIMEOUT) {
text = privacy_mimeinfo_sig_info_short(mimeinfo);
} else if (mycode == SIGNATURE_CHECK_TIMEOUT) {
* CheckSignature item sensitivity without killing performance
* each time the menu sensitiveness is updated (a lot).
*/
- mimeview->signed_part = (siginfo == selected);
+ mimeview->signed_part = (siginfo != NULL);
if (siginfo == NULL) {
noticeview_hide(mimeview->siginfoview);