[pluma] 01/01: debian/patches: Add 0000_Fix_list_of_recently_used_files.patch. (Closes: #883866).
Pablo Barciela
zenwalker-guest at moszumanska.debian.org
Sun Dec 10 01:37:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
zenwalker-guest pushed a commit to branch master
in repository pluma.
commit 68991fa53827a44eb992b7fdeb0a281b0b69ea33
Author: Pablo Barciela <scow at riseup.net>
Date: Sun Dec 10 02:30:01 2017 +0100
debian/patches: Add 0000_Fix_list_of_recently_used_files.patch. (Closes: #883866).
---
.../0000_Fix_list_of_recently_used_files.patch | 94 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 95 insertions(+)
diff --git a/debian/patches/0000_Fix_list_of_recently_used_files.patch b/debian/patches/0000_Fix_list_of_recently_used_files.patch
new file mode 100644
index 0000000..a599533
--- /dev/null
+++ b/debian/patches/0000_Fix_list_of_recently_used_files.patch
@@ -0,0 +1,94 @@
+From a778374f183e424f18b337fa32462e1e6f152421 Mon Sep 17 00:00:00 2001
+From: Pablo Barciela <scow at riseup.net>
+Date: Mon, 20 Nov 2017 11:53:37 +0100
+Subject: [PATCH] pluma-view.c: use one static variable instead two to do the
+ same job
+
+This is the improvement of the commits:
+
+https://github.com/mate-desktop/pluma/commit/4df44887f4b7547fc9b31d1cb3f61688579fe39b
+https://github.com/mate-desktop/pluma/commit/ec438f3d262ef178a898612211335d3c9fa2f4ee
+---
+ pluma/pluma-view.c | 36 +++++++++++++++++++-----------------
+ 1 file changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c
+index 9bf6098..4ebc093 100644
+--- a/pluma/pluma-view.c
++++ b/pluma/pluma-view.c
+@@ -57,8 +57,7 @@
+ #define PLUMA_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_VIEW, PlumaViewPrivate))
+
+ /* Local variables */
+-static gboolean middledown = FALSE;
+-static gboolean rightdown = FALSE;
++static gboolean middle_or_right_down = FALSE;
+
+ typedef enum
+ {
+@@ -130,6 +129,8 @@ static gboolean pluma_view_button_press_event (GtkWidget *widget,
+ GdkEventButton *event);
+ static gboolean pluma_view_button_release_event (GtkWidget *widget,
+ GdkEventButton *event);
++static void pluma_view_populate_popup (GtkTextView *text_view,
++ GtkWidget *widget);
+
+ static gboolean start_interactive_search (PlumaView *view);
+ static gboolean start_interactive_goto_line (PlumaView *view);
+@@ -214,6 +215,7 @@ pluma_view_class_init (PlumaViewClass *klass)
+ widget_class->drag_drop = pluma_view_drag_drop;
+ widget_class->button_press_event = pluma_view_button_press_event;
+ widget_class->button_release_event = pluma_view_button_release_event;
++ text_view_class->populate_popup = pluma_view_populate_popup;
+ klass->start_interactive_search = start_interactive_search;
+ klass->start_interactive_goto_line = start_interactive_goto_line;
+ klass->reset_searched_text = reset_searched_text;
+@@ -1995,19 +1997,15 @@ show_line_numbers_menu (GtkWidget *view,
+ static gboolean
+ pluma_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
+ {
+- if (((event->button == 3) && (middledown)) || ((event->button == 2) && (rightdown)))
++ if ((event->button == 2) || (event->button == 3))
+ {
+- middledown = FALSE;
+- rightdown = FALSE;
+- return TRUE;
+- }
+- else if (event->button == 2)
+- {
+- middledown = TRUE;
+- }
+- else if (event->button == 3)
+- {
+- rightdown = TRUE;
++ if (middle_or_right_down)
++ {
++ middle_or_right_down = FALSE;
++ return TRUE;
++ }
++ else
++ middle_or_right_down = TRUE;
+ }
+
+ if ((event->type == GDK_BUTTON_PRESS) &&
+@@ -2034,13 +2032,17 @@ static gboolean
+ pluma_view_button_release_event (GtkWidget *widget, GdkEventButton *event)
+ {
+ if (event->button == 2)
+- middledown = FALSE;
+- else if (event->button == 3)
+- rightdown = FALSE;
++ middle_or_right_down = FALSE;
+
+ return GTK_WIDGET_CLASS (pluma_view_parent_class)->button_release_event (widget, event);
+ }
+
++static void
++pluma_view_populate_popup (GtkTextView *text_view, GtkWidget *widget)
++{
++ middle_or_right_down = FALSE;
++}
++
+ static void
+ search_highlight_updated_cb (PlumaDocument *doc,
+ GtkTextIter *start,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1e1ab86
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0000_Fix_list_of_recently_used_files.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/pluma.git
More information about the pkg-mate-commits
mailing list