[totem] main: Make it possible to call app_init multiple times
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Make it possible to call app_init multiple times
- Date: Mon, 20 Oct 2014 17:12:43 +0000 (UTC)
commit 7618d6fb27d9e4ed870169b96c81a2243df2348b
Author: Bastien Nocera <hadess hadess net>
Date: Mon Oct 20 18:36:40 2014 +0200
main: Make it possible to call app_init multiple times
This avoids us having to look inside the app's implementation to
know whether a window had been shown or not.
src/totem.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/totem.c b/src/totem.c
index 7fb9b73..ce3e164 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -52,8 +52,13 @@
static gboolean startup_called = FALSE;
static void
-app_init (Totem *totem, char **argv)
+app_activate (GApplication *app,
+ Totem *totem)
{
+ /* Already init'ed? */
+ if (totem->xml != NULL)
+ return;
+
/* Main window */
totem->xml = totem_interface_load ("totem.ui", TRUE, NULL, totem);
if (totem->xml == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]