From ad570b6cb253fbbc17eff51c26437470608460ca Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Sat, 19 Sep 2020 12:23:34 -0300 Subject: [PATCH] Adding support for customized icons. --- src/objects/window/header.c | 2 +- src/objects/window/window.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/objects/window/header.c b/src/objects/window/header.c index d88eaa7..0489709 100644 --- a/src/objects/window/header.c +++ b/src/objects/window/header.c @@ -125,7 +125,7 @@ GtkWidget * button = NULL; g_autoptr(GSettings) settings = pw3270_application_window_settings_new(); - gboolean symbolic = g_settings_get_int(settings,"header-icon-type") == 1; + gboolean symbolic = g_settings_get_int(settings,"header-icon-type") == 0; if(g_str_has_prefix(action_name,"menu.")) { diff --git a/src/objects/window/window.c b/src/objects/window/window.c index 7fa1ffe..252e3b7 100644 --- a/src/objects/window/window.c +++ b/src/objects/window/window.c @@ -143,6 +143,26 @@ static void pw3270ApplicationWindow_class_init(pw3270ApplicationWindowClass *klass) { +#ifdef DEBUG + { + gtk_icon_theme_append_search_path( + gtk_icon_theme_get_default(), + "./icons" + ); + } +#else + { + lib3270_autoptr(char) path = lib3270_build_data_filename("icons",NULL); + if(g_file_test(path,G_FILE_TEST_IS_DIR)) { + gtk_icon_theme_append_search_path( + gtk_icon_theme_get_default(), + path + ); + } + } +#endif // DEBUG + + { GtkWidgetClass *widget = GTK_WIDGET_CLASS(klass); widget->destroy = destroy; -- libgit2 0.21.2