The gnc_gui_refresh_all statement in gnc_book_options_dialog_apply_cb causes the 'apply' and 'OK' buttons to be set to sensitive on the open Book Options dialog in some circumstances; this commit causes them to be reset to insensitive, as they should be.

This commit is contained in:
Alex Aycinena
2016-06-04 14:41:28 -07:00
parent 293b43dced
commit b555f49567
4 changed files with 16 additions and 1 deletions

View File

@@ -263,7 +263,6 @@ gnc_book_option_num_field_source_change_cb (gboolean num_action)
}
gnc_book_option_num_field_source_change (num_action);
gnc_resume_gui_refresh ();
gnc_gui_refresh_all ();
}
Account *

View File

@@ -167,6 +167,14 @@ gnc_options_dialog_changed (GNCOptionWin *win)
gnc_options_dialog_changed_internal (win->dialog, TRUE);
}
void
gnc_options_dialog_not_changed (GNCOptionWin *win)
{
if (!win) return;
gnc_options_dialog_changed_internal (win->dialog, FALSE);
}
void
gnc_option_changed_widget_cb(GtkWidget *widget, GNCOption *option)
{

View File

@@ -46,6 +46,7 @@ GtkWidget * gnc_options_page_list(GNCOptionWin * win);
GtkWidget * gnc_options_dialog_notebook(GNCOptionWin * win);
void gnc_options_dialog_changed (GNCOptionWin *win);
void gnc_options_dialog_not_changed (GNCOptionWin *win);
void gnc_option_changed_widget_cb(GtkWidget *widget, GNCOption *option);
void gnc_option_changed_option_cb(GtkWidget *dummy, GNCOption *option);

View File

@@ -3953,7 +3953,14 @@ gnc_book_options_dialog_apply_cb(GNCOptionWin * optionwin,
use_split_action_for_num_after =
qof_book_use_split_action_for_num_field (gnc_get_current_book ());
if (use_split_action_for_num_before != use_split_action_for_num_after)
{
gnc_book_option_num_field_source_change_cb (use_split_action_for_num_after);
gnc_gui_refresh_all ();
/* the previous stmt causes the 'apply' and 'OK' buttons to be set to
sensitive on the open Book Options dialog; the next stmt resets them
to insensitive, as they should be */
gnc_options_dialog_not_changed (optionwin);
}
}
static void