From 8ad6e04549e8f971ad76baee29fabfaa9240cb4a Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Fri, 24 Aug 2018 16:52:17 +0100 Subject: [PATCH] Book Options did not raise when already open If you open File->Properties and the dialogue gets hidden and you go to open it again the existing dialogue was not being raised to the front. This was due to a bad cast. --- gnucash/gnome-utils/gnc-main-window.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnucash/gnome-utils/gnc-main-window.c b/gnucash/gnome-utils/gnc-main-window.c index 240aed167e..77e7539115 100644 --- a/gnucash/gnome-utils/gnc-main-window.c +++ b/gnucash/gnome-utils/gnc-main-window.c @@ -4098,10 +4098,15 @@ static gboolean show_handler (const char *class_name, gint component_id, gpointer user_data, gpointer iter_data) { - GtkWidget *dialog; + GNCOptionWin *optwin = user_data; + GtkWidget *widget; - dialog = GTK_WIDGET(user_data); - gtk_window_present(GTK_WINDOW(dialog)); + if (!optwin) + return(FALSE); + + widget = gnc_options_dialog_widget(optwin); + + gtk_window_present(GTK_WINDOW(widget)); return(TRUE); }