summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2025-06-25 00:05:20 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:21:29 +0200
commitdca7764741438e192d68b57b961ad65772695d4a (patch)
treeaa8e050e07513b983a35d8c2c7c4eba32727a759 /scripts
parentfb2ff258d4784b213ddf9dfef973b230edc8ff40 (diff)
downloadlinux-dca7764741438e192d68b57b961ad65772695d4a.tar.gz
linux-dca7764741438e192d68b57b961ad65772695d4a.tar.bz2
linux-dca7764741438e192d68b57b961ad65772695d4a.zip
kconfig: gconf: avoid hardcoding model2 in on_treeview2_cursor_changed()
[ Upstream commit cae9cdbcd9af044810bcceeb43a87accca47c71d ] The on_treeview2_cursor_changed() handler is connected to both the left and right tree views, but it hardcodes model2 (the GtkTreeModel of the right tree view). This is incorrect. Get the associated model from the view. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/gconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 9b10f1248da1..bd1fdbd949cc 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -980,13 +980,14 @@ on_treeview2_key_press_event(GtkWidget * widget,
void
on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data)
{
+ GtkTreeModel *model = gtk_tree_view_get_model(treeview);
GtkTreeSelection *selection;
GtkTreeIter iter;
struct menu *menu;
selection = gtk_tree_view_get_selection(treeview);
- if (gtk_tree_selection_get_selected(selection, &model2, &iter)) {
- gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
+ if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
+ gtk_tree_model_get(model, &iter, COL_MENU, &menu, -1);
text_insert_help(menu);
}
}