Merge lp:~mterry/ubuntu-app-launch/default-themes into lp:ubuntu-app-launch

Proposed by Michael Terry
Status: Rejected
Rejected by: Michael Terry
Proposed branch: lp:~mterry/ubuntu-app-launch/default-themes
Merge into: lp:ubuntu-app-launch
Diff against target: 31 lines (+14/-0)
1 file modified
libubuntu-app-launch/application-icon-finder.cpp (+14/-0)
To merge this branch: bzr merge lp:~mterry/ubuntu-app-launch/default-themes
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
unity-api-1-bot continuous-integration Needs Fixing
Review via email: mp+318965@code.launchpad.net

Commit message

Look in Adwaita and gnome icon themes as well as hicolor and Humanity for fallbacks.

Description of the change

Run "ubuntu-app-info gucharmap" before and after to see amazing results!

GTK+ uses Adwaita, gnome, and hicolor as icon fallbacks [1]. We should probably match that behavior, else some apps on the desktop don't show icons (like gucharmap).

[1] https://git.gnome.org/browse/gtk+/tree/gtk/gtkicontheme.c#n1331

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Do we want to look at suru too?

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
dobey (dobey) wrote :

I'm not sure what to say about this right now. It seems we don't really handle icon themes at all under Unity8, which is very unfortunate. Should we actually handle themes?

Revision history for this message
Ted Gould (ted) wrote :

I think that's a larger question. For now this fixes the issue of a broken ISO, which is an immediate need. If we want to do more theming in the future is different question.

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

Unmerged revisions

295. By Michael Terry

Look in Adwaita and gnome icon themes too

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libubuntu-app-launch/application-icon-finder.cpp'
--- libubuntu-app-launch/application-icon-finder.cpp 2017-01-10 18:41:25 +0000
+++ libubuntu-app-launch/application-icon-finder.cpp 2017-03-03 22:05:22 +0000
@@ -29,6 +29,8 @@
29constexpr auto ICONS_DIR = "/icons";29constexpr auto ICONS_DIR = "/icons";
30constexpr auto HICOLOR_THEME_DIR = "/icons/hicolor";30constexpr auto HICOLOR_THEME_DIR = "/icons/hicolor";
31constexpr auto HUMANITY_THEME_DIR = "/icons/Humanity";31constexpr auto HUMANITY_THEME_DIR = "/icons/Humanity";
32constexpr auto ADWAITA_THEME_DIR = "/icons/Adwaita";
33constexpr auto GNOME_THEME_DIR = "/icons/gnome";
32constexpr auto THEME_INDEX_FILE = "index.theme";34constexpr auto THEME_INDEX_FILE = "index.theme";
33constexpr auto APPLICATIONS_TYPE = "Applications";35constexpr auto APPLICATIONS_TYPE = "Applications";
34constexpr auto SIZE_PROPERTY = "Size";36constexpr auto SIZE_PROPERTY = "Size";
@@ -347,6 +349,18 @@
347 iconPaths.splice(iconPaths.end(), humanityIcons);349 iconPaths.splice(iconPaths.end(), humanityIcons);
348 g_free(humanityDir);350 g_free(humanityDir);
349351
352 /* Icons from the Adwaita theme (gtk looks here by default, so lets match its behavior) */
353 auto adwaitaDir = g_build_filename(basePath.c_str(), ADWAITA_THEME_DIR, nullptr);
354 auto adwaitaIcons = iconsFromThemePath(adwaitaDir);
355 iconPaths.splice(iconPaths.end(), adwaitaIcons);
356 g_free(adwaitaDir);
357
358 /* Icons from the gnome theme (gtk looks here by default, so lets match its behavior) */
359 auto gnomeDir = g_build_filename(basePath.c_str(), GNOME_THEME_DIR, nullptr);
360 auto gnomeIcons = iconsFromThemePath(gnomeDir);
361 iconPaths.splice(iconPaths.end(), gnomeIcons);
362 g_free(gnomeDir);
363
350 /* Add root icons directory as potential path */364 /* Add root icons directory as potential path */
351 auto iconsPath = g_build_filename(basePath.c_str(), ICONS_DIR, nullptr);365 auto iconsPath = g_build_filename(basePath.c_str(), ICONS_DIR, nullptr);
352 if (g_file_test(iconsPath, G_FILE_TEST_IS_DIR))366 if (g_file_test(iconsPath, G_FILE_TEST_IS_DIR))

Subscribers

People subscribed via source and target branches