aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-view.c
diff options
context:
space:
mode:
authorHarry Lu <harry.lu@sun.com>2005-02-08 11:50:38 +0800
committerHarry Lu <haip@src.gnome.org>2005-02-08 11:50:38 +0800
commitc0c618e5a7aeb6d1130760669ee8936e7f896458 (patch)
treeb9b6777acf311b02b28ea0798f1f04fd610b1a7b /mail/em-folder-view.c
parent80f47d42b88b901c3234f923ce50eaa785397e4b (diff)
downloadgsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.tar
gsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.tar.gz
gsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.tar.bz2
gsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.tar.lz
gsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.tar.xz
gsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.tar.zst
gsoc2013-evolution-c0c618e5a7aeb6d1130760669ee8936e7f896458.zip
Fix for 72275. try to bring up menu for preivew html object.
2005-02-07 Harry Lu <harry.lu@sun.com> Fix for 72275. * em-folder-view.c: (emfv_popup_menu): try to bring up menu for preivew html object. (emfv_format_popup_event): handle event == NULL case. * em-format-html-display.c: (em_format_html_display_popup_menu): New function to popup context menu. * em-format-html-display.h: add new function declaration. svn path=/trunk/; revision=28744
Diffstat (limited to 'mail/em-folder-view.c')
-rw-r--r--mail/em-folder-view.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index a604b0a4bf..c0bb8f9cc5 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -2160,9 +2160,19 @@ emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
static gboolean
emfv_popup_menu (GtkWidget *widget)
{
+ gboolean ret = FALSE;
EMFolderView *emfv = (EMFolderView *)widget;
- emfv_popup (emfv, NULL);
+ /* Try to bring up menu for preview html object.
+ Currently we cannot directly connect to html's "popup_menu" signal
+ since it doesn't work.
+ */
+
+ if (GTK_WIDGET_HAS_FOCUS (emfv->preview->formathtml.html))
+ ret = em_format_html_display_popup_menu (emfv->preview);
+
+ if (!ret)
+ emfv_popup (emfv, NULL);
return TRUE;
}
@@ -2288,7 +2298,10 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
}
menu = e_popup_create_menu_once((EPopup *)emp, target, 0);
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
+ if (event == NULL)
+ gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
+ else
+ gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
return TRUE;
}