[PATCH 06/66] kconfig: gconf: make columns resizable

Masahiro Yamada posted 66 patches 3 months, 2 weeks ago
[PATCH 06/66] kconfig: gconf: make columns resizable
Posted by Masahiro Yamada 3 months, 2 weeks ago
The variable "resizeable" is a typo and always set to FALSE, resulting
in dead code in init_right_tree(). It is unclear column resizing should
be disabled. Enable it.

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

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

diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index c0f46f189060..a3978d3420d1 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -30,7 +30,6 @@ static gint view_mode = FULL_VIEW;
 static gboolean show_name = TRUE;
 static gboolean show_range = TRUE;
 static gboolean show_value = TRUE;
-static gboolean resizeable = FALSE;
 static int opt_mode = OPT_NORMAL;
 
 GtkWidget *main_wnd = NULL;
@@ -312,11 +311,9 @@ static void init_right_tree(void)
 	column = gtk_tree_view_get_column(view, COL_VALUE);
 	gtk_tree_view_column_set_visible(column, show_value);
 
-	if (resizeable) {
-		for (i = 0; i < COL_VALUE; i++) {
-			column = gtk_tree_view_get_column(view, i);
-			gtk_tree_view_column_set_resizable(column, TRUE);
-		}
+	for (i = 0; i < COL_VALUE; i++) {
+		column = gtk_tree_view_get_column(view, i);
+		gtk_tree_view_column_set_resizable(column, TRUE);
 	}
 
 	sel = gtk_tree_view_get_selection(view);
-- 
2.43.0
Re: [PATCH 06/66] kconfig: gconf: make columns resizable
Posted by Randy Dunlap 3 months, 1 week ago

On 6/24/25 8:04 AM, Masahiro Yamada wrote:
> The variable "resizeable" is a typo and always set to FALSE, resulting
> in dead code in init_right_tree(). It is unclear column resizing should
> be disabled. Enable it.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Looks good.

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

> ---
> 
>  scripts/kconfig/gconf.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
> index c0f46f189060..a3978d3420d1 100644
> --- a/scripts/kconfig/gconf.c
> +++ b/scripts/kconfig/gconf.c
> @@ -30,7 +30,6 @@ static gint view_mode = FULL_VIEW;
>  static gboolean show_name = TRUE;
>  static gboolean show_range = TRUE;
>  static gboolean show_value = TRUE;
> -static gboolean resizeable = FALSE;
>  static int opt_mode = OPT_NORMAL;
>  
>  GtkWidget *main_wnd = NULL;
> @@ -312,11 +311,9 @@ static void init_right_tree(void)
>  	column = gtk_tree_view_get_column(view, COL_VALUE);
>  	gtk_tree_view_column_set_visible(column, show_value);
>  
> -	if (resizeable) {
> -		for (i = 0; i < COL_VALUE; i++) {
> -			column = gtk_tree_view_get_column(view, i);
> -			gtk_tree_view_column_set_resizable(column, TRUE);
> -		}
> +	for (i = 0; i < COL_VALUE; i++) {
> +		column = gtk_tree_view_get_column(view, i);
> +		gtk_tree_view_column_set_resizable(column, TRUE);
>  	}
>  
>  	sel = gtk_tree_view_get_selection(view);

-- 
~Randy