[atril] 01/01: debian/patches: Add 0001_fix_text_in_annotation_window.patch. Fix text selection with mouse in annotation window.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Sat Apr 7 08:53:12 UTC 2018
This is an automated email from the git hooks/post-receive script.
flexiondotorg-guest pushed a commit to branch master
in repository atril.
commit 0e770ff1538212ca90d773a05275ee6d59bc70c2
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Sat Apr 7 09:52:38 2018 +0100
debian/patches: Add 0001_fix_text_in_annotation_window.patch. Fix text selection with mouse in annotation window.
---
.../0001_fix_text_in_annotation_window.patch | 99 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 100 insertions(+)
diff --git a/debian/patches/0001_fix_text_in_annotation_window.patch b/debian/patches/0001_fix_text_in_annotation_window.patch
new file mode 100644
index 0000000..15f4c93
--- /dev/null
+++ b/debian/patches/0001_fix_text_in_annotation_window.patch
@@ -0,0 +1,99 @@
+Author: monsta <monsta at inbox.ru>
+Description: Fix text selection with mouse in annotation window
+
+diff --git a/libview/ev-annotation-window.c b/libview/ev-annotation-window.c
+index 86ec648..eab458c 100644
+--- a/libview/ev-annotation-window.c
++++ b/libview/ev-annotation-window.c
+@@ -280,12 +280,34 @@ ev_annotation_window_close (EvAnnotationWindow *window)
+ g_signal_emit (window, signals[CLOSED], 0);
+ }
+
++static gboolean
++ev_annotation_window_button_press_event (GtkWidget *widget,
++ GdkEventButton *event)
++{
++ EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget);
++
++ if (event->type == GDK_BUTTON_PRESS && event->button == 1) {
++ window->in_move = TRUE;
++ window->x = event->x_root - event->x;
++ window->y = event->y_root - event->y;
++ gtk_window_begin_move_drag (GTK_WINDOW (widget),
++ event->button,
++ event->x_root,
++ event->y_root,
++ event->time);
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
+ static void
+ ev_annotation_window_init (EvAnnotationWindow *window)
+ {
+ GtkWidget *vbox, *hbox;
+ GtkWidget *icon;
+ GtkWidget *swindow;
++ GtkWidget *header;
+ GtkIconTheme *icon_theme;
+ GdkPixbuf *pixbuf;
+
+@@ -302,10 +324,19 @@ ev_annotation_window_init (EvAnnotationWindow *window)
+ gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
+ gtk_widget_show (icon);
+
++ header = gtk_event_box_new ();
++ gtk_widget_add_events (header, GDK_BUTTON_PRESS_MASK);
++ g_signal_connect_swapped (header, "button-press-event",
++ G_CALLBACK (ev_annotation_window_button_press_event),
++ window);
++
+ window->title = gtk_label_new (NULL);
+- gtk_box_pack_start (GTK_BOX (hbox), window->title, TRUE, TRUE, 0);
++ gtk_container_add (GTK_CONTAINER (header), window->title);
+ gtk_widget_show (window->title);
+
++ gtk_box_pack_start (GTK_BOX (hbox), header, TRUE, TRUE, 0);
++ gtk_widget_show (header);
++
+ window->close_button = gtk_button_new ();
+ gtk_button_set_relief (GTK_BUTTON (window->close_button), GTK_RELIEF_NONE);
+ gtk_container_set_border_width (GTK_CONTAINER (window->close_button), 0);
+@@ -464,27 +495,6 @@ ev_annotation_window_constructor (GType type,
+ return object;
+ }
+
+-static gboolean
+-ev_annotation_window_button_press_event (GtkWidget *widget,
+- GdkEventButton *event)
+-{
+- EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget);
+-
+- if (event->type == GDK_BUTTON_PRESS && event->button == 1) {
+- window->in_move = TRUE;
+- window->x = event->x_root - event->x;
+- window->y = event->y_root - event->y;
+- gtk_window_begin_move_drag (GTK_WINDOW (widget),
+- event->button,
+- event->x_root,
+- event->y_root,
+- event->time);
+- return TRUE;
+- }
+-
+- return FALSE;
+-}
+-
+ static gboolean
+ ev_annotation_window_configure_event (GtkWidget *widget,
+ GdkEventConfigure *event)
+@@ -543,7 +553,6 @@ ev_annotation_window_class_init (EvAnnotationWindowClass *klass)
+ g_object_class->set_property = ev_annotation_window_set_property;
+ g_object_class->dispose = ev_annotation_window_dispose;
+
+- gtk_widget_class->button_press_event = ev_annotation_window_button_press_event;
+ gtk_widget_class->configure_event = ev_annotation_window_configure_event;
+ gtk_widget_class->focus_in_event = ev_annotation_window_focus_in_event;
+ gtk_widget_class->focus_out_event = ev_annotation_window_focus_out_event;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c2b0131
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_fix_text_in_annotation_window.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/atril.git
More information about the pkg-mate-commits
mailing list