From 7ee2d9d8402bed2ab361ef0340a7f2a2c89e41fe Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 22 Sep 2017 04:11:54 -0400 Subject: mq_application_delete_window(): New function --- diff --git a/src/application.c b/src/application.c index b46f58f..1727ad3 100644 --- a/src/application.c +++ b/src/application.c @@ -61,3 +61,12 @@ mq_application_add_window(MqApplication *application, gchar **uris) return window; } + +void +mq_application_delete_window(GtkWidget __attribute__((unused)) *window, + MqApplication *application) +{ + if (--application->window_count == 0) { + gtk_main_quit(); + } +} diff --git a/src/application.h b/src/application.h index e3303c7..4c56c43 100644 --- a/src/application.h +++ b/src/application.h @@ -39,4 +39,7 @@ mq_application_main(MqApplication *application); MqWindow * mq_application_add_window(MqApplication *application, gchar **uris); +void +mq_application_delete_window(GtkWidget *window, MqApplication *application); + #endif -- cgit v0.9.1