From 96b5af92761b672d2a1b041586c4f8d034677337 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 25 Aug 2006 21:57:58 +0000 Subject: ** Fix for bug #336983 svn path=/trunk/; revision=32674 --- mail/ChangeLog | 7 +++++++ mail/em-folder-view.c | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index b793fe2152..3b4ffb2128 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2006-08-26 Srinivasa Ragavan + + ** Fix for bug #336983 + + * em-folder-view.c: (emfv_init), (emfv_on_html_button_released_cb): + Enable/disable Edit->Copy on button release on html. + 2006-08-24 Srinivasa Ragavan ** Fix for bug #352695 diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 988cfb4bf9..087e094e4b 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -138,7 +138,7 @@ static void emfv_on_url_cb(GObject *emitter, const char *url, EMFolderView *emfv static void emfv_on_url(EMFolderView *emfv, const char *uri, const char *nice_uri); static void emfv_set_seen (EMFolderView *emfv, const char *uid); - +static gboolean emfv_on_html_button_released_cb (GtkHTML *html, GdkEventButton *button, EMFolderView *emfv); static gboolean emfv_popup_menu (GtkWidget *widget); static const EMFolderViewEnable emfv_enable_map[]; @@ -221,6 +221,7 @@ emfv_init(GObject *o) g_signal_connect(emfv->preview, "link_clicked", G_CALLBACK(emfv_format_link_clicked), emfv); g_signal_connect(emfv->preview, "popup_event", G_CALLBACK(emfv_format_popup_event), emfv); g_signal_connect (emfv->preview, "on_url", G_CALLBACK (emfv_on_url_cb), emfv); + g_signal_connect (((EMFormatHTML *)emfv->preview)->html, "button-release-event", G_CALLBACK (emfv_on_html_button_released_cb), emfv); #ifdef ENABLE_PROFILING g_signal_connect(emfv->preview, "complete", G_CALLBACK (emfv_format_complete), emfv); #endif @@ -2875,3 +2876,15 @@ emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv) g_free (nice_url); } + +static gboolean +emfv_on_html_button_released_cb (GtkHTML *html, GdkEventButton *button, EMFolderView *emfv) +{ + gboolean selected; + + selected = gtk_html_command (html, "is-selection-active"); + bonobo_ui_component_set_prop(emfv->uic, "/commands/EditCopy", "sensitive", selected?"1":"0", NULL); + + return FALSE; +} + -- cgit v1.2.3