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
1=== modified file 'debian/control'
2--- debian/control 2012-11-20 15:26:51 +0000
3+++ debian/control 2015-02-06 16:34:35 +0000
4@@ -8,7 +8,7 @@
5 dh-autoreconf,
6 gnome-common,
7 python,
8- libglib2.0-dev (>= 2.22.3),
9+ libglib2.0-dev (>= 2.43.2),
10 libgtk-3-dev,
11 libdbusmenu-glib-dev (>= 0.5.90),
12 libdbusmenu-gtk3-dev (>= 0.5.90),
13
14=== modified file 'src/indicator-printer-state-notifier.c'
15--- src/indicator-printer-state-notifier.c 2012-03-03 10:43:18 +0000
16+++ src/indicator-printer-state-notifier.c 2015-02-06 16:34:35 +0000
17@@ -72,24 +72,6 @@
18 }
19
20
21-static gboolean
22-g_strv_contains (gchar **str_array,
23- gchar *needle)
24-{
25- gchar **str;
26-
27- if (!str_array)
28- return FALSE;
29-
30- for (str = str_array; *str; str++) {
31- if (!strcmp (*str, needle))
32- return TRUE;
33- }
34-
35- return FALSE;
36-}
37-
38-
39 /* returns a list of strings that are in a but not in b; does not copy the
40 * strings */
41 static GList *
42@@ -103,7 +85,7 @@
43 return NULL;
44
45 for (p = a; *p; p++) {
46- if (!g_strv_contains (b, *p))
47+ if (!g_strv_contains ((const gchar * const *) b, *p))
48 result = g_list_prepend (result, *p);
49 }
50

Subscribers

People subscribed via source and target branches