diff options
author | Karsten Wiese <annabellesgarden@yahoo.de> | 2006-12-13 03:34:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:48 -0500 |
commit | 3b354c557c7a6fcac099b3a20b308853fe596183 (patch) | |
tree | 4489c66167db27bed76aae32b5e815666f0050b5 /scripts/kconfig/confdata.c | |
parent | bfc10001b11e51b59ac901d17c5f05361bd2351d (diff) |
[PATCH] kconfig: add "void conf_set_changed_callback(void (*fn)(void))", use it in qconf.cc
Added function sets "void (*conf_changed_callback)(void)". Call it, if
.config's changed state changes. Use above in qconf.cc to set gui's
save-widget's sensitvity.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r-- | scripts/kconfig/confdata.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 4bbbb5b09c8d..664fe29dacef 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -767,18 +767,28 @@ int conf_write_autoconf(void) | |||
767 | } | 767 | } |
768 | 768 | ||
769 | static int sym_change_count; | 769 | static int sym_change_count; |
770 | static void (*conf_changed_callback)(void); | ||
770 | 771 | ||
771 | void sym_set_change_count(int count) | 772 | void sym_set_change_count(int count) |
772 | { | 773 | { |
774 | int _sym_change_count = sym_change_count; | ||
773 | sym_change_count = count; | 775 | sym_change_count = count; |
776 | if (conf_changed_callback && | ||
777 | (bool)_sym_change_count != (bool)count) | ||
778 | conf_changed_callback(); | ||
774 | } | 779 | } |
775 | 780 | ||
776 | void sym_add_change_count(int count) | 781 | void sym_add_change_count(int count) |
777 | { | 782 | { |
778 | sym_change_count += count; | 783 | sym_set_change_count(count + sym_change_count); |
779 | } | 784 | } |
780 | 785 | ||
781 | bool conf_get_changed(void) | 786 | bool conf_get_changed(void) |
782 | { | 787 | { |
783 | return sym_change_count; | 788 | return sym_change_count; |
784 | } | 789 | } |
790 | |||
791 | void conf_set_changed_callback(void (*fn)(void)) | ||
792 | { | ||
793 | conf_changed_callback = fn; | ||
794 | } | ||