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