From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH v2 7/9] kconfig: gconf: replace GdkColor with GdkRGBA
Date: Mon, 30 Jun 2025 03:43:33 +0900 [thread overview]
Message-ID: <20250629184554.407497-8-masahiroy@kernel.org> (raw)
In-Reply-To: <20250629184554.407497-1-masahiroy@kernel.org>
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 <masahiroy@kernel.org>
---
(no changes since v1)
scripts/kconfig/gconf.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index a751ab6a98f0..2a4481b4b523 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -128,7 +128,7 @@ static void set_node(GtkTreeStore *tree, GtkTreeIter *node, struct menu *menu)
const gchar *_mod = "";
const gchar *_yes = "";
const gchar *value = "";
- GdkColor color;
+ GdkRGBA color;
gboolean editable = FALSE;
gboolean btnvis = FALSE;
@@ -138,7 +138,7 @@ static void set_node(GtkTreeStore *tree, GtkTreeIter *node, struct menu *menu)
menu->type == M_COMMENT ? "***" : "",
sym && !sym_has_value(sym) ? "(NEW)" : "");
- gdk_color_parse(menu_is_visible(menu) ? "Black" : "DarkGray", &color);
+ gdk_rgba_parse(&color, menu_is_visible(menu) ? "Black" : "DarkGray");
if (!sym)
goto set;
@@ -1172,7 +1172,7 @@ static void init_left_tree(void)
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
- G_TYPE_POINTER, GDK_TYPE_COLOR,
+ G_TYPE_POINTER, GDK_TYPE_RGBA,
G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
@@ -1203,7 +1203,7 @@ static void init_left_tree(void)
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"text", COL_OPTION,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
sel = gtk_tree_view_get_selection(view);
@@ -1223,7 +1223,7 @@ static void init_right_tree(void)
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
- G_TYPE_POINTER, GDK_TYPE_COLOR,
+ G_TYPE_POINTER, GDK_TYPE_RGBA,
G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
@@ -1261,32 +1261,32 @@ static void init_right_tree(void)
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"text", COL_OPTION,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"Name", renderer,
"text", COL_NAME,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"N", renderer,
"text", COL_NO,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"M", renderer,
"text", COL_MOD,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"Y", renderer,
"text", COL_YES,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
@@ -1294,7 +1294,7 @@ static void init_right_tree(void)
"text", COL_VALUE,
"editable",
COL_EDIT,
- "foreground-gdk",
+ "foreground-rgba",
COL_COLOR, NULL);
g_signal_connect(G_OBJECT(renderer), "edited",
G_CALLBACK(renderer_edited), tree2_w);
--
2.43.0
next prev parent reply other threads:[~2025-06-29 18:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 1/9] kconfig: gconf: fix behavior of a menu under a symbol in split view Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 2/9] kconfig: gconf: use configure-event handler to adjust pane separator Masahiro Yamada
2025-06-30 23:11 ` Randy Dunlap
2025-06-29 18:43 ` [PATCH v2 3/9] kconfig: gconf: rename display_tree_part() Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 4/9] kconfig: gconf: rename gconf.glade to gconf.ui Masahiro Yamada
2025-06-30 23:12 ` Randy Dunlap
2025-06-29 18:43 ` [PATCH v2 5/9] kconfig: gconf: migrate to GTK 3 Masahiro Yamada
2025-06-30 4:34 ` Masahiro Yamada
2025-06-30 23:14 ` Randy Dunlap
2025-06-29 18:43 ` [PATCH v2 6/9] kconfig: gconf: replace GtkVbox with GtkBox Masahiro Yamada
2025-06-29 18:43 ` Masahiro Yamada [this message]
2025-06-30 23:15 ` [PATCH v2 7/9] kconfig: gconf: replace GdkColor with GdkRGBA Randy Dunlap
2025-06-29 18:43 ` [PATCH v2 8/9] kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 9/9] kconfig: gconf: show GTK version in About dialog Masahiro Yamada
2025-06-30 23:16 ` Randy Dunlap
2025-06-29 19:02 ` [PATCH v2 0/9] kconfig: improve gconfig Randy Dunlap
2025-06-30 4:37 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250629184554.407497-8-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox