aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2015-02-20 10:27:29 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-02-20 10:27:29 +0000
commit27edb14aed971c3bff2ca6d947b06468ed84e044 (patch)
tree808e1d722e0b938efab4ee9025914f819cf1f472
parent733c011f94aff2af2f3eba2ddd912d8de89a1036 (diff)
parent7df7cfffdd3249f96280e4b2f06bc4e4a5ef7d7f (diff)
downloadayatana-indicator-printers-27edb14aed971c3bff2ca6d947b06468ed84e044.tar.gz
ayatana-indicator-printers-27edb14aed971c3bff2ca6d947b06468ed84e044.tar.bz2
ayatana-indicator-printers-27edb14aed971c3bff2ca6d947b06468ed84e044.zip
Remove g_strv_contains()
It was added to glib recently. Approved by: Sebastien Bacher, PS Jenkins bot
-rw-r--r--debian/control2
-rw-r--r--src/indicator-printer-state-notifier.c20
2 files changed, 2 insertions, 20 deletions
diff --git a/debian/control b/debian/control
index 6ae01eb..62a0855 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 9),
dh-autoreconf,
gnome-common,
python,
- libglib2.0-dev (>= 2.22.3),
+ libglib2.0-dev (>= 2.43.2),
libgtk-3-dev,
libdbusmenu-glib-dev (>= 0.5.90),
libdbusmenu-gtk3-dev (>= 0.5.90),
diff --git a/src/indicator-printer-state-notifier.c b/src/indicator-printer-state-notifier.c
index 65eb5b0..08a7ecb 100644
--- a/src/indicator-printer-state-notifier.c
+++ b/src/indicator-printer-state-notifier.c
@@ -72,24 +72,6 @@ g_hash_table_insert_many (GHashTable *hash_table,
}
-static gboolean
-g_strv_contains (gchar **str_array,
- gchar *needle)
-{
- gchar **str;
-
- if (!str_array)
- return FALSE;
-
- for (str = str_array; *str; str++) {
- if (!strcmp (*str, needle))
- return TRUE;
- }
-
- return FALSE;
-}
-
-
/* returns a list of strings that are in a but not in b; does not copy the
* strings */
static GList *
@@ -103,7 +85,7 @@ g_strv_diff (gchar **a,
return NULL;
for (p = a; *p; p++) {
- if (!g_strv_contains (b, *p))
+ if (!g_strv_contains ((const gchar * const *) b, *p))
result = g_list_prepend (result, *p);
}