[gtk+] demo: make demo windows transient to the main window



commit 8193c8c770358d2ddee99b4bb9c9a4bd03f79f60
Author: William Jon McCann <william jon mccann gmail com>
Date:   Mon Dec 2 21:47:55 2013 -0500

    demo: make demo windows transient to the main window
    
    This prevents them getting lost behind.

 demos/gtk-demo/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index 5af0da3..9de99cd 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -142,6 +142,9 @@ activate_run (GSimpleAction *action,
           cbdata->model = model;
           cbdata->path = gtk_tree_model_get_path (model, &iter);
 
+          gtk_window_set_transient_for (GTK_WINDOW (demo), GTK_WINDOW (window));
+          gtk_window_set_modal (GTK_WINDOW (demo), TRUE);
+
           g_signal_connect (demo, "destroy",
                             G_CALLBACK (window_closed_cb), cbdata);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]