mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 04:10:11 +00:00
gtk-demo: Don't create extra windows
When activate() is called via D-Bus, just present the window we already have. Fixes: #7213
This commit is contained in:
parent
1fc190596f
commit
6565cb78da
@ -950,6 +950,13 @@ activate (GApplication *app)
|
||||
GtkFilterListModel *filter_model;
|
||||
GtkFilter *filter;
|
||||
GSimpleAction *action;
|
||||
GList *list;
|
||||
|
||||
if ((list = gtk_application_get_windows (GTK_APPLICATION (app))) != NULL)
|
||||
{
|
||||
gtk_window_present (GTK_WINDOW (list->data));
|
||||
return;
|
||||
}
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/ui/main.ui");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user