Accepting request 656104 from GNOME:Next
OBS-URL: https://build.opensuse.org/request/show/656104 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gedit?expand=0&rev=230
This commit is contained in:
parent
4d5d58b428
commit
851bf606c4
77
gedit-document-selector-make-search-caseless.patch
Normal file
77
gedit-document-selector-make-search-caseless.patch
Normal file
@ -0,0 +1,77 @@
|
||||
From a622fda63726adaabd02fa0c1786b75a921b1973 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien Lafargue <slafargue@gnome.org>
|
||||
Date: Mon, 19 Nov 2018 19:46:56 +0100
|
||||
Subject: [PATCH] document selector: make search caseless
|
||||
|
||||
---
|
||||
gedit/gedit-open-document-selector.c | 36 +++++++++++++++++++++++-----
|
||||
1 file changed, 30 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gedit/gedit-open-document-selector.c b/gedit/gedit-open-document-selector.c
|
||||
index 5389ef0bd..3e3d9a293 100644
|
||||
--- a/gedit/gedit-open-document-selector.c
|
||||
+++ b/gedit/gedit-open-document-selector.c
|
||||
@@ -436,6 +436,23 @@ fileitem_setup (FileItem *item)
|
||||
return candidate;
|
||||
}
|
||||
|
||||
+static inline gboolean
|
||||
+is_filter_in_candidate (const gchar *candidate,
|
||||
+ const gchar *filter)
|
||||
+{
|
||||
+ gchar *candidate_fold;
|
||||
+ gboolean ret;
|
||||
+
|
||||
+ g_assert (candidate != NULL);
|
||||
+ g_assert (filter != NULL);
|
||||
+
|
||||
+ candidate_fold = g_utf8_casefold (candidate, -1);
|
||||
+ ret = (strstr (candidate_fold, filter) != NULL);
|
||||
+
|
||||
+ g_free (candidate_fold);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/* If filter == NULL then items are
|
||||
* not checked against the filter.
|
||||
*/
|
||||
@@ -445,6 +462,10 @@ fileitem_list_filter (GList *items,
|
||||
{
|
||||
GList *new_items = NULL;
|
||||
GList *l;
|
||||
+ gchar *filter_fold = NULL;
|
||||
+
|
||||
+ if (filter != NULL)
|
||||
+ filter_fold = g_utf8_casefold (filter, -1);
|
||||
|
||||
for (l = items; l != NULL; l = l->next)
|
||||
{
|
||||
@@ -453,16 +474,19 @@ fileitem_list_filter (GList *items,
|
||||
|
||||
item = l->data;
|
||||
candidate = fileitem_setup (item);
|
||||
-
|
||||
- if (candidate && (filter == NULL || strstr (candidate, filter)))
|
||||
+ if (candidate != NULL)
|
||||
{
|
||||
- new_items = g_list_prepend (new_items,
|
||||
- gedit_open_document_selector_copy_fileitem_item (item));
|
||||
- }
|
||||
+ if (filter == NULL || is_filter_in_candidate (candidate, filter_fold))
|
||||
+ {
|
||||
+ new_items = g_list_prepend (new_items,
|
||||
+ gedit_open_document_selector_copy_fileitem_item (item));
|
||||
+ }
|
||||
|
||||
- g_free (candidate);
|
||||
+ g_free (candidate);
|
||||
+ }
|
||||
}
|
||||
|
||||
+ g_free (filter_fold);
|
||||
new_items = g_list_reverse (new_items);
|
||||
return new_items;
|
||||
}
|
||||
--
|
||||
2.18.1
|
||||
|
25
gedit-fix-assert-when-going-up-in-tree.patch
Normal file
25
gedit-fix-assert-when-going-up-in-tree.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From ea7999b7b59dbc05570485561ecab2a6334a220e Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien Lafargue <slafargue@gnome.org>
|
||||
Date: Mon, 26 Nov 2018 19:29:53 +0100
|
||||
Subject: [PATCH] file-browser: fix assert when going up in the tree
|
||||
|
||||
---
|
||||
plugins/filebrowser/gedit-file-browser-store.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/filebrowser/gedit-file-browser-store.c b/plugins/filebrowser/gedit-file-browser-store.c
|
||||
index 08baeb593..915941e71 100644
|
||||
--- a/plugins/filebrowser/gedit-file-browser-store.c
|
||||
+++ b/plugins/filebrowser/gedit-file-browser-store.c
|
||||
@@ -1263,7 +1263,7 @@ row_deleted (GeditFileBrowserStore *model,
|
||||
GtkTreePath *copy;
|
||||
|
||||
/* We should always be called when the row is still inserted */
|
||||
- g_return_if_fail (node->inserted == TRUE);
|
||||
+ g_return_if_fail (node->inserted == TRUE || NODE_IS_DUMMY (node));
|
||||
|
||||
hidden = FILE_IS_HIDDEN (node->flags);
|
||||
node->flags &= ~GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
|
||||
--
|
||||
2.18.1
|
||||
|
46
gedit-notebook-close-with-mmb.patch
Normal file
46
gedit-notebook-close-with-mmb.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From ad121f657157339ffc89a99e04efa3e5e5515721 Mon Sep 17 00:00:00 2001
|
||||
From: Corey Daley <cdaley@redhat.com>
|
||||
Date: Thu, 1 Nov 2018 19:30:00 +0100
|
||||
Subject: [PATCH] notebook: Allow closing of tabs with middle mouse button
|
||||
|
||||
---
|
||||
gedit/gedit-notebook.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gedit/gedit-notebook.c b/gedit/gedit-notebook.c
|
||||
index fcf22c39a..d06dd4983 100644
|
||||
--- a/gedit/gedit-notebook.c
|
||||
+++ b/gedit/gedit-notebook.c
|
||||
@@ -146,7 +146,6 @@ gedit_notebook_button_press_event (GtkWidget *widget,
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS &&
|
||||
- event->button == GDK_BUTTON_SECONDARY &&
|
||||
(event->state & gtk_accelerator_get_default_mod_mask ()) == 0)
|
||||
{
|
||||
gint tab_clicked;
|
||||
@@ -157,10 +156,19 @@ gedit_notebook_button_press_event (GtkWidget *widget,
|
||||
GtkWidget *tab;
|
||||
|
||||
tab = gtk_notebook_get_nth_page (notebook, tab_clicked);
|
||||
+ switch (event->button)
|
||||
+ {
|
||||
+ case GDK_BUTTON_SECONDARY:
|
||||
+ g_signal_emit (G_OBJECT (widget), signals[SHOW_POPUP_MENU], 0, event, tab);
|
||||
+ return GDK_EVENT_STOP;
|
||||
|
||||
- g_signal_emit (G_OBJECT (widget), signals[SHOW_POPUP_MENU], 0, event, tab);
|
||||
+ case GDK_BUTTON_MIDDLE:
|
||||
+ g_signal_emit (G_OBJECT (notebook), signals[TAB_CLOSE_REQUEST], 0, tab);
|
||||
+ return GDK_EVENT_STOP;
|
||||
|
||||
- return GDK_EVENT_STOP;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.18.1
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 7 16:10:58 UTC 2018 - bjorn.lie@gmail.com
|
||||
|
||||
- Add upstream bugfix patches:
|
||||
+ gedit-notebook-close-with-mmb.patch: notebook: Allow closing of
|
||||
tabs with middle mouse button.
|
||||
+ gedit-document-selector-make-search-caseless.patch: document
|
||||
selector: make search caseless.
|
||||
+ gedit-fix-assert-when-going-up-in-tree.patch: file-browser: fix
|
||||
assert when going up in the tree.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 23 11:27:23 UTC 2018 - bjorn.lie@gmail.com
|
||||
|
||||
|
@ -29,6 +29,13 @@ Source0: http://download.gnome.org/sources/gedit/3.30/%{name}-%{version}.
|
||||
Patch0: gedit-desktop.patch
|
||||
# PATCH-FIX-OPENSUSE gedit-plugins-python-env.patch bjorn.lie@gmail.com -- Fix python env
|
||||
Patch1: gedit-plugins-python-env.patch
|
||||
# PATCH-FIX-UPSTREAM gedit-notebook-close-with-mmb.patch -- notebook: Allow closing of tabs with middle mouse button
|
||||
Patch2: gedit-notebook-close-with-mmb.patch
|
||||
# PATCH-FIX-UPSTREAM gedit-document-selector-make-search-caseless.patch -- document selector: make search caseless
|
||||
Patch3: gedit-document-selector-make-search-caseless.patch
|
||||
# PATCH-FIX-UPSTREAM gedit-fix-assert-when-going-up-in-tree.patch -- file-browser: fix assert when going up in the tree
|
||||
Patch4: gedit-fix-assert-when-going-up-in-tree.patch
|
||||
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gobject-introspection-devel >= 0.9.3
|
||||
BuildRequires: gtk-doc
|
||||
|
Loading…
x
Reference in New Issue
Block a user