aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-07 23:41:43 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:42 +0800
commit63dae545b625c7ef7b032b181a0313f1af06b330 (patch)
tree0f36865331a69a6e0cf99fb8e7a1320dcc9aa282
parent2a5bbf490590b20002c1ced339fde3e3521eb094 (diff)
downloadgsoc2013-evolution-63dae545b625c7ef7b032b181a0313f1af06b330.tar.gz
gsoc2013-evolution-63dae545b625c7ef7b032b181a0313f1af06b330.tar.zst
gsoc2013-evolution-63dae545b625c7ef7b032b181a0313f1af06b330.zip
Bug 644066 - Text selection is cleared when right-clicking on a link
-rw-r--r--widgets/misc/e-web-view.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index 7b46a63297..b4bb4b5019 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -431,12 +431,16 @@ web_view_button_press_event_cb (EWebView *web_view,
GtkHTML *frame)
{
gboolean event_handled = FALSE;
- gchar *uri;
+ gchar *uri = NULL;
if (event != NULL && event->button != 3)
return FALSE;
- uri = e_web_view_extract_uri (web_view, event, frame);
+ /* Only extract a URI if no selection is active. Selected text
+ * implies the user is more likely to want to copy the selection
+ * to the clipboard than open a link within the selection. */
+ if (!e_web_view_is_selection_active (web_view))
+ uri = e_web_view_extract_uri (web_view, event, frame);
if (uri != NULL && g_str_has_prefix (uri, "##")) {
g_free (uri);
@@ -935,9 +939,6 @@ web_view_popup_event (EWebView *web_view,
GdkEventButton *event,
const gchar *uri)
{
- if (uri != NULL)
- e_web_view_unselect_all (web_view);
-
e_web_view_set_selected_uri (web_view, uri);
e_web_view_show_popup_menu (web_view, event, NULL, NULL);