Add all icon directories into icon theme search path in maintainer mode

When building into a custom prefix, the icons in PREFIX/share/icons/ may
not be found in some cases, thus, when building also with
the ENABLE_MAINTAINER_MODE, add also that directory into the gtk+
icon theme search path.
This commit is contained in:
Milan Crha
2019-05-29 12:43:52 +02:00
parent ac6cb993b0
commit d7db73226f
3 changed files with 12 additions and 0 deletions

View File

@ -27,6 +27,9 @@
/* Package name for gettext */
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
/* Defined, when configured with ENABLE_MAINTAINER_MODE */
#cmakedefine ENABLE_MAINTAINER_MODE 1
/* Command to kill processes by name */
#cmakedefine KILL_PROCESS_COMMAND "@KILL_PROCESS_COMMAND@"

View File

@ -130,6 +130,7 @@ target_compile_definitions(evolution PRIVATE
-DEVOLUTION_GALVIEWSDIR=\"${viewsdir}\"
-DEVOLUTION_HELPDIR=\"${evolutionhelpdir}\"
-DEVOLUTION_ICONDIR=\"${icondir}\"
-DEVOLUTION_ICONDIR_IN_PREFIX=\"${SHARE_INSTALL_PREFIX}/icons\"
-DEVOLUTION_MODULEDIR=\"${moduledir}\"
-DEVOLUTION_RULEDIR=\"${privdatadir}\"
-DEVOLUTION_TOOLSDIR=\"${privlibexecdir}\"

View File

@ -448,6 +448,9 @@ main (gint argc,
{
EShell *shell;
GSettings *settings;
#ifdef ENABLE_MAINTAINER_MODE
GtkIconTheme *icon_theme;
#endif
#ifdef DEVELOPMENT
gboolean skip_warning_dialog;
#endif
@ -590,6 +593,11 @@ main (gint argc,
if (setup_only)
exit (0);
#ifdef ENABLE_MAINTAINER_MODE
icon_theme = gtk_icon_theme_get_default ();
gtk_icon_theme_prepend_search_path (icon_theme, EVOLUTION_ICONDIR_IN_PREFIX);
#endif
categories_icon_theme_hack ();
gtk_accel_map_load (e_get_accels_filename ());