Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: move XPM icons to separate files

Replace deprecated gdk_pixbuf_new_from_xpm_data() with gdk_pixbuf_new_from_file()
and update both GTK and QT frontends to load XPM icons from separate files
in scripts/kconfig/icons/ instead of from the code.

xpm_menu_inv and xpm_void were removed and not converted into xpm files
because they are not used since commit 64285dc5c41f ("kconfig: gconf:
inline fill_row() into set_node()").

This eliminates the GTK deprecation warnings at compile time and
improves memory usage and code organization.

Signed-off-by: Rostislav Krasny <rostiprodev@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://patch.msgid.link/20251217015409.30102-2-rostiprodev@gmail.com
[nathan: Minor commit message clean ups]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Rostislav Krasny and committed by
Nathan Chancellor
18e2d526 a4df2071

+345 -385
+2 -2
scripts/kconfig/Makefile
··· 201 201 # qconf: Used for the xconfig target based on Qt 202 202 hostprogs += qconf 203 203 qconf-cxxobjs := qconf.o qconf-moc.o 204 - qconf-objs := images.o $(common-objs) 204 + qconf-objs := $(common-objs) 205 205 206 206 HOSTLDLIBS_qconf = $(call read-file, $(obj)/qconf-libs) 207 207 HOSTCXXFLAGS_qconf.o = -std=c++11 -fPIC $(call read-file, $(obj)/qconf-cflags) ··· 219 219 220 220 # gconf: Used for the gconfig target based on GTK+ 221 221 hostprogs += gconf 222 - gconf-objs := gconf.o images.o $(common-objs) 222 + gconf-objs := gconf.o $(common-objs) 223 223 224 224 HOSTLDLIBS_gconf = $(call read-file, $(obj)/gconf-libs) 225 225 HOSTCFLAGS_gconf.o = $(call read-file, $(obj)/gconf-cflags)
+28 -7
scripts/kconfig/gconf.c
··· 5 5 6 6 #include <stdlib.h> 7 7 #include "lkc.h" 8 - #include "images.h" 9 8 10 9 #include <gtk/gtk.h> 11 10 ··· 950 951 } 951 952 952 953 /* Main Window Initialization */ 953 - static void replace_button_icon(GtkWidget *widget, const char * const xpm[]) 954 + static void replace_button_icon(GtkWidget *widget, const char *filename) 954 955 { 955 956 GdkPixbuf *pixbuf; 956 957 GtkWidget *image; 958 + GError *err = NULL; 957 959 958 - pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)xpm); 960 + char *env = getenv(SRCTREE); 961 + gchar *path = g_strconcat(env ? env : g_get_current_dir(), "/scripts/kconfig/icons/", filename, NULL); 962 + 963 + pixbuf = gdk_pixbuf_new_from_file(path, &err); 964 + g_free(path); 965 + 966 + if (err) { 967 + g_warning("Failed to load icon %s: %s", filename, err->message); 968 + g_error_free(err); 969 + return; 970 + } 971 + 959 972 image = gtk_image_new_from_pixbuf(pixbuf); 960 973 g_object_unref(pixbuf); 961 974 ··· 1089 1078 single_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button4")); 1090 1079 g_signal_connect(single_btn, "clicked", 1091 1080 G_CALLBACK(on_single_clicked), NULL); 1092 - replace_button_icon(single_btn, xpm_single_view); 1081 + replace_button_icon(single_btn, "single_view.xpm"); 1093 1082 1094 1083 split_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button5")); 1095 1084 g_signal_connect(split_btn, "clicked", 1096 1085 G_CALLBACK(on_split_clicked), NULL); 1097 - replace_button_icon(split_btn, xpm_split_view); 1086 + replace_button_icon(split_btn, "split_view.xpm"); 1098 1087 1099 1088 full_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button6")); 1100 1089 g_signal_connect(full_btn, "clicked", 1101 1090 G_CALLBACK(on_full_clicked), NULL); 1102 - replace_button_icon(full_btn, xpm_tree_view); 1091 + replace_button_icon(full_btn, "tree_view.xpm"); 1103 1092 1104 1093 widget = GTK_WIDGET(gtk_builder_get_object(builder, "button7")); 1105 1094 g_signal_connect(widget, "clicked", ··· 1280 1269 g_signal_connect(G_OBJECT(renderer), "edited", 1281 1270 G_CALLBACK(renderer_edited), tree2_w); 1282 1271 1283 - pix_menu = gdk_pixbuf_new_from_xpm_data((const char **)xpm_menu); 1272 + char *env = getenv(SRCTREE); 1273 + gchar *path = g_strconcat(env ? env : g_get_current_dir(), "/scripts/kconfig/icons/menu.xpm", NULL); 1274 + GError *err = NULL; 1275 + 1276 + pix_menu = gdk_pixbuf_new_from_file(path, &err); 1277 + g_free(path); 1278 + 1279 + if (err) { 1280 + g_warning("Failed to load menu icon: %s", err->message); 1281 + g_error_free(err); 1282 + } 1284 1283 1285 1284 for (i = 0; i < COL_VALUE; i++) { 1286 1285 column = gtk_tree_view_get_column(view, i);
+29
scripts/kconfig/icons/back.xpm
··· 1 + /* XPM */ 2 + static char * back_xpm[] = { 3 + "22 22 3 1", 4 + ". c None", 5 + "# c #000083", 6 + "a c #838183", 7 + "......................", 8 + "......................", 9 + "......................", 10 + "......................", 11 + "......................", 12 + "...........######a....", 13 + "..#......##########...", 14 + "..##...####......##a..", 15 + "..###.###.........##..", 16 + "..######..........##..", 17 + "..#####...........##..", 18 + "..######..........##..", 19 + "..#######.........##..", 20 + "..########.......##a..", 21 + "...............a###...", 22 + "...............###....", 23 + "......................", 24 + "......................", 25 + "......................", 26 + "......................", 27 + "......................", 28 + "......................" 29 + };
+18
scripts/kconfig/icons/choice_no.xpm
··· 1 + /* XPM */ 2 + static char * choice_no_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .... ", 8 + " .. .. ", 9 + " . . ", 10 + " . . ", 11 + " . . ", 12 + " . . ", 13 + " . . ", 14 + " . . ", 15 + " .. .. ", 16 + " .... ", 17 + " " 18 + };
+18
scripts/kconfig/icons/choice_yes.xpm
··· 1 + /* XPM */ 2 + static char * choice_yes_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .... ", 8 + " .. .. ", 9 + " . . ", 10 + " . .. . ", 11 + " . .... . ", 12 + " . .... . ", 13 + " . .. . ", 14 + " . . ", 15 + " .. .. ", 16 + " .... ", 17 + " " 18 + };
+31
scripts/kconfig/icons/load.xpm
··· 1 + /* XPM */ 2 + static char * load_xpm[] = { 3 + "22 22 5 1", 4 + ". c None", 5 + "# c #000000", 6 + "c c #838100", 7 + "a c #ffff00", 8 + "b c #ffffff", 9 + "......................", 10 + "......................", 11 + "......................", 12 + "............####....#.", 13 + "...........#....##.##.", 14 + "..................###.", 15 + ".................####.", 16 + ".####...........#####.", 17 + "#abab##########.......", 18 + "#babababababab#.......", 19 + "#ababababababa#.......", 20 + "#babababababab#.......", 21 + "#ababab###############", 22 + "#babab##cccccccccccc##", 23 + "#abab##cccccccccccc##.", 24 + "#bab##cccccccccccc##..", 25 + "#ab##cccccccccccc##...", 26 + "#b##cccccccccccc##....", 27 + "###cccccccccccc##.....", 28 + "##cccccccccccc##......", 29 + "###############.......", 30 + "......................" 31 + };
+18
scripts/kconfig/icons/menu.xpm
··· 1 + /* XPM */ 2 + static char * menu_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .......... ", 8 + " . . ", 9 + " . .. . ", 10 + " . .... . ", 11 + " . ...... . ", 12 + " . ...... . ", 13 + " . .... . ", 14 + " . .. . ", 15 + " . . ", 16 + " .......... ", 17 + " " 18 + };
+18
scripts/kconfig/icons/menuback.xpm
··· 1 + /* XPM */ 2 + static char * menuback_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .......... ", 8 + " . . ", 9 + " . .. . ", 10 + " . .... . ", 11 + " . ...... . ", 12 + " . ...... . ", 13 + " . .... . ", 14 + " . .. . ", 15 + " . . ", 16 + " .......... ", 17 + " " 18 + };
+31
scripts/kconfig/icons/save.xpm
··· 1 + /* XPM */ 2 + static char * save_xpm[] = { 3 + "22 22 5 1", 4 + ". c None", 5 + "# c #000000", 6 + "a c #838100", 7 + "b c #c5c2c5", 8 + "c c #cdb6d5", 9 + "......................", 10 + ".####################.", 11 + ".#aa#bbbbbbbbbbbb#bb#.", 12 + ".#aa#bbbbbbbbbbbb#bb#.", 13 + ".#aa#bbbbbbbbbcbb####.", 14 + ".#aa#bbbccbbbbbbb#aa#.", 15 + ".#aa#bbbccbbbbbbb#aa#.", 16 + ".#aa#bbbbbbbbbbbb#aa#.", 17 + ".#aa#bbbbbbbbbbbb#aa#.", 18 + ".#aa#bbbbbbbbbbbb#aa#.", 19 + ".#aa#bbbbbbbbbbbb#aa#.", 20 + ".#aaa############aaa#.", 21 + ".#aaaaaaaaaaaaaaaaaa#.", 22 + ".#aaaaaaaaaaaaaaaaaa#.", 23 + ".#aaa#############aa#.", 24 + ".#aaa#########bbb#aa#.", 25 + ".#aaa#########bbb#aa#.", 26 + ".#aaa#########bbb#aa#.", 27 + ".#aaa#########bbb#aa#.", 28 + ".#aaa#########bbb#aa#.", 29 + "..##################..", 30 + "......................" 31 + };
+28
scripts/kconfig/icons/single_view.xpm
··· 1 + /* XPM */ 2 + static char * single_view_xpm[] = { 3 + "22 22 2 1", 4 + ". c None", 5 + "# c #000000", 6 + "......................", 7 + "......................", 8 + "..........#...........", 9 + "..........#...........", 10 + "..........#...........", 11 + "..........#...........", 12 + "..........#...........", 13 + "..........#...........", 14 + "..........#...........", 15 + "..........#...........", 16 + "..........#...........", 17 + "..........#...........", 18 + "..........#...........", 19 + "..........#...........", 20 + "..........#...........", 21 + "..........#...........", 22 + "..........#...........", 23 + "..........#...........", 24 + "..........#...........", 25 + "..........#...........", 26 + "......................", 27 + "......................" 28 + };
+28
scripts/kconfig/icons/split_view.xpm
··· 1 + /* XPM */ 2 + static char * split_view_xpm[] = { 3 + "22 22 2 1", 4 + ". c None", 5 + "# c #000000", 6 + "......................", 7 + "......................", 8 + "......#......#........", 9 + "......#......#........", 10 + "......#......#........", 11 + "......#......#........", 12 + "......#......#........", 13 + "......#......#........", 14 + "......#......#........", 15 + "......#......#........", 16 + "......#......#........", 17 + "......#......#........", 18 + "......#......#........", 19 + "......#......#........", 20 + "......#......#........", 21 + "......#......#........", 22 + "......#......#........", 23 + "......#......#........", 24 + "......#......#........", 25 + "......#......#........", 26 + "......................", 27 + "......................" 28 + };
+18
scripts/kconfig/icons/symbol_mod.xpm
··· 1 + /* XPM */ 2 + static char * symbol_mod_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .......... ", 8 + " . . ", 9 + " . . ", 10 + " . .. . ", 11 + " . .... . ", 12 + " . .... . ", 13 + " . .. . ", 14 + " . . ", 15 + " . . ", 16 + " .......... ", 17 + " " 18 + };
+18
scripts/kconfig/icons/symbol_no.xpm
··· 1 + /* XPM */ 2 + static char * symbol_no_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .......... ", 8 + " . . ", 9 + " . . ", 10 + " . . ", 11 + " . . ", 12 + " . . ", 13 + " . . ", 14 + " . . ", 15 + " . . ", 16 + " .......... ", 17 + " " 18 + };
+18
scripts/kconfig/icons/symbol_yes.xpm
··· 1 + /* XPM */ 2 + static char * symbol_yes_xpm[] = { 3 + "12 12 2 1", 4 + " c white", 5 + ". c black", 6 + " ", 7 + " .......... ", 8 + " . . ", 9 + " . . ", 10 + " . . . ", 11 + " . .. . ", 12 + " . . .. . ", 13 + " . .... . ", 14 + " . .. . ", 15 + " . . ", 16 + " .......... ", 17 + " " 18 + };
+28
scripts/kconfig/icons/tree_view.xpm
··· 1 + /* XPM */ 2 + static char * tree_view_xpm[] = { 3 + "22 22 2 1", 4 + ". c None", 5 + "# c #000000", 6 + "......................", 7 + "......................", 8 + "......#...............", 9 + "......#...............", 10 + "......#...............", 11 + "......#...............", 12 + "......#...............", 13 + "......########........", 14 + "......#...............", 15 + "......#...............", 16 + "......#...............", 17 + "......#...............", 18 + "......#...............", 19 + "......########........", 20 + "......#...............", 21 + "......#...............", 22 + "......#...............", 23 + "......#...............", 24 + "......#...............", 25 + "......########........", 26 + "......................", 27 + "......................" 28 + };
-328
scripts/kconfig/images.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 4 - */ 5 - 6 - #include "images.h" 7 - 8 - const char * const xpm_load[] = { 9 - "22 22 5 1", 10 - ". c None", 11 - "# c #000000", 12 - "c c #838100", 13 - "a c #ffff00", 14 - "b c #ffffff", 15 - "......................", 16 - "......................", 17 - "......................", 18 - "............####....#.", 19 - "...........#....##.##.", 20 - "..................###.", 21 - ".................####.", 22 - ".####...........#####.", 23 - "#abab##########.......", 24 - "#babababababab#.......", 25 - "#ababababababa#.......", 26 - "#babababababab#.......", 27 - "#ababab###############", 28 - "#babab##cccccccccccc##", 29 - "#abab##cccccccccccc##.", 30 - "#bab##cccccccccccc##..", 31 - "#ab##cccccccccccc##...", 32 - "#b##cccccccccccc##....", 33 - "###cccccccccccc##.....", 34 - "##cccccccccccc##......", 35 - "###############.......", 36 - "......................"}; 37 - 38 - const char * const xpm_save[] = { 39 - "22 22 5 1", 40 - ". c None", 41 - "# c #000000", 42 - "a c #838100", 43 - "b c #c5c2c5", 44 - "c c #cdb6d5", 45 - "......................", 46 - ".####################.", 47 - ".#aa#bbbbbbbbbbbb#bb#.", 48 - ".#aa#bbbbbbbbbbbb#bb#.", 49 - ".#aa#bbbbbbbbbcbb####.", 50 - ".#aa#bbbccbbbbbbb#aa#.", 51 - ".#aa#bbbccbbbbbbb#aa#.", 52 - ".#aa#bbbbbbbbbbbb#aa#.", 53 - ".#aa#bbbbbbbbbbbb#aa#.", 54 - ".#aa#bbbbbbbbbbbb#aa#.", 55 - ".#aa#bbbbbbbbbbbb#aa#.", 56 - ".#aaa############aaa#.", 57 - ".#aaaaaaaaaaaaaaaaaa#.", 58 - ".#aaaaaaaaaaaaaaaaaa#.", 59 - ".#aaa#############aa#.", 60 - ".#aaa#########bbb#aa#.", 61 - ".#aaa#########bbb#aa#.", 62 - ".#aaa#########bbb#aa#.", 63 - ".#aaa#########bbb#aa#.", 64 - ".#aaa#########bbb#aa#.", 65 - "..##################..", 66 - "......................"}; 67 - 68 - const char * const xpm_back[] = { 69 - "22 22 3 1", 70 - ". c None", 71 - "# c #000083", 72 - "a c #838183", 73 - "......................", 74 - "......................", 75 - "......................", 76 - "......................", 77 - "......................", 78 - "...........######a....", 79 - "..#......##########...", 80 - "..##...####......##a..", 81 - "..###.###.........##..", 82 - "..######..........##..", 83 - "..#####...........##..", 84 - "..######..........##..", 85 - "..#######.........##..", 86 - "..########.......##a..", 87 - "...............a###...", 88 - "...............###....", 89 - "......................", 90 - "......................", 91 - "......................", 92 - "......................", 93 - "......................", 94 - "......................"}; 95 - 96 - const char * const xpm_tree_view[] = { 97 - "22 22 2 1", 98 - ". c None", 99 - "# c #000000", 100 - "......................", 101 - "......................", 102 - "......#...............", 103 - "......#...............", 104 - "......#...............", 105 - "......#...............", 106 - "......#...............", 107 - "......########........", 108 - "......#...............", 109 - "......#...............", 110 - "......#...............", 111 - "......#...............", 112 - "......#...............", 113 - "......########........", 114 - "......#...............", 115 - "......#...............", 116 - "......#...............", 117 - "......#...............", 118 - "......#...............", 119 - "......########........", 120 - "......................", 121 - "......................"}; 122 - 123 - const char * const xpm_single_view[] = { 124 - "22 22 2 1", 125 - ". c None", 126 - "# c #000000", 127 - "......................", 128 - "......................", 129 - "..........#...........", 130 - "..........#...........", 131 - "..........#...........", 132 - "..........#...........", 133 - "..........#...........", 134 - "..........#...........", 135 - "..........#...........", 136 - "..........#...........", 137 - "..........#...........", 138 - "..........#...........", 139 - "..........#...........", 140 - "..........#...........", 141 - "..........#...........", 142 - "..........#...........", 143 - "..........#...........", 144 - "..........#...........", 145 - "..........#...........", 146 - "..........#...........", 147 - "......................", 148 - "......................"}; 149 - 150 - const char * const xpm_split_view[] = { 151 - "22 22 2 1", 152 - ". c None", 153 - "# c #000000", 154 - "......................", 155 - "......................", 156 - "......#......#........", 157 - "......#......#........", 158 - "......#......#........", 159 - "......#......#........", 160 - "......#......#........", 161 - "......#......#........", 162 - "......#......#........", 163 - "......#......#........", 164 - "......#......#........", 165 - "......#......#........", 166 - "......#......#........", 167 - "......#......#........", 168 - "......#......#........", 169 - "......#......#........", 170 - "......#......#........", 171 - "......#......#........", 172 - "......#......#........", 173 - "......#......#........", 174 - "......................", 175 - "......................"}; 176 - 177 - const char * const xpm_symbol_no[] = { 178 - "12 12 2 1", 179 - " c white", 180 - ". c black", 181 - " ", 182 - " .......... ", 183 - " . . ", 184 - " . . ", 185 - " . . ", 186 - " . . ", 187 - " . . ", 188 - " . . ", 189 - " . . ", 190 - " . . ", 191 - " .......... ", 192 - " "}; 193 - 194 - const char * const xpm_symbol_mod[] = { 195 - "12 12 2 1", 196 - " c white", 197 - ". c black", 198 - " ", 199 - " .......... ", 200 - " . . ", 201 - " . . ", 202 - " . .. . ", 203 - " . .... . ", 204 - " . .... . ", 205 - " . .. . ", 206 - " . . ", 207 - " . . ", 208 - " .......... ", 209 - " "}; 210 - 211 - const char * const xpm_symbol_yes[] = { 212 - "12 12 2 1", 213 - " c white", 214 - ". c black", 215 - " ", 216 - " .......... ", 217 - " . . ", 218 - " . . ", 219 - " . . . ", 220 - " . .. . ", 221 - " . . .. . ", 222 - " . .... . ", 223 - " . .. . ", 224 - " . . ", 225 - " .......... ", 226 - " "}; 227 - 228 - const char * const xpm_choice_no[] = { 229 - "12 12 2 1", 230 - " c white", 231 - ". c black", 232 - " ", 233 - " .... ", 234 - " .. .. ", 235 - " . . ", 236 - " . . ", 237 - " . . ", 238 - " . . ", 239 - " . . ", 240 - " . . ", 241 - " .. .. ", 242 - " .... ", 243 - " "}; 244 - 245 - const char * const xpm_choice_yes[] = { 246 - "12 12 2 1", 247 - " c white", 248 - ". c black", 249 - " ", 250 - " .... ", 251 - " .. .. ", 252 - " . . ", 253 - " . .. . ", 254 - " . .... . ", 255 - " . .... . ", 256 - " . .. . ", 257 - " . . ", 258 - " .. .. ", 259 - " .... ", 260 - " "}; 261 - 262 - const char * const xpm_menu[] = { 263 - "12 12 2 1", 264 - " c white", 265 - ". c black", 266 - " ", 267 - " .......... ", 268 - " . . ", 269 - " . .. . ", 270 - " . .... . ", 271 - " . ...... . ", 272 - " . ...... . ", 273 - " . .... . ", 274 - " . .. . ", 275 - " . . ", 276 - " .......... ", 277 - " "}; 278 - 279 - const char * const xpm_menu_inv[] = { 280 - "12 12 2 1", 281 - " c white", 282 - ". c black", 283 - " ", 284 - " .......... ", 285 - " .......... ", 286 - " .. ...... ", 287 - " .. .... ", 288 - " .. .. ", 289 - " .. .. ", 290 - " .. .... ", 291 - " .. ...... ", 292 - " .......... ", 293 - " .......... ", 294 - " "}; 295 - 296 - const char * const xpm_menuback[] = { 297 - "12 12 2 1", 298 - " c white", 299 - ". c black", 300 - " ", 301 - " .......... ", 302 - " . . ", 303 - " . .. . ", 304 - " . .... . ", 305 - " . ...... . ", 306 - " . ...... . ", 307 - " . .... . ", 308 - " . .. . ", 309 - " . . ", 310 - " .......... ", 311 - " "}; 312 - 313 - const char * const xpm_void[] = { 314 - "12 12 2 1", 315 - " c white", 316 - ". c black", 317 - " ", 318 - " ", 319 - " ", 320 - " ", 321 - " ", 322 - " ", 323 - " ", 324 - " ", 325 - " ", 326 - " ", 327 - " ", 328 - " "};
-33
scripts/kconfig/images.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 4 - */ 5 - 6 - #ifndef IMAGES_H 7 - #define IMAGES_H 8 - 9 - #ifdef __cplusplus 10 - extern "C" { 11 - #endif 12 - 13 - extern const char * const xpm_load[]; 14 - extern const char * const xpm_save[]; 15 - extern const char * const xpm_back[]; 16 - extern const char * const xpm_tree_view[]; 17 - extern const char * const xpm_single_view[]; 18 - extern const char * const xpm_split_view[]; 19 - extern const char * const xpm_symbol_no[]; 20 - extern const char * const xpm_symbol_mod[]; 21 - extern const char * const xpm_symbol_yes[]; 22 - extern const char * const xpm_choice_no[]; 23 - extern const char * const xpm_choice_yes[]; 24 - extern const char * const xpm_menu[]; 25 - extern const char * const xpm_menu_inv[]; 26 - extern const char * const xpm_menuback[]; 27 - extern const char * const xpm_void[]; 28 - 29 - #ifdef __cplusplus 30 - } 31 - #endif 32 - 33 - #endif /* IMAGES_H */
+14 -15
scripts/kconfig/qconf.cc
··· 26 26 #include "lkc.h" 27 27 #include "qconf.h" 28 28 29 - #include "images.h" 30 - 31 29 32 30 static QApplication *configApp; 33 31 static ConfigSettings *configSettings; ··· 1281 1283 move(x.toInt(), y.toInt()); 1282 1284 1283 1285 // set up icons 1284 - ConfigItem::symbolYesIcon = QIcon(QPixmap(xpm_symbol_yes)); 1285 - ConfigItem::symbolModIcon = QIcon(QPixmap(xpm_symbol_mod)); 1286 - ConfigItem::symbolNoIcon = QIcon(QPixmap(xpm_symbol_no)); 1287 - ConfigItem::choiceYesIcon = QIcon(QPixmap(xpm_choice_yes)); 1288 - ConfigItem::choiceNoIcon = QIcon(QPixmap(xpm_choice_no)); 1289 - ConfigItem::menuIcon = QIcon(QPixmap(xpm_menu)); 1290 - ConfigItem::menubackIcon = QIcon(QPixmap(xpm_menuback)); 1286 + QString iconsDir = QString(getenv(SRCTREE) ? getenv(SRCTREE) : QDir::currentPath()) + "/scripts/kconfig/icons/"; 1287 + ConfigItem::symbolYesIcon = QIcon(QPixmap(iconsDir + "symbol_yes.xpm")); 1288 + ConfigItem::symbolModIcon = QIcon(QPixmap(iconsDir + "symbol_mod.xpm")); 1289 + ConfigItem::symbolNoIcon = QIcon(QPixmap(iconsDir + "symbol_no.xpm")); 1290 + ConfigItem::choiceYesIcon = QIcon(QPixmap(iconsDir + "choice_yes.xpm")); 1291 + ConfigItem::choiceNoIcon = QIcon(QPixmap(iconsDir + "choice_no.xpm")); 1292 + ConfigItem::menuIcon = QIcon(QPixmap(iconsDir + "menu.xpm")); 1293 + ConfigItem::menubackIcon = QIcon(QPixmap(iconsDir + "menuback.xpm")); 1291 1294 1292 1295 QWidget *widget = new QWidget(this); 1293 1296 setCentralWidget(widget); ··· 1311 1312 1312 1313 configList->setFocus(); 1313 1314 1314 - backAction = new QAction(QPixmap(xpm_back), "Back", this); 1315 + backAction = new QAction(QPixmap(iconsDir + "back.xpm"), "Back", this); 1315 1316 backAction->setShortcut(QKeySequence::Back); 1316 1317 connect(backAction, &QAction::triggered, 1317 1318 this, &ConfigMainWindow::goBack); ··· 1321 1322 connect(quitAction, &QAction::triggered, 1322 1323 this, &ConfigMainWindow::close); 1323 1324 1324 - QAction *loadAction = new QAction(QPixmap(xpm_load), "&Open", this); 1325 + QAction *loadAction = new QAction(QPixmap(iconsDir + "load.xpm"), "&Open", this); 1325 1326 loadAction->setShortcut(QKeySequence::Open); 1326 1327 connect(loadAction, &QAction::triggered, 1327 1328 this, &ConfigMainWindow::loadConfig); 1328 1329 1329 - saveAction = new QAction(QPixmap(xpm_save), "&Save", this); 1330 + saveAction = new QAction(QPixmap(iconsDir + "save.xpm"), "&Save", this); 1330 1331 saveAction->setShortcut(QKeySequence::Save); 1331 1332 connect(saveAction, &QAction::triggered, 1332 1333 this, &ConfigMainWindow::saveConfig); ··· 1343 1344 searchAction->setShortcut(QKeySequence::Find); 1344 1345 connect(searchAction, &QAction::triggered, 1345 1346 this, &ConfigMainWindow::searchConfig); 1346 - singleViewAction = new QAction(QPixmap(xpm_single_view), "Single View", this); 1347 + singleViewAction = new QAction(QPixmap(iconsDir + "single_view.xpm"), "Single View", this); 1347 1348 singleViewAction->setCheckable(true); 1348 1349 connect(singleViewAction, &QAction::triggered, 1349 1350 this, &ConfigMainWindow::showSingleView); 1350 - splitViewAction = new QAction(QPixmap(xpm_split_view), "Split View", this); 1351 + splitViewAction = new QAction(QPixmap(iconsDir + "split_view.xpm"), "Split View", this); 1351 1352 splitViewAction->setCheckable(true); 1352 1353 connect(splitViewAction, &QAction::triggered, 1353 1354 this, &ConfigMainWindow::showSplitView); 1354 - fullViewAction = new QAction(QPixmap(xpm_tree_view), "Full View", this); 1355 + fullViewAction = new QAction(QPixmap(iconsDir + "tree_view.xpm"), "Full View", this); 1355 1356 fullViewAction->setCheckable(true); 1356 1357 connect(fullViewAction, &QAction::triggered, 1357 1358 this, &ConfigMainWindow::showFullView);