diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-22 14:05:41 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-22 14:05:41 +0200 |
commit | b55285a77da0e0b829e4ce8d7e09debaabc68e15 (patch) | |
tree | f622559ef65bbdd3e1c5bdb06098a8f89eec0563 /app/wlib/gtklib/notice.c | |
parent | d3897ce090dbeb220ed2c782f095597e417cf3cc (diff) | |
parent | d1ae75703e1ed81d65ea16946dcdb77e7a13adc9 (diff) |
Merge branch 'feature/upstream' into develop
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) { |