diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 3455847b95..4e66daad95 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2004-03-23 Not Zed <NotZed@Ximian.com> + * em-format-html-display.c (efhd_attachment_popup): dont add the + show/hide menu items if we can't ever show it inline. + (efhd_attachment_button): disable the ">" button if we can't view + the content inline. See #52086. + * em-format-quote.c (emfq_format_attachment): format inline(d) parts automatically into the reply. Part of #55702. diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index e1d3f95159..577a539549 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -1085,11 +1085,15 @@ efhd_attachment_popup(GtkWidget *w, GdkEventButton *event, struct _attach_puri * target->widget = w; /* add our local menus */ - efhd_menu_items[0].activate_data = info; - menus = g_slist_prepend(menus, &efhd_menu_items[0]); - item = &efhd_menu_items[info->shown?2:1]; - item->activate_data = info; - menus = g_slist_prepend(menus, item); + if (info->handle) { + /* show/hide menus, only if we have an inline handler */ + efhd_menu_items[0].activate_data = info; + menus = g_slist_prepend(menus, &efhd_menu_items[0]); + item = &efhd_menu_items[info->shown?2:1]; + item->activate_data = info; + menus = g_slist_prepend(menus, item); + } + em_popup_add_items(emp, menus, (GDestroyNotify)g_slist_free); menu = em_popup_create_menu_once(emp, target, target->mask, target->mask); @@ -1211,8 +1215,10 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje if (info->handle) g_signal_connect(button, "clicked", G_CALLBACK(efhd_attachment_show), info); - else + else { + gtk_widget_set_sensitive(button, FALSE); GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); + } hbox = gtk_hbox_new(FALSE, 2); info->forward = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON); |