diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-25 23:03:28 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-10-26 17:02:51 +0800 |
commit | 60de5f653d7066698803e4d0a5df4417181abbc2 (patch) | |
tree | 292bc5818ab827bf6882a1354dbc229bafce9fce /src/empathy.c | |
parent | 6f49a762afc95060f19dc7778b0b588d1e86754b (diff) | |
download | gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.tar gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.tar.gz gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.tar.bz2 gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.tar.lz gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.tar.xz gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.tar.zst gsoc2013-empathy-60de5f653d7066698803e4d0a5df4417181abbc2.zip |
empathy: rely on gtk_application_add_window() to manage the main loop
We are not supposed to call gtk_main_quit() as we don't use gtk_main() any
more. Instead we add the windows to the GtkApplication which will take care of
exiting when they have been all destroyed.
https://bugzilla.gnome.org/show_bug.cgi?id=662504
Diffstat (limited to 'src/empathy.c')
-rw-r--r-- | src/empathy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/empathy.c b/src/empathy.c index e1dab1f18..b73bf1b03 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -181,9 +181,6 @@ empathy_app_finalize (GObject *object) g_free (self->preferences_tab); - if (self->window != NULL) - gtk_widget_destroy (self->window); - if (finalize != NULL) finalize (object); } @@ -351,12 +348,14 @@ empathy_app_command_line (GApplication *app, g_error_free (error); } - g_application_hold (G_APPLICATION (app)); self->activated = TRUE; /* Setting up UI */ self->window = empathy_main_window_dup (); + gtk_application_add_window (GTK_APPLICATION (app), + GTK_WINDOW (self->window)); + /* check if Shell is running */ dbus = tp_dbus_daemon_dup (&error); g_assert_no_error (error); |