mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
demo: only set transient if demo returns a toplevel
This commit is contained in:
parent
35a249466f
commit
7ba0083fc9
@ -142,8 +142,11 @@ activate_run (GSimpleAction *action,
|
|||||||
cbdata->model = model;
|
cbdata->model = model;
|
||||||
cbdata->path = gtk_tree_model_get_path (model, &iter);
|
cbdata->path = gtk_tree_model_get_path (model, &iter);
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (demo), GTK_WINDOW (window));
|
if (gtk_widget_is_toplevel (demo))
|
||||||
gtk_window_set_modal (GTK_WINDOW (demo), TRUE);
|
{
|
||||||
|
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_signal_connect (demo, "destroy",
|
||||||
G_CALLBACK (window_closed_cb), cbdata);
|
G_CALLBACK (window_closed_cb), cbdata);
|
||||||
|
Loading…
Reference in New Issue
Block a user