summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-22 04:11:54 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-22 04:11:54 (EDT)
commit7ee2d9d8402bed2ab361ef0340a7f2a2c89e41fe (patch)
treefbfea66aa928aa53b957ee3b9cbd4b1fda025d82 /src
parent7dc68171bf758b2c9697df982996ff22d4803da4 (diff)
downloadmarquee-7ee2d9d8402bed2ab361ef0340a7f2a2c89e41fe.zip
marquee-7ee2d9d8402bed2ab361ef0340a7f2a2c89e41fe.tar.gz
marquee-7ee2d9d8402bed2ab361ef0340a7f2a2c89e41fe.tar.bz2
mq_application_delete_window(): New function
Diffstat (limited to 'src')
-rw-r--r--src/application.c9
-rw-r--r--src/application.h3
2 files changed, 12 insertions, 0 deletions
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