Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
geany-plugins
644550babb52013d2625a3f8e789bbe94a335b6f.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 644550babb52013d2625a3f8e789bbe94a335b6f.patch of Package geany-plugins
From 05752c4c62dfbfa6f1038f2c280e02cbc6054f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= <techet@gmail.com> Date: Tue, 23 Apr 2024 18:43:51 +0200 Subject: [PATCH] projectorganizer: Use g_pattern_spec_match_string() instead of g_pattern_match_string() Eliminates a warning on newer glib versions. Adds a fallback on older versions. --- projectorganizer/src/prjorg-project.c | 2 +- projectorganizer/src/prjorg-sidebar.c | 4 ++-- projectorganizer/src/prjorg-utils.c | 4 ++-- projectorganizer/src/prjorg-utils.h | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/projectorganizer/src/prjorg-project.c b/projectorganizer/src/prjorg-project.c index 2161925bd..537c8a8cf 100644 --- a/projectorganizer/src/prjorg-project.c +++ b/projectorganizer/src/prjorg-project.c @@ -216,7 +216,7 @@ static gboolean match_basename(gconstpointer pft, gconstpointer user_data) { GPatternSpec *pattern = g_pattern_spec_new(ft->pattern[j]); - if (g_pattern_match_string(pattern, utf8_base_filename)) + if (g_pattern_spec_match_string(pattern, utf8_base_filename)) { ret = TRUE; g_pattern_spec_free(pattern); diff --git a/projectorganizer/src/prjorg-sidebar.c b/projectorganizer/src/prjorg-sidebar.c index 43b48fcbe..0a3e25eef 100644 --- a/projectorganizer/src/prjorg-sidebar.c +++ b/projectorganizer/src/prjorg-sidebar.c @@ -657,7 +657,7 @@ static void find_file_recursive(GtkTreeIter *iter, gboolean case_sensitive, gboo if (!case_sensitive) SETPTR(utf8_name, g_utf8_strdown(utf8_name, -1)); - if (g_pattern_match_string(pattern, utf8_name)) + if (g_pattern_spec_match_string(pattern, utf8_name)) { gchar *utf8_base_path = get_project_base_path(); gchar *utf8_path, *rel_path; @@ -840,7 +840,7 @@ static gboolean match(TMTag *tag, const gchar *name, gboolean declaration, gbool matches = g_strcmp0(name_case, name) == 0; break; case MATCH_PATTERN: - matches = g_pattern_match_string(pspec, name_case); + matches = g_pattern_spec_match_string(pspec, name_case); break; case MATCH_PREFIX: matches = g_str_has_prefix(name_case, name); diff --git a/projectorganizer/src/prjorg-utils.c b/projectorganizer/src/prjorg-utils.c index 2a8847e0d..0b573e5f8 100644 --- a/projectorganizer/src/prjorg-utils.c +++ b/projectorganizer/src/prjorg-utils.c @@ -80,7 +80,7 @@ gboolean patterns_match(GSList *patterns, const gchar *str) foreach_slist (elem, patterns) { GPatternSpec *pattern = elem->data; - if (g_pattern_match_string(pattern, str)) + if (g_pattern_spec_match_string(pattern, str)) return TRUE; } return FALSE; @@ -269,7 +269,7 @@ gchar *try_find_header_source(gchar *utf8_file_name, gboolean is_header, GSList full_name = elem->data; gchar *base_name = g_path_get_basename(full_name); - if (g_pattern_match_string(pattern, base_name)) + if (g_pattern_spec_match_string(pattern, base_name)) { if ((is_header && patterns_match(source_patterns, base_name)) || (!is_header && patterns_match(header_patterns, base_name))) diff --git a/projectorganizer/src/prjorg-utils.h b/projectorganizer/src/prjorg-utils.h index b753a84f0..25c0d28a6 100644 --- a/projectorganizer/src/prjorg-utils.h +++ b/projectorganizer/src/prjorg-utils.h @@ -22,6 +22,10 @@ #include <gtk/gtk.h> #include <geanyplugin.h> +#if ! GLIB_CHECK_VERSION(2, 70, 0) +# define g_pattern_spec_match_string g_pattern_match_string +#endif + gchar *get_relative_path(const gchar *utf8_parent, const gchar *utf8_descendant); gboolean patterns_match(GSList *patterns, const gchar *str);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor