diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
commit | df247efec654e512242e4f4f1b0212034f9e01fe (patch) | |
tree | 25c02e16957f3aa613af30c140fd8e8a3d52fda6 /app/wlib/gtklib/notice.c | |
parent | d0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (diff) | |
parent | a5ade52caa489cf0a713e0f02b764000d203140e (diff) |
Merge branch 'release/debian/1%5.2.0Beta2.1-1' into masterHEADdebian/1%5.2.0Beta2.1-1master
Diffstat (limited to 'app/wlib/gtklib/notice.c')
-rw-r--r-- | app/wlib/gtklib/notice.c | 18 |
1 files changed, 16 insertions, 2 deletions
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) { |