[gthumb] don't use functions not available in glib 2.36
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] don't use functions not available in glib 2.36
- Date: Sun, 29 Mar 2015 17:50:44 +0000 (UTC)
commit 9e8d99964ea3beacdb03ddc50b216d88b204fc6e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Mar 29 19:46:13 2015 +0200
don't use functions not available in glib 2.36
gthumb/glib-utils.c | 8 ++++++++
gthumb/glib-utils.h | 2 ++
gthumb/gth-main.c | 2 +-
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index cd74a8f..7d4dd15 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -1319,6 +1319,14 @@ _g_strv_find (char **v,
}
+gboolean
+_g_strv_contains (char **v,
+ const char *s)
+{
+ return (_g_strv_find (v, s) >= 0);
+}
+
+
char **
_g_strv_prepend (char **str_array,
const char *str)
diff --git a/gthumb/glib-utils.h b/gthumb/glib-utils.h
index af3b340..5a9d76c 100644
--- a/gthumb/glib-utils.h
+++ b/gthumb/glib-utils.h
@@ -211,6 +211,8 @@ const char * get_static_string (const char *s);
char * _g_rand_string (int len);
int _g_strv_find (char **v,
const char *s);
+gboolean _g_strv_contains (char **v,
+ const char *s);
char ** _g_strv_prepend (char **str_array,
const char *str);
char ** _g_strv_concat (const char *const *strv1,
diff --git a/gthumb/gth-main.c b/gthumb/gth-main.c
index 4a70138..3f4ff45 100644
--- a/gthumb/gth-main.c
+++ b/gthumb/gth-main.c
@@ -1277,7 +1277,7 @@ gth_main_activate_extensions (void)
GthExtensionDescription *description;
GError *error = NULL;
- mandatory = g_strv_contains (mandatory_extensions, name);
+ mandatory = _g_strv_contains (mandatory_extensions, name);
description = gth_extension_manager_get_description (manager, name);
if (! mandatory && (description != NULL) && description->hidden)
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]