Merge lp:~azzar1/bamf/lp-1407192 into lp:bamf

Proposed by Andrea Azzarone on 2015-01-16
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2015-01-21
Approved revision: 606
Merged at revision: 607
Proposed branch: lp:~azzar1/bamf/lp-1407192
Merge into: lp:bamf
Diff against target: 30 lines (+11/-1)
1 file modified
src/bamf-application.c (+11/-1)
To merge this branch: bzr merge lp:~azzar1/bamf/lp-1407192
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2015-01-16 Approve on 2015-01-21
PS Jenkins bot continuous-integration Needs Fixing on 2015-01-16
Review via email: mp+246749@code.launchpad.net

Commit Message

Replace gtk_icon_theme_has_icon with gtk_icon_theme_lookup_icon.

To post a comment you must log in.
lp:~azzar1/bamf/lp-1407192 updated on 2015-01-16
605. By Andrea Azzarone on 2015-01-16

Replace gtk_icon_theme_has_icon with gtk_icon_theme_lookup_icon.

PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~azzar1/bamf/lp-1407192 updated on 2015-01-21
606. By Andrea Azzarone on 2015-01-21

Minor change.

Andrea Azzarone (azzar1) wrote :

Done!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bamf-application.c'
2--- src/bamf-application.c 2014-02-14 06:45:13 +0000
3+++ src/bamf-application.c 2015-01-21 14:43:36 +0000
4@@ -182,6 +182,7 @@
5 icon_name_is_valid (const char *name)
6 {
7 GtkIconTheme *icon_theme;
8+ GtkIconInfo *icon_info;
9
10 if (!name || name[0] == '\0')
11 return FALSE;
12@@ -189,8 +190,17 @@
13 if (g_file_test (name, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
14 return TRUE;
15
16+ // Please note that since gtk 3.14 gtk_icon_theme_has_icon stopped working.
17 icon_theme = gtk_icon_theme_get_default ();
18- return gtk_icon_theme_has_icon (icon_theme, name);
19+ icon_info = gtk_icon_theme_lookup_icon (icon_theme, name, -1, 0);
20+
21+ if (icon_info != NULL)
22+ {
23+ g_object_unref (icon_info);
24+ return TRUE;
25+ }
26+
27+ return FALSE;
28 }
29
30 static gboolean

Subscribers

People subscribed via source and target branches

to all changes: