From: Christian Persch Date: Sun, 29 Jul 2007 12:53:18 +0000 (+0000) Subject: Don't use deprecated gtk+ function. See bug #460909. X-Git-Tag: EVINCE_0_9_3~14 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=d111d5e282a9f34f3897f80e490cbdeeb6b8d4ac;p=evince.git Don't use deprecated gtk+ function. See bug #460909. 2007-07-29 Christian Persch * shell/ev-window.c: (ev_window_screen_changed): Don't use deprecated gtk+ function. See bug #460909. svn path=/trunk/; revision=2587 --- diff --git a/ChangeLog b/ChangeLog index 5723fd30..14f67460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-29 Christian Persch + + * shell/ev-window.c: (ev_window_screen_changed): + + Don't use deprecated gtk+ function. See bug #460909. + 2007-07-27 Carlos Garcia Campos * 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 * shell/ev-view.c: (ev_view_class_init): diff --git a/shell/ev-window.c b/shell/ev-window.c index d9fc479c..6a03b75d 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -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,