From 9b62f6365de4d1740ae510df93023079d3ff3cd2 Mon Sep 17 00:00:00 2001 From: Armin Burgmeier Date: Sat, 31 Oct 2009 23:51:52 +0100 Subject: [PATCH] Fix application icon lookup if installed in a non-standard prefix 2009-10-31 Armin Burgmeier * code/Makefile.am: Pass both public and private icon paths to the code. * code/core/iconmanager.cpp: Add both to the icon search path. This fixes lookup of the application icon if gobby is installed in a non-standard prefix. --- ChangeLog | 9 +++++++++ code/core/Makefile.am | 10 ++++++---- code/core/iconmanager.cpp | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7adcc5..861b17e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-10-31 Armin Burgmeier + + * code/Makefile.am: Pass both public and private icon paths to the + code. + + * code/core/iconmanager.cpp: Add both to the icon search path. This + fixes lookup of the application icon if gobby is installed in a + non-standard prefix. + 2009-10-26 Armin Burgmeier * code/core/userlist.cpp (sort_func): Sort the user list diff --git a/code/core/Makefile.am b/code/core/Makefile.am index 68cced0..d75e516 100644 --- a/code/core/Makefile.am +++ b/code/core/Makefile.am @@ -39,9 +39,11 @@ noinst_HEADERS = \ appicondir = $(datadir)/pixmaps pixmapdir = $(datadir)/pixmaps/gobby-0.5 -# ICONS_DIR is required by iconmanager.cpp to get access to the private icons -# that are installed into prefix/share/gobby-0.5/icons instead of -# prefix/share/icons. +# PRIVATE_ICONS_DIR is required by iconmanager.cpp to get access to the +# private icons that are installed into prefix/share/gobby-0.5/icons instead +# of prefix/share/icons. We also set PUBLIC_ICONS_DIR explicitely so that +# we find the application icon if it is installed in a non-standard prefix. AM_CPPFLAGS = $(gobby_CFLAGS) $(unique_CFLAGS) $(infinote_CFLAGS) \ -I$(top_srcdir)/code \ - -DICONS_DIR=\""$(datadir)/gobby-0.5/icons"\" + -DPRIVATE_ICONS_DIR=\""$(datadir)/gobby-0.5/icons"\" \ + -DPUBLIC_ICONS_DIR=\""$(datadir)/icons"\" diff --git a/code/core/iconmanager.cpp b/code/core/iconmanager.cpp index c74a572..46748d8 100644 --- a/code/core/iconmanager.cpp +++ b/code/core/iconmanager.cpp @@ -33,7 +33,8 @@ Gtk::StockID Gobby::IconManager::STOCK_USER_COLOR_INDICATOR( Gobby::IconManager::IconManager(): m_icon_factory(Gtk::IconFactory::create() ) { - Gtk::IconTheme::get_default()->append_search_path(ICONS_DIR); + Gtk::IconTheme::get_default()->append_search_path(PUBLIC_ICONS_DIR); + Gtk::IconTheme::get_default()->append_search_path(PRIVATE_ICONS_DIR); Gtk::IconSource userlist_source; userlist_source.set_icon_name("user-list"); -- 1.6.5.1