From 4396cd5d392ceffd206b5862db19371c92c7f02f Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Wed, 12 Jul 2000 07:18:04 +0000 Subject: [PATCH] Kevin Finn's patch to set option widget sensitivities. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2567 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/dialog-options.c | 30 ++++++++++++++++++++++++++++++ src/gnome/top-level.c | 1 - 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/gnome/dialog-options.c b/src/gnome/dialog-options.c index 158bda11ba..a9a85b1ca9 100644 --- a/src/gnome/dialog-options.c +++ b/src/gnome/dialog-options.c @@ -378,6 +378,36 @@ gnc_option_get_ui_value(GNCOption *option) return result; } + +/********************************************************************\ + * gnc_set_option_selectable_by_name * + * Change the selectable state of the widget that represents a * + * GUI option. * + * * + * Args: section - section of option * + * name - name of option + * selectable - if false, update the widget so that it * + * cannot be selected by the user. If true, * + * update the widget so that it can be selected.* + * Return: nothing * +\********************************************************************/ +void +gnc_set_option_selectable_by_name( const char *section, + const char *name, + gncBoolean selectable) +{ + GNCOption *option = gnc_get_option_by_name( section, name ); + + if ((option == NULL) || (option->widget == NULL)) + return; + + gtk_widget_set_sensitive( GTK_WIDGET(option->widget), + selectable ); + + return; +} /* gnc_set_option_selectable_by_name */ + + static void default_button_cb(GtkButton *button, gpointer data) { diff --git a/src/gnome/top-level.c b/src/gnome/top-level.c index f051215932..475df7e413 100644 --- a/src/gnome/top-level.c +++ b/src/gnome/top-level.c @@ -752,7 +752,6 @@ static void gnc_configure_auto_decimal_cb(void *not_used) { gnc_configure_auto_decimal(); - gnc_group_ui_refresh(gncGetCurrentGroup()); } /* gnc_configure_auto_decimal