[PATCH 55/66] kconfig: gconf: replace GTK_STOCK_{OK,NO,CANCEL}

Masahiro Yamada posted 66 patches 3 months, 2 weeks ago
[PATCH 55/66] kconfig: gconf: replace GTK_STOCK_{OK,NO,CANCEL}
Posted by Masahiro Yamada 3 months, 2 weeks ago
These are deprecated with GTK 3.10. [1]

Use "_OK", "_no", "_Cancel".

[1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.10.0/gtk/deprecated/gtkstock.h#L827

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/kconfig/gconf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 28953449a1ed..32d1815b425e 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -686,11 +686,11 @@ static gboolean on_window1_delete_event(GtkWidget *widget, GdkEvent *event,
 					     (GtkDialogFlags)
 					     (GTK_DIALOG_MODAL |
 					      GTK_DIALOG_DESTROY_WITH_PARENT),
-					     GTK_STOCK_OK,
+					     "_OK",
 					     GTK_RESPONSE_YES,
-					     GTK_STOCK_NO,
+					     "_No",
 					     GTK_RESPONSE_NO,
-					     GTK_STOCK_CANCEL,
+					     "_Cancel",
 					     GTK_RESPONSE_CANCEL, NULL);
 	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
 					GTK_RESPONSE_CANCEL);
-- 
2.43.0
Re: [PATCH 55/66] kconfig: gconf: replace GTK_STOCK_{OK,NO,CANCEL}
Posted by Randy Dunlap 3 months, 1 week ago

On 6/24/25 8:05 AM, Masahiro Yamada wrote:
> These are deprecated with GTK 3.10. [1]
> 
> Use "_OK", "_no", "_Cancel".
> 

That's bad (on GTK) IMO. I would much rather see (and try to remember)
a symbolic name than some half-random string.


> [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.10.0/gtk/deprecated/gtkstock.h#L827
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/kconfig/gconf.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
> index 28953449a1ed..32d1815b425e 100644
> --- a/scripts/kconfig/gconf.c
> +++ b/scripts/kconfig/gconf.c
> @@ -686,11 +686,11 @@ static gboolean on_window1_delete_event(GtkWidget *widget, GdkEvent *event,
>  					     (GtkDialogFlags)
>  					     (GTK_DIALOG_MODAL |
>  					      GTK_DIALOG_DESTROY_WITH_PARENT),
> -					     GTK_STOCK_OK,
> +					     "_OK",
>  					     GTK_RESPONSE_YES,
> -					     GTK_STOCK_NO,
> +					     "_No",
>  					     GTK_RESPONSE_NO,
> -					     GTK_STOCK_CANCEL,
> +					     "_Cancel",
>  					     GTK_RESPONSE_CANCEL, NULL);
>  	gtk_dialog_set_default_response(GTK_DIALOG(dialog),
>  					GTK_RESPONSE_CANCEL);

-- 
~Randy