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
This commit is contained in:
Dave Peticolas 2000-07-12 07:18:04 +00:00
parent 94cf525150
commit 4396cd5d39
2 changed files with 30 additions and 1 deletions

View File

@ -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)
{

View File

@ -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