diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-06-02 03:20:43 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-07-16 01:08:36 +0900 |
commit | 03638aaa7995c07376f2e51ac2640ccd25b4ba75 (patch) | |
tree | 462c097dff79126730203c9835c43e930ff6821a /scripts/kconfig/gconf.c | |
parent | 0b62fe46d77878645d117e70b9f135d7c9fcab47 (diff) | |
download | lwn-03638aaa7995c07376f2e51ac2640ccd25b4ba75.tar.gz lwn-03638aaa7995c07376f2e51ac2640ccd25b4ba75.zip |
kconfig: pass new conf_changed value to the callback
Commit ee06a3ef7e3c ("kconfig: Update config changed flag before calling
callback") pointed out that conf_updated flag must be updated _before_
calling the callback, which needs to know the new value.
Given that, it makes sense to directly pass the new value to the
callback.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/gconf.c')
-rw-r--r-- | scripts/kconfig/gconf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 2bf74aee5eff..baa1c512de3c 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -84,11 +84,10 @@ static void replace_button_icon(GladeXML *xml, GdkDrawable *window, gtk_tool_button_set_icon_widget(button, image); } -static void conf_changed(void) +static void conf_changed(bool dirty) { - bool changed = conf_get_changed(); - gtk_widget_set_sensitive(save_btn, changed); - gtk_widget_set_sensitive(save_menu_item, changed); + gtk_widget_set_sensitive(save_btn, dirty); + gtk_widget_set_sensitive(save_menu_item, dirty); } /* Main Window Initialization */ |