]> www.fi.muni.cz Git - evince.git/commitdiff
Don't use deprecated gtk+ function. See bug #460909.
authorChristian Persch <chpe@gnome.org>
Sun, 29 Jul 2007 12:53:18 +0000 (12:53 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 29 Jul 2007 12:53:18 +0000 (12:53 +0000)
2007-07-29  Christian Persch  <chpe@gnome.org>

* shell/ev-window.c: (ev_window_screen_changed):

Don't use deprecated gtk+ function. See bug #460909.

svn path=/trunk/; revision=2587

ChangeLog
shell/ev-window.c

index 5723fd305ac0e6ab9b2f3245f09118b20da8c309..14f674600faa0c6b001f1dd9570fd879ee4df9fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-29  Christian Persch  <chpe@gnome.org>
+
+       * shell/ev-window.c: (ev_window_screen_changed):
+       
+       Don't use deprecated gtk+ function. See bug #460909.
+
 2007-07-27  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-utils.c: (get_num_monitors):
@@ -5,7 +11,7 @@
 
        Do not use display before initializing it. Remove compile
        warnings.
-       
+
 2007-07-27  Cosimo Cecchi   <anarki@lilik.it>
 
        * shell/ev-view.c: (ev_view_class_init):
index d9fc479cfb8619306349615f46c60ef6407c28d8..6a03b75d1fe37608bcd9feb941bc65dbd35bd41c 100644 (file)
@@ -3077,21 +3077,7 @@ ev_window_screen_changed (GtkWidget *widget,
        if (screen == old_screen)
                return;
 
-#ifdef HAVE_GTK_RECENT
-       if (old_screen) {
-               g_signal_handlers_disconnect_by_func (
-                       gtk_recent_manager_get_for_screen (old_screen),
-                       G_CALLBACK (ev_window_setup_recent), window);
-       }
-
-       priv->recent_manager = gtk_recent_manager_get_for_screen (screen);
-       g_signal_connect_swapped (priv->recent_manager,
-                                 "changed",
-                                 G_CALLBACK (ev_window_setup_recent),
-                                 window);
-#endif
-       
-       ev_view_set_screen_dpi (EV_VIEW (window->priv->view),
+       ev_view_set_screen_dpi (EV_VIEW (priv->view),
                                get_screen_dpi (GTK_WINDOW (window)));
        
        if (GTK_WIDGET_CLASS (ev_window_parent_class)->screen_changed) {
@@ -5162,8 +5148,13 @@ ev_window_init (EvWindow *ev_window)
        }
        
 #ifdef HAVE_GTK_RECENT
+#if GTK_CHECK_VERSION (2, 11, 4)
+       ev_window->priv->recent_manager = gtk_recent_manager_get_default ();
+#else
+       /* It's fine to just use the one of the default screen here */
        ev_window->priv->recent_manager = gtk_recent_manager_get_for_screen (
-               gtk_widget_get_screen (GTK_WIDGET (ev_window)));
+               gtk_screen_get_default ());
+#endif
        ev_window->priv->recent_action_group = NULL;
        ev_window->priv->recent_ui_id = 0;
        g_signal_connect_swapped (ev_window->priv->recent_manager,