]> www.fi.muni.cz Git - evince.git/commitdiff
Do not start an image drag and drop operation when pointer is on text, so
authorCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 1 Feb 2007 11:08:45 +0000 (11:08 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Thu, 1 Feb 2007 11:08:45 +0000 (11:08 +0000)
2007-02-01  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_button_press_event):
Do not start an image drag and drop operation when pointer is on
text, so that we can select text when the whole background is an
image.

svn path=/trunk/; revision=2283

ChangeLog
shell/ev-view.c

index 155c56c067ff4b440d506440fccad19295d09235..4bad1344640173407b512776449f5fff01828ad4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-01  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (ev_view_button_press_event):
+
+       Do not start an image drag and drop operation when pointer is on 
+       text, so that we can select text when the whole background is an
+       image. 
+
 2007-01-31  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (ev_window_update_actions): 
index 676d08d0f5698a221582120d355c9f8f0d212cea..0186a021ca4bf10f32b05e7932c654626ba56a1a 100644 (file)
@@ -2004,7 +2004,8 @@ ev_view_button_press_event (GtkWidget      *widget,
                                }
                                
                                gtk_widget_queue_draw (widget);
-                       } else if ((image = ev_view_get_image_at_location (view, event->x, event->y))) {
+                       } else if (!location_in_text (view, event->x + view->scroll_x, event->y + view->scroll_y) &&
+                                  (image = ev_view_get_image_at_location (view, event->x, event->y))) {
                                if (view->image_dnd_info.image)
                                        g_object_unref (view->image_dnd_info.image);
                                view->image_dnd_info.image = g_object_ref (image);