[evolution] Add all icon directories into icon theme search path in maintainer mode



commit d7db73226f0e582b8e9d6dfc3442dbe41cae99e9
Author: Milan Crha <mcrha redhat com>
Date:   Wed May 29 12:43:52 2019 +0200

    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.

 config.h.in              | 3 +++
 src/shell/CMakeLists.txt | 1 +
 src/shell/main.c         | 8 ++++++++
 3 files changed, 12 insertions(+)
---
diff --git a/config.h.in b/config.h.in
index 19bfc49cc9..55666a185d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -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@"
 
diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt
index 1eb839d8a1..86d4437bcb 100644
--- a/src/shell/CMakeLists.txt
+++ b/src/shell/CMakeLists.txt
@@ -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}\"
diff --git a/src/shell/main.c b/src/shell/main.c
index 1813702b2e..d89c4f8bb9 100644
--- a/src/shell/main.c
+++ b/src/shell/main.c
@@ -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 ());
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]