[gedit] filebrowser: fix use of deprecated g_pattern function
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] filebrowser: fix use of deprecated g_pattern function
- Date: Sun, 17 Jul 2022 14:20:52 +0000 (UTC)
commit 65b17ec045a343d7ce022419dd5c44cea6b950bb
Author: Sébastien Wilmet <swilmet informatique-libre be>
Date: Sun Jul 17 16:04:55 2022 +0200
filebrowser: fix use of deprecated g_pattern function
When briefly looking at the API docs of these two functions, it's hard
to know if they are implemented exactly the same.
But when looking at the *implementation* of g_pattern_match(), it just
calls directly g_pattern_spec_match() with the same args.
Tested with printf-debugging, the pattern correctly matches *.la files
(from a built Autotools project).
So everything should be fine, and the feature still works.
meson.build | 2 +-
plugins/filebrowser/gedit-file-browser-store.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6b02abf48..a9ce7d0da 100644
--- a/meson.build
+++ b/meson.build
@@ -40,7 +40,7 @@ libgd_subproject = subproject(
libgd_dep = libgd_subproject.get_variable('libgd_dep')
# Dependencies
-gio_dep = dependency('gio-2.0', version: '>= 2.64')
+gio_dep = dependency('gio-2.0', version: '>= 2.70')
libgedit_public_deps = [
gio_dep,
diff --git a/plugins/filebrowser/gedit-file-browser-store.c b/plugins/filebrowser/gedit-file-browser-store.c
index 6a5ccaf94..b456e63cd 100644
--- a/plugins/filebrowser/gedit-file-browser-store.c
+++ b/plugins/filebrowser/gedit-file-browser-store.c
@@ -1032,7 +1032,7 @@ model_node_update_visibility (GeditFileBrowserStore *model,
{
GPatternSpec *spec = g_ptr_array_index (model->priv->binary_pattern_specs, i);
- if (g_pattern_match (spec, name_length, node->name, name_reversed))
+ if (g_pattern_spec_match (spec, name_length, node->name, name_reversed))
{
node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_FILTERED;
g_free (name_reversed);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]