Merge lp:~larsu/indicator-printers/remove-gstrv-contains into lp:indicator-printers/15.04

Proposed by Lars Karlitski
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 75
Merged at revision: 73
Proposed branch: lp:~larsu/indicator-printers/remove-gstrv-contains
Merge into: lp:indicator-printers/15.04
Diff against target: 49 lines (+2/-20)
2 files modified
debian/control (+1/-1)
src/indicator-printer-state-notifier.c (+1/-19)
To merge this branch: bzr merge lp:~larsu/indicator-printers/remove-gstrv-contains
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
PS Jenkins bot (community) continuous-integration Approve
Iain Lane Pending
Review via email: mp+248918@code.launchpad.net

Commit message

Remove g_strv_contains()

It was added to glib recently.

Description of the change

Remove g_strv_contains()

It was added to glib recently.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

shouldn't the glib requirement be bumped to that glib version?

74. By Lars Karlitski

Bump glib depend for g_strv_contains()

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

we only have glib 2.43, should probably use that for the b-d

review: Needs Fixing
75. By Lars Karlitski

Bump glib version, this time to the correct one

2.44 is not yet released.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2012-11-20 15:26:51 +0000
+++ debian/control 2015-02-06 16:34:35 +0000
@@ -8,7 +8,7 @@
8 dh-autoreconf,8 dh-autoreconf,
9 gnome-common,9 gnome-common,
10 python,10 python,
11 libglib2.0-dev (>= 2.22.3),11 libglib2.0-dev (>= 2.43.2),
12 libgtk-3-dev,12 libgtk-3-dev,
13 libdbusmenu-glib-dev (>= 0.5.90),13 libdbusmenu-glib-dev (>= 0.5.90),
14 libdbusmenu-gtk3-dev (>= 0.5.90),14 libdbusmenu-gtk3-dev (>= 0.5.90),
1515
=== modified file 'src/indicator-printer-state-notifier.c'
--- src/indicator-printer-state-notifier.c 2012-03-03 10:43:18 +0000
+++ src/indicator-printer-state-notifier.c 2015-02-06 16:34:35 +0000
@@ -72,24 +72,6 @@
72}72}
7373
7474
75static gboolean
76g_strv_contains (gchar **str_array,
77 gchar *needle)
78{
79 gchar **str;
80
81 if (!str_array)
82 return FALSE;
83
84 for (str = str_array; *str; str++) {
85 if (!strcmp (*str, needle))
86 return TRUE;
87 }
88
89 return FALSE;
90}
91
92
93/* returns a list of strings that are in a but not in b; does not copy the75/* returns a list of strings that are in a but not in b; does not copy the
94 * strings */76 * strings */
95static GList *77static GList *
@@ -103,7 +85,7 @@
103 return NULL;85 return NULL;
10486
105 for (p = a; *p; p++) {87 for (p = a; *p; p++) {
106 if (!g_strv_contains (b, *p))88 if (!g_strv_contains ((const gchar * const *) b, *p))
107 result = g_list_prepend (result, *p);89 result = g_list_prepend (result, *p);
108 }90 }
10991

Subscribers

People subscribed via source and target branches