* [PATCH v2 1/9] kconfig: gconf: fix behavior of a menu under a symbol in split view
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
@ 2025-06-29 18:43 ` Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 2/9] kconfig: gconf: use configure-event handler to adjust pane separator Masahiro Yamada
` (8 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
A menu can be created under a symbol.
[Example]
menu "outer menu"
config A
bool "A"
menu "inner menu"
depends on A
config B
bool "B"
endmenu
endmenu
After being re-parented by menu_finalize(), the menu tree is structured
like follows:
menu "outer menu"
\-- A
\-- menu "inner menu"
\-- B
In split view, the symbol A is shown in the right pane, so all of its
descendants must also be shown there. This has never worked correctly.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Changes in v2:
- A new patch
scripts/kconfig/gconf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 529a836ed5da..22badd2f710e 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -801,7 +801,7 @@ static gboolean on_treeview2_button_press_event(GtkWidget *widget,
enum prop_type ptype;
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
- if (ptype == P_MENU && view_mode != FULL_VIEW && col == COL_OPTION) {
+ if (ptype == P_MENU && view_mode == SINGLE_VIEW && col == COL_OPTION) {
// goes down into menu
browsed = menu;
display_tree_part();
@@ -951,8 +951,7 @@ static void _display_tree(GtkTreeStore *tree, struct menu *menu,
gtk_tree_store_append(tree, &iter, parent);
set_node(tree, &iter, child);
- if ((view_mode != FULL_VIEW) && (ptype == P_MENU)
- && (tree == tree2))
+ if ((view_mode == SINGLE_VIEW) && (ptype == P_MENU))
continue;
/*
if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH v2 2/9] kconfig: gconf: use configure-event handler to adjust pane separator
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 ` 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
` (7 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
The size_request event handler is currently used to adjust the position
of the horizontal separator in the right pane.
However, the size_request signal is not available in GTK 3. Use the
configure-event signal instead.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Changes in v2:
- Use the "configure-event" instead of "size-allocate" signal.
This fixes the problem where we cannot move the horizontal
separator in the right pane.
scripts/kconfig/gconf.c | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 22badd2f710e..8b19298eef61 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -604,23 +604,12 @@ static void on_window1_destroy(GtkObject *object, gpointer user_data)
gtk_main_quit();
}
-static void on_window1_size_request(GtkWidget *widget,
- GtkRequisition *requisition,
- gpointer user_data)
+static gboolean on_window1_configure(GtkWidget *self,
+ GdkEventConfigure *event,
+ gpointer user_data)
{
- static gint old_h;
- gint w, h;
-
- if (widget->window == NULL)
- gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
- else
- gdk_window_get_size(widget->window, &w, &h);
-
- if (h == old_h)
- return;
- old_h = h;
-
- gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3);
+ gtk_paned_set_position(GTK_PANED(vpaned), 2 * event->height / 3);
+ return FALSE;
}
static gboolean on_window1_delete_event(GtkWidget *widget, GdkEvent *event,
@@ -1021,8 +1010,8 @@ static void init_main_window(const gchar *glade_file)
main_wnd = glade_xml_get_widget(xml, "window1");
g_signal_connect(main_wnd, "destroy",
G_CALLBACK(on_window1_destroy), NULL);
- g_signal_connect(main_wnd, "size_request",
- G_CALLBACK(on_window1_size_request), NULL);
+ g_signal_connect(main_wnd, "configure-event",
+ G_CALLBACK(on_window1_configure), NULL);
g_signal_connect(main_wnd, "delete_event",
G_CALLBACK(on_window1_delete_event), NULL);
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v2 2/9] kconfig: gconf: use configure-event handler to adjust pane separator
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
0 siblings, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2025-06-30 23:11 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild; +Cc: linux-kernel
On 6/29/25 11:43 AM, Masahiro Yamada wrote:
> The size_request event handler is currently used to adjust the position
> of the horizontal separator in the right pane.
>
> However, the size_request signal is not available in GTK 3. Use the
> configure-event signal instead.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
>
> Changes in v2:
> - Use the "configure-event" instead of "size-allocate" signal.
> This fixes the problem where we cannot move the horizontal
> separator in the right pane.
>
> scripts/kconfig/gconf.c | 25 +++++++------------------
> 1 file changed, 7 insertions(+), 18 deletions(-)
>
> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
> index 22badd2f710e..8b19298eef61 100644
> --- a/scripts/kconfig/gconf.c
> +++ b/scripts/kconfig/gconf.c
> @@ -604,23 +604,12 @@ static void on_window1_destroy(GtkObject *object, gpointer user_data)
> gtk_main_quit();
> }
>
> -static void on_window1_size_request(GtkWidget *widget,
> - GtkRequisition *requisition,
> - gpointer user_data)
> +static gboolean on_window1_configure(GtkWidget *self,
> + GdkEventConfigure *event,
> + gpointer user_data)
> {
> - static gint old_h;
> - gint w, h;
> -
> - if (widget->window == NULL)
> - gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
> - else
> - gdk_window_get_size(widget->window, &w, &h);
> -
> - if (h == old_h)
> - return;
> - old_h = h;
> -
> - gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3);
> + gtk_paned_set_position(GTK_PANED(vpaned), 2 * event->height / 3);
> + return FALSE;
> }
>
> static gboolean on_window1_delete_event(GtkWidget *widget, GdkEvent *event,
> @@ -1021,8 +1010,8 @@ static void init_main_window(const gchar *glade_file)
> main_wnd = glade_xml_get_widget(xml, "window1");
> g_signal_connect(main_wnd, "destroy",
> G_CALLBACK(on_window1_destroy), NULL);
> - g_signal_connect(main_wnd, "size_request",
> - G_CALLBACK(on_window1_size_request), NULL);
> + g_signal_connect(main_wnd, "configure-event",
> + G_CALLBACK(on_window1_configure), NULL);
> g_signal_connect(main_wnd, "delete_event",
> G_CALLBACK(on_window1_delete_event), NULL);
>
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 3/9] kconfig: gconf: rename display_tree_part()
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-29 18:43 ` Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 4/9] kconfig: gconf: rename gconf.glade to gconf.ui Masahiro Yamada
` (6 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
This function recreates the tree store to update the menu content.
Rename it to recreate_tree() to better reflect its purpose.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Changes in v2:
- Rename to recreate_tree()
scripts/kconfig/gconf.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 8b19298eef61..bc25924a1adf 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -57,7 +57,7 @@ enum {
};
static void display_tree(GtkTreeStore *store, struct menu *menu);
-static void display_tree_part(void);
+static void recreate_tree(void);
static void conf_changed(bool dirty)
{
@@ -279,7 +279,7 @@ static void set_view_mode(enum view_mode mode)
browsed = menu_get_parent_menu(selected) ?: &rootmenu;
else
browsed = &rootmenu;
- display_tree_part();
+ recreate_tree();
select_menu(GTK_TREE_VIEW(tree2_w), selected);
gtk_widget_set_sensitive(single_btn, FALSE);
break;
@@ -556,7 +556,7 @@ static void on_back_clicked(GtkButton *button, gpointer user_data)
ptype = browsed->prompt ? browsed->prompt->type : P_UNKNOWN;
if (ptype != P_MENU)
browsed = browsed->parent;
- display_tree_part();
+ recreate_tree();
if (browsed == &rootmenu)
gtk_widget_set_sensitive(back_btn, FALSE);
@@ -793,7 +793,7 @@ static gboolean on_treeview2_button_press_event(GtkWidget *widget,
if (ptype == P_MENU && view_mode == SINGLE_VIEW && col == COL_OPTION) {
// goes down into menu
browsed = menu;
- display_tree_part();
+ recreate_tree();
gtk_widget_set_sensitive(back_btn, TRUE);
} else if (col == COL_OPTION) {
toggle_sym_value(menu);
@@ -898,7 +898,7 @@ static gboolean on_treeview1_button_press_event(GtkWidget *widget,
if (menu->type == M_MENU) {
browsed = menu;
- display_tree_part();
+ recreate_tree();
}
gtk_tree_view_set_cursor(view, path, NULL, FALSE);
@@ -960,7 +960,7 @@ static void display_tree(GtkTreeStore *store, struct menu *menu)
}
/* Display a part of the tree starting at current node (single/split view) */
-static void display_tree_part(void)
+static void recreate_tree(void)
{
gtk_tree_store_clear(tree2);
display_tree(tree2, browsed);
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH v2 4/9] kconfig: gconf: rename gconf.glade to gconf.ui
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (2 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 3/9] kconfig: gconf: rename display_tree_part() Masahiro Yamada
@ 2025-06-29 18:43 ` 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
` (5 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
The next commit will convert this file to GtkBuilder format. Rename
it in advance to reflect the intended format.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
(no changes since v1)
scripts/kconfig/gconf.c | 6 +++---
scripts/kconfig/{gconf.glade => gconf.ui} | 0
2 files changed, 3 insertions(+), 3 deletions(-)
rename scripts/kconfig/{gconf.glade => gconf.ui} (100%)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index bc25924a1adf..6cf58fe5bcfe 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -1325,11 +1325,11 @@ int main(int ac, char *av[])
/* Determine GUI path */
env = getenv(SRCTREE);
if (env)
- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL);
+ glade_file = g_strconcat(env, "/scripts/kconfig/gconf.ui", NULL);
else if (av[0][0] == '/')
- glade_file = g_strconcat(av[0], ".glade", NULL);
+ glade_file = g_strconcat(av[0], ".ui", NULL);
else
- glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);
+ glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".ui", NULL);
/* Conf stuffs */
if (ac > 1 && av[1][0] == '-') {
diff --git a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.ui
similarity index 100%
rename from scripts/kconfig/gconf.glade
rename to scripts/kconfig/gconf.ui
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v2 4/9] kconfig: gconf: rename gconf.glade to gconf.ui
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
0 siblings, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2025-06-30 23:12 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild; +Cc: linux-kernel
On 6/29/25 11:43 AM, Masahiro Yamada wrote:
> The next commit will convert this file to GtkBuilder format. Rename
> it in advance to reflect the intended format.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>
> (no changes since v1)
>
> scripts/kconfig/gconf.c | 6 +++---
> scripts/kconfig/{gconf.glade => gconf.ui} | 0
> 2 files changed, 3 insertions(+), 3 deletions(-)
> rename scripts/kconfig/{gconf.glade => gconf.ui} (100%)
>
> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
> index bc25924a1adf..6cf58fe5bcfe 100644
> --- a/scripts/kconfig/gconf.c
> +++ b/scripts/kconfig/gconf.c
> @@ -1325,11 +1325,11 @@ int main(int ac, char *av[])
> /* Determine GUI path */
> env = getenv(SRCTREE);
> if (env)
> - glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL);
> + glade_file = g_strconcat(env, "/scripts/kconfig/gconf.ui", NULL);
> else if (av[0][0] == '/')
> - glade_file = g_strconcat(av[0], ".glade", NULL);
> + glade_file = g_strconcat(av[0], ".ui", NULL);
> else
> - glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);
> + glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".ui", NULL);
>
> /* Conf stuffs */
> if (ac > 1 && av[1][0] == '-') {
> diff --git a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.ui
> similarity index 100%
> rename from scripts/kconfig/gconf.glade
> rename to scripts/kconfig/gconf.ui
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 5/9] kconfig: gconf: migrate to GTK 3
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (3 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 4/9] kconfig: gconf: rename gconf.glade to gconf.ui Masahiro Yamada
@ 2025-06-29 18:43 ` 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
` (4 subsequent siblings)
9 siblings, 2 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
This commit switches from GTK 2.x to GTK 3, applying the following
necessary changes:
- Do not include invidual headers
- GtkObject is gone
- Convert glade to GtkBuilder
[1]: https://docs.gtk.org/gtk3/migrating-2to3.html
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
(no changes since v1)
scripts/kconfig/gconf-cfg.sh | 11 +-
scripts/kconfig/gconf.c | 70 ++++++------
scripts/kconfig/gconf.ui | 200 +++++++++++++++++------------------
3 files changed, 135 insertions(+), 146 deletions(-)
diff --git a/scripts/kconfig/gconf-cfg.sh b/scripts/kconfig/gconf-cfg.sh
index fc954c0538fa..856c692f480c 100755
--- a/scripts/kconfig/gconf-cfg.sh
+++ b/scripts/kconfig/gconf-cfg.sh
@@ -6,7 +6,7 @@ set -eu
cflags=$1
libs=$2
-PKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
+PKG=gtk+-3.0
if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
echo >&2 "*"
@@ -18,18 +18,11 @@ fi
if ! ${HOSTPKG_CONFIG} --exists $PKG; then
echo >&2 "*"
echo >&2 "* Unable to find the GTK+ installation. Please make sure that"
- echo >&2 "* the GTK+ 2.0 development package is correctly installed."
+ echo >&2 "* the GTK 3 development package is correctly installed."
echo >&2 "* You need $PKG"
echo >&2 "*"
exit 1
fi
-if ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then
- echo >&2 "*"
- echo >&2 "* GTK+ is present but version >= 2.0.0 is required."
- echo >&2 "*"
- exit 1
-fi
-
${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 6cf58fe5bcfe..a751ab6a98f0 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -7,10 +7,7 @@
#include "lkc.h"
#include "images.h"
-#include <glade/glade.h>
#include <gtk/gtk.h>
-#include <glib.h>
-#include <gdk/gdkkeysyms.h>
#include <stdio.h>
#include <string.h>
@@ -599,7 +596,7 @@ static void on_expand_clicked(GtkButton *button, gpointer user_data)
/* Main Windows Callbacks */
-static void on_window1_destroy(GtkObject *object, gpointer user_data)
+static void on_window1_destroy(GtkWidget *widget, gpointer user_data)
{
gtk_main_quit();
}
@@ -999,15 +996,15 @@ static void replace_button_icon(GtkWidget *widget, const char * const xpm[])
static void init_main_window(const gchar *glade_file)
{
- GladeXML *xml;
+ GtkBuilder *builder;
GtkWidget *widget;
GtkTextBuffer *txtbuf;
- xml = glade_xml_new(glade_file, "window1", NULL);
- if (!xml)
+ builder = gtk_builder_new_from_file(glade_file);
+ if (!builder)
g_error("GUI loading failed !\n");
- main_wnd = glade_xml_get_widget(xml, "window1");
+ main_wnd = GTK_WIDGET(gtk_builder_get_object(builder, "window1"));
g_signal_connect(main_wnd, "destroy",
G_CALLBACK(on_window1_destroy), NULL);
g_signal_connect(main_wnd, "configure-event",
@@ -1015,9 +1012,9 @@ static void init_main_window(const gchar *glade_file)
g_signal_connect(main_wnd, "delete_event",
G_CALLBACK(on_window1_delete_event), NULL);
- hpaned = glade_xml_get_widget(xml, "hpaned1");
- vpaned = glade_xml_get_widget(xml, "vpaned1");
- tree1_w = glade_xml_get_widget(xml, "treeview1");
+ hpaned = GTK_WIDGET(gtk_builder_get_object(builder, "hpaned1"));
+ vpaned = GTK_WIDGET(gtk_builder_get_object(builder, "vpaned1"));
+ tree1_w = GTK_WIDGET(gtk_builder_get_object(builder, "treeview1"));
g_signal_connect(tree1_w, "cursor_changed",
G_CALLBACK(on_treeview2_cursor_changed), NULL);
g_signal_connect(tree1_w, "button_press_event",
@@ -1025,7 +1022,7 @@ static void init_main_window(const gchar *glade_file)
g_signal_connect(tree1_w, "key_press_event",
G_CALLBACK(on_treeview2_key_press_event), NULL);
- tree2_w = glade_xml_get_widget(xml, "treeview2");
+ tree2_w = GTK_WIDGET(gtk_builder_get_object(builder, "treeview2"));
g_signal_connect(tree2_w, "cursor_changed",
G_CALLBACK(on_treeview2_cursor_changed), NULL);
g_signal_connect(tree2_w, "button_press_event",
@@ -1033,101 +1030,101 @@ static void init_main_window(const gchar *glade_file)
g_signal_connect(tree2_w, "key_press_event",
G_CALLBACK(on_treeview2_key_press_event), NULL);
- text_w = glade_xml_get_widget(xml, "textview3");
+ text_w = GTK_WIDGET(gtk_builder_get_object(builder, "textview3"));
/* menubar */
- widget = glade_xml_get_widget(xml, "load1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "load1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_load1_activate), NULL);
- save_menu_item = glade_xml_get_widget(xml, "save1");
+ save_menu_item = GTK_WIDGET(gtk_builder_get_object(builder, "save1"));
g_signal_connect(save_menu_item, "activate",
G_CALLBACK(on_save_activate), NULL);
- widget = glade_xml_get_widget(xml, "save_as1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "save_as1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_save_as1_activate), NULL);
- widget = glade_xml_get_widget(xml, "quit1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "quit1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_quit1_activate), NULL);
- widget = glade_xml_get_widget(xml, "show_name1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "show_name1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_show_name1_activate), NULL);
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
show_name);
- widget = glade_xml_get_widget(xml, "show_range1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "show_range1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_show_range1_activate), NULL);
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
show_range);
- widget = glade_xml_get_widget(xml, "show_data1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "show_data1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_show_data1_activate), NULL);
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
show_value);
- widget = glade_xml_get_widget(xml, "set_option_mode1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "set_option_mode1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_set_option_mode1_activate), NULL);
- widget = glade_xml_get_widget(xml, "set_option_mode2");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "set_option_mode2"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_set_option_mode2_activate), NULL);
- widget = glade_xml_get_widget(xml, "set_option_mode3");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "set_option_mode3"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_set_option_mode3_activate), NULL);
- widget = glade_xml_get_widget(xml, "introduction1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "introduction1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_introduction1_activate), NULL);
- widget = glade_xml_get_widget(xml, "about1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "about1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_about1_activate), NULL);
- widget = glade_xml_get_widget(xml, "license1");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "license1"));
g_signal_connect(widget, "activate",
G_CALLBACK(on_license1_activate), NULL);
/* toolbar */
- back_btn = glade_xml_get_widget(xml, "button1");
+ back_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button1"));
g_signal_connect(back_btn, "clicked",
G_CALLBACK(on_back_clicked), NULL);
gtk_widget_set_sensitive(back_btn, FALSE);
- widget = glade_xml_get_widget(xml, "button2");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "button2"));
g_signal_connect(widget, "clicked",
G_CALLBACK(on_load_clicked), NULL);
- save_btn = glade_xml_get_widget(xml, "button3");
+ save_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button3"));
g_signal_connect(save_btn, "clicked",
G_CALLBACK(on_save_clicked), NULL);
- single_btn = glade_xml_get_widget(xml, "button4");
+ single_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button4"));
g_signal_connect(single_btn, "clicked",
G_CALLBACK(on_single_clicked), NULL);
replace_button_icon(single_btn, xpm_single_view);
- split_btn = glade_xml_get_widget(xml, "button5");
+ split_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button5"));
g_signal_connect(split_btn, "clicked",
G_CALLBACK(on_split_clicked), NULL);
replace_button_icon(split_btn, xpm_split_view);
- full_btn = glade_xml_get_widget(xml, "button6");
+ full_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button6"));
g_signal_connect(full_btn, "clicked",
G_CALLBACK(on_full_clicked), NULL);
replace_button_icon(full_btn, xpm_tree_view);
- widget = glade_xml_get_widget(xml, "button7");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "button7"));
g_signal_connect(widget, "clicked",
G_CALLBACK(on_collapse_clicked), NULL);
- widget = glade_xml_get_widget(xml, "button8");
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, "button8"));
g_signal_connect(widget, "clicked",
G_CALLBACK(on_expand_clicked), NULL);
@@ -1142,7 +1139,9 @@ static void init_main_window(const gchar *glade_file)
gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
- gtk_widget_show(main_wnd);
+ gtk_widget_show_all(main_wnd);
+
+ g_object_unref(builder);
conf_set_changed_callback(conf_changed);
}
@@ -1320,7 +1319,6 @@ int main(int ac, char *av[])
/* GTK stuffs */
gtk_init(&ac, &av);
- glade_init();
/* Determine GUI path */
env = getenv(SRCTREE);
diff --git a/scripts/kconfig/gconf.ui b/scripts/kconfig/gconf.ui
index f0c572c7f47c..e5dad2b06502 100644
--- a/scripts/kconfig/gconf.ui
+++ b/scripts/kconfig/gconf.ui
@@ -1,8 +1,8 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<glade-interface>
+<interface>
-<widget class="GtkWindow" id="window1">
+<object class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="title" translatable="yes">Gtk Kernel Configurator</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
@@ -19,193 +19,193 @@
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
- <widget class="GtkMenuBar" id="menubar1">
+ <object class="GtkMenuBar" id="menubar1">
<property name="visible">True</property>
<child>
- <widget class="GtkMenuItem" id="file1">
+ <object class="GtkMenuItem" id="file1">
<property name="visible">True</property>
<property name="label" translatable="yes">_File</property>
<property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="file1_menu">
+ <child type="submenu">
+ <object class="GtkMenu" id="file1_menu">
<child>
- <widget class="GtkImageMenuItem" id="load1">
+ <object class="GtkImageMenuItem" id="load1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Load a config file</property>
<property name="label" translatable="yes">_Load</property>
<property name="use_underline">True</property>
<accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkImageMenuItem" id="save1">
+ <object class="GtkImageMenuItem" id="save1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Save the config in .config</property>
<property name="label" translatable="yes">_Save</property>
<property name="use_underline">True</property>
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkImageMenuItem" id="save_as1">
+ <object class="GtkImageMenuItem" id="save_as1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Save the config in a file</property>
<property name="label" translatable="yes">Save _as</property>
<property name="use_underline">True</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkSeparatorMenuItem" id="separator1">
+ <object class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkImageMenuItem" id="quit1">
+ <object class="GtkImageMenuItem" id="quit1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Quit</property>
<property name="use_underline">True</property>
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkMenuItem" id="options1">
+ <object class="GtkMenuItem" id="options1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Options</property>
<property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="options1_menu">
+ <child type="submenu">
+ <object class="GtkMenu" id="options1_menu">
<child>
- <widget class="GtkCheckMenuItem" id="show_name1">
+ <object class="GtkCheckMenuItem" id="show_name1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Show name</property>
<property name="label" translatable="yes">Show _name</property>
<property name="use_underline">True</property>
<property name="active">False</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkCheckMenuItem" id="show_range1">
+ <object class="GtkCheckMenuItem" id="show_range1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Show range (Y/M/N)</property>
<property name="label" translatable="yes">Show _range</property>
<property name="use_underline">True</property>
<property name="active">False</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkCheckMenuItem" id="show_data1">
+ <object class="GtkCheckMenuItem" id="show_data1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Show value of the option</property>
<property name="label" translatable="yes">Show _data</property>
<property name="use_underline">True</property>
<property name="active">False</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkSeparatorMenuItem" id="separator2">
+ <object class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkRadioMenuItem" id="set_option_mode1">
+ <object class="GtkRadioMenuItem" id="set_option_mode1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Show normal options</property>
<property name="label" translatable="yes">Show normal options</property>
<property name="use_underline">True</property>
<property name="active">True</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkRadioMenuItem" id="set_option_mode2">
+ <object class="GtkRadioMenuItem" id="set_option_mode2">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Show all options</property>
<property name="label" translatable="yes">Show all _options</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<property name="group">set_option_mode1</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkRadioMenuItem" id="set_option_mode3">
+ <object class="GtkRadioMenuItem" id="set_option_mode3">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Show all options with prompts</property>
<property name="label" translatable="yes">Show all prompt options</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<property name="group">set_option_mode1</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkMenuItem" id="help1">
+ <object class="GtkMenuItem" id="help1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="help1_menu">
+ <child type="submenu">
+ <object class="GtkMenu" id="help1_menu">
<child>
- <widget class="GtkImageMenuItem" id="introduction1">
+ <object class="GtkImageMenuItem" id="introduction1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Introduction</property>
<property name="use_underline">True</property>
<accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkImageMenuItem" id="about1">
+ <object class="GtkImageMenuItem" id="about1">
<property name="visible">True</property>
<property name="label" translatable="yes">_About</property>
<property name="use_underline">True</property>
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkImageMenuItem" id="license1">
+ <object class="GtkImageMenuItem" id="license1">
<property name="visible">True</property>
<property name="label" translatable="yes">_License</property>
<property name="use_underline">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
@@ -214,14 +214,14 @@
</child>
<child>
- <widget class="GtkToolbar" id="toolbar1">
+ <object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
<property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
<property name="show_arrow">True</property>
<child>
- <widget class="GtkToolButton" id="button1">
+ <object class="GtkToolButton" id="button1">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Goes up of one level (single view)</property>
<property name="label" translatable="yes">Back</property>
@@ -230,7 +230,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -238,18 +238,18 @@
</child>
<child>
- <widget class="GtkToolItem" id="toolitem1">
+ <object class="GtkToolItem" id="toolitem1">
<property name="visible">True</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<child>
- <widget class="GtkVSeparator" id="vseparator1">
+ <object class="GtkVSeparator" id="vseparator1">
<property name="visible">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
@@ -257,7 +257,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button2">
+ <object class="GtkToolButton" id="button2">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Load a config file</property>
<property name="label" translatable="yes">Load</property>
@@ -266,7 +266,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -274,7 +274,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button3">
+ <object class="GtkToolButton" id="button3">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Save a config file</property>
<property name="label" translatable="yes">Save</property>
@@ -283,7 +283,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -291,18 +291,18 @@
</child>
<child>
- <widget class="GtkToolItem" id="toolitem2">
+ <object class="GtkToolItem" id="toolitem2">
<property name="visible">True</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<child>
- <widget class="GtkVSeparator" id="vseparator2">
+ <object class="GtkVSeparator" id="vseparator2">
<property name="visible">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
@@ -310,7 +310,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button4">
+ <object class="GtkToolButton" id="button4">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Single view</property>
<property name="label" translatable="yes">Single</property>
@@ -319,7 +319,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -327,7 +327,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button5">
+ <object class="GtkToolButton" id="button5">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Split view</property>
<property name="label" translatable="yes">Split</property>
@@ -336,7 +336,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -344,7 +344,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button6">
+ <object class="GtkToolButton" id="button6">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Full view</property>
<property name="label" translatable="yes">Full</property>
@@ -353,7 +353,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -361,18 +361,18 @@
</child>
<child>
- <widget class="GtkToolItem" id="toolitem3">
+ <object class="GtkToolItem" id="toolitem3">
<property name="visible">True</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<child>
- <widget class="GtkVSeparator" id="vseparator3">
+ <object class="GtkVSeparator" id="vseparator3">
<property name="visible">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">False</property>
@@ -380,7 +380,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button7">
+ <object class="GtkToolButton" id="button7">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Collapse the whole tree in the right frame</property>
<property name="label" translatable="yes">Collapse</property>
@@ -389,7 +389,7 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
@@ -397,7 +397,7 @@
</child>
<child>
- <widget class="GtkToolButton" id="button8">
+ <object class="GtkToolButton" id="button8">
<property name="visible">True</property>
<property name="tooltip-text" translatable="yes">Expand the whole tree in the right frame</property>
<property name="label" translatable="yes">Expand</property>
@@ -406,13 +406,13 @@
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
@@ -421,14 +421,13 @@
</child>
<child>
- <widget class="GtkHPaned" id="hpaned1">
+ <object class="GtkHPaned" id="hpaned1">
<property name="width_request">1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="position">0</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
@@ -436,16 +435,16 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="treeview1">
+ <object class="GtkTreeView" id="treeview1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">False</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="shrink">True</property>
<property name="resize">False</property>
@@ -453,13 +452,12 @@
</child>
<child>
- <widget class="GtkVPaned" id="vpaned1">
+ <object class="GtkVPaned" id="vpaned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="position">0</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
@@ -467,7 +465,7 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTreeView" id="treeview2">
+ <object class="GtkTreeView" id="treeview2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
@@ -475,9 +473,9 @@
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">False</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="shrink">True</property>
<property name="resize">False</property>
@@ -485,7 +483,7 @@
</child>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
@@ -493,7 +491,7 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTextView" id="textview3">
+ <object class="GtkTextView" id="textview3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
@@ -508,29 +506,29 @@
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
- </widget>
+ </object>
</child>
-</widget>
+</object>
-</glade-interface>
+</interface>
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v2 5/9] kconfig: gconf: migrate to GTK 3
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
1 sibling, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-30 4:34 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel
On Mon, Jun 30, 2025 at 3:46 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This commit switches from GTK 2.x to GTK 3, applying the following
> necessary changes:
>
> - Do not include invidual headers
This is a typo.
I will fix it to "individual".
> - GtkObject is gone
> - Convert glade to GtkBuilder
>
> [1]: https://docs.gtk.org/gtk3/migrating-2to3.html
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 5/9] kconfig: gconf: migrate to GTK 3
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
1 sibling, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2025-06-30 23:14 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild; +Cc: linux-kernel
On 6/29/25 11:43 AM, Masahiro Yamada wrote:
> This commit switches from GTK 2.x to GTK 3, applying the following
> necessary changes:
>
> - Do not include invidual headers
> - GtkObject is gone
> - Convert glade to GtkBuilder
>
> [1]: https://docs.gtk.org/gtk3/migrating-2to3.html
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>
> (no changes since v1)
>
> scripts/kconfig/gconf-cfg.sh | 11 +-
> scripts/kconfig/gconf.c | 70 ++++++------
> scripts/kconfig/gconf.ui | 200 +++++++++++++++++------------------
> 3 files changed, 135 insertions(+), 146 deletions(-)
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 6/9] kconfig: gconf: replace GtkVbox with GtkBox
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (4 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 5/9] kconfig: gconf: migrate to GTK 3 Masahiro Yamada
@ 2025-06-29 18:43 ` Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 7/9] kconfig: gconf: replace GdkColor with GdkRGBA Masahiro Yamada
` (3 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
GtkVBox is deprecated with GTK 3.2. [1]
Use GtkBox instead.
[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.2.0/gtk/gtkvbox.c#L47
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
(no changes since v1)
scripts/kconfig/gconf.ui | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/kconfig/gconf.ui b/scripts/kconfig/gconf.ui
index e5dad2b06502..378a3eadf9f8 100644
--- a/scripts/kconfig/gconf.ui
+++ b/scripts/kconfig/gconf.ui
@@ -19,7 +19,8 @@
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH v2 7/9] kconfig: gconf: replace GdkColor with GdkRGBA
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (5 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 6/9] kconfig: gconf: replace GtkVbox with GtkBox Masahiro Yamada
@ 2025-06-29 18:43 ` Masahiro Yamada
2025-06-30 23:15 ` Randy Dunlap
2025-06-29 18:43 ` [PATCH v2 8/9] kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned Masahiro Yamada
` (2 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
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
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH v2 8/9] kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (6 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 7/9] kconfig: gconf: replace GdkColor with GdkRGBA Masahiro Yamada
@ 2025-06-29 18:43 ` Masahiro Yamada
2025-06-29 18:43 ` [PATCH v2 9/9] kconfig: gconf: show GTK version in About dialog Masahiro Yamada
2025-06-29 19:02 ` [PATCH v2 0/9] kconfig: improve gconfig Randy Dunlap
9 siblings, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
GtkHPaned and GtkVPaned are deprecated with GTK 3.2. [1] [2]
Use GtkPaned instead.
[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.2.0/gtk/gtkhpaned.c#L44
[2]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.2.0/gtk/gtkvpaned.c#L44
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Changes in v2:
- A new patch
scripts/kconfig/gconf.ui | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/gconf.ui b/scripts/kconfig/gconf.ui
index 378a3eadf9f8..f2c8342f1103 100644
--- a/scripts/kconfig/gconf.ui
+++ b/scripts/kconfig/gconf.ui
@@ -422,7 +422,7 @@
</child>
<child>
- <object class="GtkHPaned" id="hpaned1">
+ <object class="GtkPaned" id="hpaned1">
<property name="width_request">1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -453,7 +453,8 @@
</child>
<child>
- <object class="GtkVPaned" id="vpaned1">
+ <object class="GtkPaned" id="vpaned1">
+ <property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH v2 9/9] kconfig: gconf: show GTK version in About dialog
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (7 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 8/9] kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned Masahiro Yamada
@ 2025-06-29 18:43 ` Masahiro Yamada
2025-06-30 23:16 ` Randy Dunlap
2025-06-29 19:02 ` [PATCH v2 0/9] kconfig: improve gconfig Randy Dunlap
9 siblings, 1 reply; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-29 18:43 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
Likewise xconfig, it is useful to display the GTK version in the About
dialog.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
(no changes since v1)
scripts/kconfig/gconf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 2a4481b4b523..e43d83dcdfb8 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -523,7 +523,11 @@ static void on_about1_activate(GtkMenuItem *menuitem, gpointer user_data)
dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
- GTK_BUTTONS_CLOSE, "%s", about_text);
+ GTK_BUTTONS_CLOSE, "%s\nGTK version: %d.%d.%d",
+ about_text,
+ gtk_get_major_version(),
+ gtk_get_minor_version(),
+ gtk_get_micro_version());
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v2 0/9] kconfig: improve gconfig
2025-06-29 18:43 [PATCH v2 0/9] kconfig: improve gconfig Masahiro Yamada
` (8 preceding siblings ...)
2025-06-29 18:43 ` [PATCH v2 9/9] kconfig: gconf: show GTK version in About dialog Masahiro Yamada
@ 2025-06-29 19:02 ` Randy Dunlap
2025-06-30 4:37 ` Masahiro Yamada
9 siblings, 1 reply; 18+ messages in thread
From: Randy Dunlap @ 2025-06-29 19:02 UTC (permalink / raw)
To: Masahiro Yamada, linux-kbuild; +Cc: linux-kernel
On 6/29/25 11:43 AM, Masahiro Yamada wrote:
> - Code refactoring
> - Migrate GTK 2 to GTK3
> - Fix all compile warnings
>
>
Hi,
If I am testing your recent *config patches, should I replace all gconf
patches from the patch 00/66 series with these patches?
Thanks.
> Masahiro Yamada (9):
> kconfig: gconf: fix behavior of a menu under a symbol in split view
> kconfig: gconf: use configure-event handler to adjust pane separator
> kconfig: gconf: rename display_tree_part()
> kconfig: gconf: rename gconf.glade to gconf.ui
> kconfig: gconf: migrate to GTK 3
> kconfig: gconf: replace GtkVbox with GtkBox
> kconfig: gconf: replace GdkColor with GdkRGBA
> kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned
> kconfig: gconf: show GTK version in About dialog
>
> scripts/kconfig/gconf-cfg.sh | 11 +-
> scripts/kconfig/gconf.c | 146 ++++++++--------
> scripts/kconfig/{gconf.glade => gconf.ui} | 202 +++++++++++-----------
> 3 files changed, 171 insertions(+), 188 deletions(-)
> rename scripts/kconfig/{gconf.glade => gconf.ui} (83%)
>
--
~Randy
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v2 0/9] kconfig: improve gconfig
2025-06-29 19:02 ` [PATCH v2 0/9] kconfig: improve gconfig Randy Dunlap
@ 2025-06-30 4:37 ` Masahiro Yamada
0 siblings, 0 replies; 18+ messages in thread
From: Masahiro Yamada @ 2025-06-30 4:37 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kbuild, linux-kernel
On Mon, Jun 30, 2025 at 4:02 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 6/29/25 11:43 AM, Masahiro Yamada wrote:
> > - Code refactoring
> > - Migrate GTK 2 to GTK3
> > - Fix all compile warnings
> >
> >
>
> Hi,
>
> If I am testing your recent *config patches, should I replace all gconf
> patches from the patch 00/66 series with these patches?
>
Sorry for the confusion.
To avoid flooding the ML again, I only submitted v2
for some changed patches.
For convenience, I created a topic branch that contains
the entire patch set.
git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
gconfig-v2
Your review and test are appreciated.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 18+ messages in thread