From b623f5953691b2a0614e6f1f4def86bdbb9a4113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 8 Aug 2020 11:53:00 +0200 Subject: New upstream version 5.2.0Beta2.1 --- app/wlib/gtklib/notice.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'app/wlib/gtklib/notice.c') diff --git a/app/wlib/gtklib/notice.c b/app/wlib/gtklib/notice.c index b72afd6..0134b4f 100644 --- a/app/wlib/gtklib/notice.c +++ b/app/wlib/gtklib/notice.c @@ -58,8 +58,13 @@ static void doNotice( GtkWidget * widget, long value) { - noticeValue = value; - gtk_widget_destroy(noticeW.win); + if (value != 2) { + // event not from from closing the window but from a button press + // Close the Notice dialog + gtk_widget_destroy(noticeW.win); + // Remember the button + noticeValue = value; + } wlibDoModal(NULL, FALSE); } @@ -106,6 +111,8 @@ int wNoticeEx(int type, parent = GTK_WINDOW(gtkMainW->gtkwin); } + wDestroySplash(); + dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, flag, @@ -113,6 +120,8 @@ int wNoticeEx(int type, "%s", msg); gtk_window_set_title(GTK_WINDOW(dialog), headline); + gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER); + res = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); @@ -174,6 +183,7 @@ int wNotice3( char *can = NULL; char *alt = NULL; + wDestroySplash(); nw->win = gtk_window_new(GTK_WINDOW_TOPLEVEL); @@ -243,6 +253,9 @@ int wNotice3( } } + g_signal_connect(GTK_WINDOW(nw->win), + "destroy", G_CALLBACK(doNotice), (void*)2); + gtk_widget_grab_default(nw->butt[ 0 ]); gtk_widget_grab_focus(nw->butt[ 0 ]); @@ -253,6 +266,7 @@ int wNotice3( /* gdk_window_set_group( nw->win->window, gtkMainW->gtkwin->window ); */ } + noticeValue = 0; // Default: Cancel wlibDoModal(NULL, TRUE); if (aff) { -- cgit v1.2.3