Skip to content

Commit d6f0b65

Browse files
committed
kconfig: gconf: replace GdkColor with GdkRGBA
GdkColor is deprecated with GTK 3.14. [1] Use GdkRGBA instead. This fixes warnings such as: scripts/kconfig/gconf.c: In function ‘set_node’: scripts/kconfig/gconf.c:138:9: warning: ‘gdk_color_parse’ is deprecated: Use 'gdk_rgba_parse' instead [-Wdeprecated-declarations] 138 | gdk_color_parse(menu_is_visible(menu) ? "Black" : "DarkGray", &color); | ^~~~~~~~~~~~~~~ [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.14.0/gdk/deprecated/gdkcolor.h#L52 Signed-off-by: Masahiro Yamada <[email protected]> Tested-by: Randy Dunlap <[email protected]>
1 parent df889fd commit d6f0b65

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

scripts/kconfig/gconf.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static void set_node(GtkTreeStore *tree, GtkTreeIter *node, struct menu *menu)
176176
const gchar *_mod = "";
177177
const gchar *_yes = "";
178178
const gchar *value = "";
179-
GdkColor color;
179+
GdkRGBA color;
180180
gboolean editable = FALSE;
181181
gboolean btnvis = FALSE;
182182

@@ -186,7 +186,7 @@ static void set_node(GtkTreeStore *tree, GtkTreeIter *node, struct menu *menu)
186186
menu->type == M_COMMENT ? "***" : "",
187187
sym && !sym_has_value(sym) ? "(NEW)" : "");
188188

189-
gdk_color_parse(menu_is_visible(menu) ? "Black" : "DarkGray", &color);
189+
gdk_rgba_parse(&color, menu_is_visible(menu) ? "Black" : "DarkGray");
190190

191191
if (!sym)
192192
goto set;
@@ -1174,7 +1174,7 @@ static void init_left_tree(void)
11741174
G_TYPE_STRING, G_TYPE_STRING,
11751175
G_TYPE_STRING, G_TYPE_STRING,
11761176
G_TYPE_STRING, G_TYPE_STRING,
1177-
G_TYPE_POINTER, GDK_TYPE_COLOR,
1177+
G_TYPE_POINTER, GDK_TYPE_RGBA,
11781178
G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF,
11791179
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
11801180
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
@@ -1205,7 +1205,7 @@ static void init_left_tree(void)
12051205
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
12061206
renderer,
12071207
"text", COL_OPTION,
1208-
"foreground-gdk",
1208+
"foreground-rgba",
12091209
COL_COLOR, NULL);
12101210

12111211
sel = gtk_tree_view_get_selection(view);
@@ -1225,7 +1225,7 @@ static void init_right_tree(void)
12251225
G_TYPE_STRING, G_TYPE_STRING,
12261226
G_TYPE_STRING, G_TYPE_STRING,
12271227
G_TYPE_STRING, G_TYPE_STRING,
1228-
G_TYPE_POINTER, GDK_TYPE_COLOR,
1228+
G_TYPE_POINTER, GDK_TYPE_RGBA,
12291229
G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF,
12301230
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
12311231
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
@@ -1263,40 +1263,40 @@ static void init_right_tree(void)
12631263
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
12641264
renderer,
12651265
"text", COL_OPTION,
1266-
"foreground-gdk",
1266+
"foreground-rgba",
12671267
COL_COLOR, NULL);
12681268

12691269
renderer = gtk_cell_renderer_text_new();
12701270
gtk_tree_view_insert_column_with_attributes(view, -1,
12711271
"Name", renderer,
12721272
"text", COL_NAME,
1273-
"foreground-gdk",
1273+
"foreground-rgba",
12741274
COL_COLOR, NULL);
12751275
renderer = gtk_cell_renderer_text_new();
12761276
gtk_tree_view_insert_column_with_attributes(view, -1,
12771277
"N", renderer,
12781278
"text", COL_NO,
1279-
"foreground-gdk",
1279+
"foreground-rgba",
12801280
COL_COLOR, NULL);
12811281
renderer = gtk_cell_renderer_text_new();
12821282
gtk_tree_view_insert_column_with_attributes(view, -1,
12831283
"M", renderer,
12841284
"text", COL_MOD,
1285-
"foreground-gdk",
1285+
"foreground-rgba",
12861286
COL_COLOR, NULL);
12871287
renderer = gtk_cell_renderer_text_new();
12881288
gtk_tree_view_insert_column_with_attributes(view, -1,
12891289
"Y", renderer,
12901290
"text", COL_YES,
1291-
"foreground-gdk",
1291+
"foreground-rgba",
12921292
COL_COLOR, NULL);
12931293
renderer = gtk_cell_renderer_text_new();
12941294
gtk_tree_view_insert_column_with_attributes(view, -1,
12951295
"Value", renderer,
12961296
"text", COL_VALUE,
12971297
"editable",
12981298
COL_EDIT,
1299-
"foreground-gdk",
1299+
"foreground-rgba",
13001300
COL_COLOR, NULL);
13011301
g_signal_connect(G_OBJECT(renderer), "edited",
13021302
G_CALLBACK(renderer_edited), tree2_w);

0 commit comments

Comments
 (0)