Commit ad570b6cb253fbbc17eff51c26437470608460ca
1 parent
540884a5
Exists in
master
and in
2 other branches
Adding support for customized icons.
Showing
2 changed files
with
21 additions
and
1 deletions
Show diff stats
src/objects/window/header.c
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | |
| 126 | 126 | GtkWidget * button = NULL; |
| 127 | 127 | g_autoptr(GSettings) settings = pw3270_application_window_settings_new(); |
| 128 | - gboolean symbolic = g_settings_get_int(settings,"header-icon-type") == 1; | |
| 128 | + gboolean symbolic = g_settings_get_int(settings,"header-icon-type") == 0; | |
| 129 | 129 | |
| 130 | 130 | if(g_str_has_prefix(action_name,"menu.")) { |
| 131 | 131 | ... | ... |
src/objects/window/window.c
| ... | ... | @@ -143,6 +143,26 @@ |
| 143 | 143 | |
| 144 | 144 | static void pw3270ApplicationWindow_class_init(pw3270ApplicationWindowClass *klass) { |
| 145 | 145 | |
| 146 | +#ifdef DEBUG | |
| 147 | + { | |
| 148 | + gtk_icon_theme_append_search_path( | |
| 149 | + gtk_icon_theme_get_default(), | |
| 150 | + "./icons" | |
| 151 | + ); | |
| 152 | + } | |
| 153 | +#else | |
| 154 | + { | |
| 155 | + lib3270_autoptr(char) path = lib3270_build_data_filename("icons",NULL); | |
| 156 | + if(g_file_test(path,G_FILE_TEST_IS_DIR)) { | |
| 157 | + gtk_icon_theme_append_search_path( | |
| 158 | + gtk_icon_theme_get_default(), | |
| 159 | + path | |
| 160 | + ); | |
| 161 | + } | |
| 162 | + } | |
| 163 | +#endif // DEBUG | |
| 164 | + | |
| 165 | + | |
| 146 | 166 | { |
| 147 | 167 | GtkWidgetClass *widget = GTK_WIDGET_CLASS(klass); |
| 148 | 168 | widget->destroy = destroy; | ... | ... |