Merge lp:~donadigo/slingshot/fix-dock-theme-warnings into lp:~elementary-pantheon/slingshot/trunk

Proposed by Adam Bieńkowski on 2016-11-06
Status: Merged
Approved by: Daniel Fore on 2016-12-27
Approved revision: 700
Merged at revision: 710
Proposed branch: lp:~donadigo/slingshot/fix-dock-theme-warnings
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 21 lines (+3/-1)
1 file modified
src/Widgets/AppEntry.vala (+3/-1)
To merge this branch: bzr merge lp:~donadigo/slingshot/fix-dock-theme-warnings
Reviewer Review Type Date Requested Status
Zisu Andrei 2016-11-06 Approve on 2016-11-10
Review via email: mp+310139@code.launchpad.net

Commit message

Fix plank warnings about non-existing themes

Description of the change

Previously the Plank Paths class was not initialized and hence these warnings:
"g_file_get_child: assertion 'G_IS_FILE (file)' failed"
"g_file_query_exists: assertion 'G_IS_FILE(file)' failed"
"Theme.vala:508: Currently selected gtk+ theme 'elementary' does not provide a dock theme, fallback to the built-in defaults!"

These are fixed now, we initialize the Paths class with "plank" folder theme name and Build.PKGDATADIR, I've also replaced the "Gtk+" string with existing Plank.Theme.GTK_THEME_NAME.

To post a comment you must log in.
700. By Adam Bieńkowski on 2016-11-06

Fix get_child and dock theme warnings

Zisu Andrei (matzipan) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/AppEntry.vala'
2--- src/Widgets/AppEntry.vala 2016-07-05 20:18:20 +0000
3+++ src/Widgets/AppEntry.vala 2016-11-06 14:58:39 +0000
4@@ -53,6 +53,8 @@
5
6 #if HAS_PLANK
7 static construct {
8+ Plank.Paths.initialize ("plank", Build.PKGDATADIR);
9+ plank_theme = new Plank.DockTheme (Plank.Theme.GTK_THEME_NAME);
10 #if HAS_PLANK_0_11
11 plank_client = Plank.DBusClient.get_instance ();
12 #else
13@@ -62,7 +64,7 @@
14
15 #if HAS_PLANK_0_11
16 private const int SURFACE_SIZE = 48;
17- private static Plank.DockTheme plank_theme = new Plank.DockTheme ("Gtk+");
18+ private static Plank.DockTheme plank_theme;
19
20 private static Plank.DBusClient plank_client;
21 #else

Subscribers

People subscribed via source and target branches