From 20d704b7b4f2560ee27cc9be25359107ceb4a14b Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Thu, 9 Jun 2011 22:33:30 +0300 Subject: Port EomApplication to GtkApplication This removes the direct dependency on dbus and makes use of the GApplication/GtkApplication facilities for uniqueness and activation. Bump the glib requirement to 2.29.4, since we need G_APPLICATION_NON_UNIQUE. https://bugzilla.gnome.org/show_bug.cgi?id=622876 origin commit: https://gitlab.gnome.org/GNOME/eog/commit/3d39587 Enable TotemScreensaver unconditionally It uses GDBus instead of libdbus now. It can be enabled even if libdbus is not available as GDBus/GIO is always present. origin commit: https://gitlab.gnome.org/GNOME/eog/commit/4c32882 --- src/eom-window.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'src/eom-window.c') diff --git a/src/eom-window.c b/src/eom-window.c index 1fb2e60..b8ca305 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -2057,9 +2057,7 @@ eom_window_run_fullscreen (EomWindow *window, gboolean slideshow) gtk_window_fullscreen (GTK_WINDOW (window)); eom_window_update_fullscreen_popup (window); -#ifdef HAVE_DBUS eom_application_screensaver_disable (EOM_APP); -#endif /* Update both actions as we could've already been in one those modes */ eom_window_update_slideshow_action (window); @@ -2124,9 +2122,7 @@ eom_window_stop_fullscreen (EomWindow *window, gboolean slideshow) eom_scroll_view_show_cursor (EOM_SCROLL_VIEW (priv->view)); -#ifdef HAVE_DBUS eom_application_screensaver_enable (EOM_APP); -#endif } static void @@ -4572,6 +4568,8 @@ eom_window_init (EomWindow *window) window->priv->save_disabled = FALSE; window->priv->page_setup = NULL; + + gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (EOM_APP)); } static void @@ -4717,24 +4715,6 @@ eom_window_dispose (GObject *object) G_OBJECT_CLASS (eom_window_parent_class)->dispose (object); } -static void -eom_window_finalize (GObject *object) -{ - GList *windows = eom_application_get_windows (EOM_APP); - - g_return_if_fail (EOM_IS_WINDOW (object)); - - eom_debug (DEBUG_WINDOW); - - if (windows == NULL) { - eom_application_shutdown (EOM_APP); - } else { - g_list_free (windows); - } - - G_OBJECT_CLASS (eom_window_parent_class)->finalize (object); -} - static gint eom_window_delete (GtkWidget *widget, GdkEventAny *event) { @@ -5090,7 +5070,6 @@ eom_window_class_init (EomWindowClass *class) g_object_class->constructor = eom_window_constructor; g_object_class->dispose = eom_window_dispose; - g_object_class->finalize = eom_window_finalize; g_object_class->set_property = eom_window_set_property; g_object_class->get_property = eom_window_get_property; -- cgit v1.2.1