gnucash maint: 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.
J. Alex Aycinena
alex.aycinena at code.gnucash.org
Sat Jun 4 17:59:47 EDT 2016
Updated via https://github.com/Gnucash/gnucash/commit/b555f495 (commit)
from https://github.com/Gnucash/gnucash/commit/293b43dc (commit)
commit b555f495676f882c5494560a53ecae5a37c47302
Author: Alex Aycinena <alex.aycinena at gmail.com>
Date: Sat Jun 4 14:41:28 2016 -0700
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.
diff --git a/src/app-utils/gnc-ui-util.c b/src/app-utils/gnc-ui-util.c
index 9251c0f..e27bffc 100644
--- a/src/app-utils/gnc-ui-util.c
+++ b/src/app-utils/gnc-ui-util.c
@@ -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 *
diff --git a/src/gnome-utils/dialog-options.c b/src/gnome-utils/dialog-options.c
index 936bc89..48d4267 100644
--- a/src/gnome-utils/dialog-options.c
+++ b/src/gnome-utils/dialog-options.c
@@ -168,6 +168,14 @@ gnc_options_dialog_changed (GNCOptionWin *win)
}
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)
{
gnc_option_set_changed (option, TRUE);
diff --git a/src/gnome-utils/dialog-options.h b/src/gnome-utils/dialog-options.h
index 4cdcbb1..a981894 100644
--- a/src/gnome-utils/dialog-options.h
+++ b/src/gnome-utils/dialog-options.h
@@ -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);
diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c
index 4b2c2db..681f469 100644
--- a/src/gnome-utils/gnc-main-window.c
+++ b/src/gnome-utils/gnc-main-window.c
@@ -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
Summary of changes:
src/app-utils/gnc-ui-util.c | 1 -
src/gnome-utils/dialog-options.c | 8 ++++++++
src/gnome-utils/dialog-options.h | 1 +
src/gnome-utils/gnc-main-window.c | 7 +++++++
4 files changed, 16 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list