aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html-display.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-23 18:00:34 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-23 18:00:34 +0800
commit6ee30271e20b004864b2c47b3dffbef451bdda03 (patch)
tree4a0239ffc49c244a8e01975baf47cdc521a1f37d /mail/em-format-html-display.c
parente357c59b3b07fe144e56078562df1737374d2b7c (diff)
downloadgsoc2013-evolution-6ee30271e20b004864b2c47b3dffbef451bdda03.tar.gz
gsoc2013-evolution-6ee30271e20b004864b2c47b3dffbef451bdda03.tar.zst
gsoc2013-evolution-6ee30271e20b004864b2c47b3dffbef451bdda03.zip
dont add the show/hide menu items if we can't ever show it inline.
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. svn path=/trunk/; revision=25155
Diffstat (limited to 'mail/em-format-html-display.c')
-rw-r--r--mail/em-format-html-display.c18
1 files changed, 12 insertions, 6 deletions
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);