diff -urN evince-2.28.2.old/cut-n-paste/gimpcellrenderertoggle/gimpcellrenderertoggle.c evince-2.28.2/cut-n-paste/gimpcellrenderertoggle/gimpcellrenderertoggle.c --- evince-2.28.2.old/cut-n-paste/gimpcellrenderertoggle/gimpcellrenderertoggle.c 2009-04-24 09:24:16.000000000 +0200 +++ evince-2.28.2/cut-n-paste/gimpcellrenderertoggle/gimpcellrenderertoggle.c 2010-05-10 23:58:43.728419665 +0200 @@ -315,7 +315,11 @@ } else if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED) { +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_has_focus (widget)) +#else if (GTK_WIDGET_HAS_FOCUS (widget)) +#endif state = GTK_STATE_SELECTED; else state = GTK_STATE_ACTIVE; diff -urN evince-2.28.2.old/cut-n-paste/toolbar-editor/egg-editable-toolbar.c evince-2.28.2/cut-n-paste/toolbar-editor/egg-editable-toolbar.c --- evince-2.28.2.old/cut-n-paste/toolbar-editor/egg-editable-toolbar.c 2009-06-09 10:09:38.000000000 +0200 +++ evince-2.28.2/cut-n-paste/toolbar-editor/egg-editable-toolbar.c 2010-05-10 23:57:23.828387784 +0200 @@ -872,7 +872,11 @@ priv->visibility_id = gtk_ui_manager_new_merge_id (priv->manager); +#if GTK_CHECK_VERSION (2, 19, 7) + showing = gtk_widget_get_visible (etoolbar); +#else showing = GTK_WIDGET_VISIBLE (etoolbar); +#endif n_toolbars = egg_toolbars_model_n_toolbars (priv->model); for (i = 0; i < n_toolbars; i++) @@ -954,7 +958,11 @@ gtk_action_set_visible (GTK_ACTION (action), (egg_toolbars_model_get_flags (priv->model, i) & EGG_TB_MODEL_NOT_REMOVABLE) == 0); gtk_action_set_sensitive (GTK_ACTION (action), showing); +#if GTK_CHECK_VERSION (2, 19, 7) + gtk_toggle_action_set_active (action, gtk_widget_get_visible +#else gtk_toggle_action_set_active (action, GTK_WIDGET_VISIBLE +#endif (get_dock_nth (etoolbar, i))); for (list = priv->visibility_paths; list != NULL; list = g_list_next (list)) diff -urN evince-2.28.2.old/libmisc/ev-page-action.c evince-2.28.2/libmisc/ev-page-action.c --- evince-2.28.2.old/libmisc/ev-page-action.c 2009-12-14 20:47:35.000000000 +0100 +++ evince-2.28.2/libmisc/ev-page-action.c 2010-05-10 23:59:42.228418984 +0200 @@ -362,7 +362,11 @@ proxy = EV_PAGE_ACTION_WIDGET (proxies->data); +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_get_mapped (GTK_WIDGET (proxy))) +#else if (GTK_WIDGET_MAPPED (GTK_WIDGET (proxy))) +#endif gtk_widget_grab_focus (proxy->entry); } } diff -urN evince-2.28.2.old/libview/ev-annotation-window.c evince-2.28.2/libview/ev-annotation-window.c --- evince-2.28.2.old/libview/ev-annotation-window.c 2009-06-09 10:09:38.000000000 +0200 +++ evince-2.28.2/libview/ev-annotation-window.c 2010-05-11 00:23:44.929431868 +0200 @@ -253,7 +253,11 @@ if (!widget->window) return; +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_is_sensitive (widget)) { +#else if (GTK_WIDGET_IS_SENSITIVE (widget)) { +#endif GdkDisplay *display = gtk_widget_get_display (widget); GdkCursor *cursor; @@ -631,7 +635,11 @@ { g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_has_focus (window->text_view)) { +#else if (!GTK_WIDGET_HAS_FOCUS (window->text_view)) { +#endif gtk_widget_grab_focus (GTK_WIDGET (window)); send_focus_change (window->text_view, TRUE); } @@ -642,7 +650,11 @@ { g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_has_focus (window->text_view)) { +#else if (GTK_WIDGET_HAS_FOCUS (window->text_view)) { +#endif send_focus_change (window->text_view, FALSE); } diff -urN evince-2.28.2.old/libview/ev-pixbuf-cache.c evince-2.28.2/libview/ev-pixbuf-cache.c --- evince-2.28.2.old/libview/ev-pixbuf-cache.c 2009-12-14 20:47:36.000000000 +0100 +++ evince-2.28.2/libview/ev-pixbuf-cache.c 2010-05-11 00:19:47.705402388 +0200 @@ -608,7 +608,11 @@ static void get_selection_colors (GtkWidget *widget, GdkColor **text, GdkColor **base) { +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_has_focus (widget)) { +#else if (GTK_WIDGET_HAS_FOCUS (widget)) { +#endif *text = &widget->style->text [GTK_STATE_SELECTED]; *base = &widget->style->base [GTK_STATE_SELECTED]; } else { diff -urN evince-2.28.2.old/libview/ev-view.c evince-2.28.2/libview/ev-view.c --- evince-2.28.2.old/libview/ev-view.c 2009-12-14 20:47:36.000000000 +0100 +++ evince-2.28.2/libview/ev-view.c 2010-05-11 00:21:13.673430952 +0200 @@ -2142,7 +2142,11 @@ ev_view_window_child_move (view, child, dest_x, dest_y); } +#if GTK_CHECK_VERSION (2, 19, 7) + if (child->visible && !gtk_widget_get_visible (window)) +#else if (child->visible && !GTK_WIDGET_VISIBLE (window)) +#endif gtk_widget_show (window); } @@ -2799,7 +2803,11 @@ gtk_paint_layout (GTK_WIDGET (view)->style, view->layout.bin_window, +#if GTK_CHECK_VERSION (2, 19, 7) + gtk_widget_get_state (view), +#else GTK_WIDGET_STATE (view), +#endif FALSE, page_area, GTK_WIDGET (view), @@ -3056,7 +3064,11 @@ if (!view->document) return FALSE; +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_has_focus (widget)) { +#else if (!GTK_WIDGET_HAS_FOCUS (widget)) { +#endif gtk_widget_grab_focus (widget); } @@ -3781,7 +3793,11 @@ if (!view->document) return FALSE; +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_has_focus (widget)) { +#else if (!GTK_WIDGET_HAS_FOCUS (widget)) { +#endif /* Forward key events to current focused window child */ if (view->window_child_focus) { GdkEventKey *new_event; @@ -4686,7 +4702,11 @@ gint x, y; GList *children, *l; +#if GTK_CHECK_VERSION (2, 19, 7) + if (! gtk_widget_get_realized (view)) +#else if (! GTK_WIDGET_REALIZED (view)) +#endif return; if (view->hadjustment) { @@ -5076,7 +5096,11 @@ } } +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_get_realized (view)) { +#else if (GTK_WIDGET_REALIZED (view)) { +#endif if (view->presentation) gdk_window_set_background (view->layout.bin_window, >K_WIDGET (view)->style->black); diff -urN evince-2.28.2.old/shell/ev-application.c evince-2.28.2/shell/ev-application.c --- evince-2.28.2.old/shell/ev-application.c 2009-12-14 20:47:36.000000000 +0100 +++ evince-2.28.2/shell/ev-application.c 2010-05-10 23:40:44.782134944 +0200 @@ -641,7 +641,11 @@ application); #endif +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_get_realized (new_window)) +#else if (!GTK_WIDGET_REALIZED (new_window)) +#endif gtk_widget_realize (new_window); #ifdef GDK_WINDOWING_X11 @@ -776,7 +780,11 @@ application); #endif +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_get_realized (GTK_WIDGET (new_window))) +#else if (!GTK_WIDGET_REALIZED (GTK_WIDGET (new_window))) +#endif gtk_widget_realize (GTK_WIDGET (new_window)); #ifdef GDK_WINDOWING_X11 diff -urN evince-2.28.2.old/shell/ev-navigation-action-widget.c evince-2.28.2/shell/ev-navigation-action-widget.c --- evince-2.28.2.old/shell/ev-navigation-action-widget.c 2009-04-24 09:24:16.000000000 +0200 +++ evince-2.28.2/shell/ev-navigation-action-widget.c 2010-05-10 23:42:50.282974826 +0200 @@ -98,7 +98,11 @@ if (button->menu == GTK_MENU (menu)) return; +#if GTK_CHECK_VERSION (2, 19, 7) + if (button->menu && gtk_widget_get_visible (button->menu)) +#else if (button->menu && GTK_WIDGET_VISIBLE (button->menu)) +#endif gtk_menu_shell_deactivate (GTK_MENU_SHELL (button->menu)); if (button->menu) { @@ -186,7 +190,11 @@ return; if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (button)) && +#if GTK_CHECK_VERSION (2, 19, 7) + !gtk_widget_get_visible (button->menu)) { +#else !GTK_WIDGET_VISIBLE (button->menu)) { +#endif /* we get here only when the menu is activated by a key * press, so that we can select the first menu item */ popup_menu_under_arrow (button, NULL); diff -urN evince-2.28.2.old/shell/ev-sidebar-attachments.c evince-2.28.2/shell/ev-sidebar-attachments.c --- evince-2.28.2.old/shell/ev-sidebar-attachments.c 2009-12-14 20:47:37.000000000 +0100 +++ evince-2.28.2/shell/ev-sidebar-attachments.c 2010-05-10 23:50:28.817446729 +0200 @@ -272,7 +272,11 @@ GdkEventButton *event, GtkWidget *icon_view) { +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_has_focus (icon_view)) { +#else if (!GTK_WIDGET_HAS_FOCUS (icon_view)) { +#endif gtk_widget_grab_focus (icon_view); } diff -urN evince-2.28.2.old/shell/ev-sidebar.c evince-2.28.2/shell/ev-sidebar.c --- evince-2.28.2.old/shell/ev-sidebar.c 2009-12-14 20:47:37.000000000 +0100 +++ evince-2.28.2/shell/ev-sidebar.c 2010-05-10 23:49:27.108971042 +0200 @@ -207,7 +207,11 @@ GtkWidget *widget; g_return_if_fail (GTK_IS_BUTTON (user_data)); +#if GTK_CHECK_VERSION (2, 19, 7) + g_return_if_fail (!gtk_widget_get_has_window (user_data)); +#else g_return_if_fail (GTK_WIDGET_NO_WINDOW (user_data)); +#endif widget = GTK_WIDGET (user_data); diff -urN evince-2.28.2.old/shell/ev-sidebar-links.c evince-2.28.2/shell/ev-sidebar-links.c --- evince-2.28.2.old/shell/ev-sidebar-links.c 2009-12-14 20:47:37.000000000 +0100 +++ evince-2.28.2/shell/ev-sidebar-links.c 2010-05-10 23:51:16.681399021 +0200 @@ -548,7 +548,11 @@ GtkTreeIter iter; /* Widget is not currently visible */ +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_get_mapped (sidebar_links)) +#else if (!GTK_WIDGET_MAPPED (sidebar_links)) +#endif return; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sidebar_links->priv->tree_view)); diff -urN evince-2.28.2.old/shell/ev-sidebar-thumbnails.c evince-2.28.2/shell/ev-sidebar-thumbnails.c --- evince-2.28.2.old/shell/ev-sidebar-thumbnails.c 2009-12-14 20:47:37.000000000 +0100 +++ evince-2.28.2/shell/ev-sidebar-thumbnails.c 2010-05-10 23:54:33.349446665 +0200 @@ -361,14 +361,22 @@ gint wy2; /* Widget is not currently visible */ +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_get_mapped (sidebar_thumbnails)) +#else if (!GTK_WIDGET_MAPPED (sidebar_thumbnails)) +#endif return; if (priv->vadjustment->page_size == 0) return; if (priv->tree_view) { +#if GTK_CHECK_VERSION (2, 19, 7) + if (! gtk_widget_get_realized (priv->tree_view)) +#else if (! GTK_WIDGET_REALIZED (priv->tree_view)) +#endif return; gtk_tree_view_convert_tree_to_bin_window_coords (GTK_TREE_VIEW (priv->tree_view), @@ -384,7 +392,11 @@ 1, wy2 -1, &path2, NULL, NULL, NULL); } else if (priv->icon_view) { +#if GTK_CHECK_VERSION (2, 19, 7) + if (! gtk_widget_get_realized (priv->icon_view)) +#else if (! GTK_WIDGET_REALIZED (priv->icon_view)) +#endif return; if (! gtk_icon_view_get_visible_range (GTK_ICON_VIEW (priv->icon_view), &path, &path2)) return; diff -urN evince-2.28.2.old/shell/ev-window.c evince-2.28.2/shell/ev-window.c --- evince-2.28.2.old/shell/ev-window.c 2009-12-14 20:47:37.000000000 +0100 +++ evince-2.28.2/shell/ev-window.c 2010-05-10 23:47:31.160962184 +0200 @@ -4295,10 +4295,18 @@ if (!ev_view_get_presentation (view)) { gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), +#if GTK_CHECK_VERSION (2, 19, 7) + gtk_widget_get_visible (ev_sidebar)); +#else GTK_WIDGET_VISIBLE (ev_sidebar)); +#endif ev_metadata_manager_set_boolean (ev_window->priv->uri, "sidebar_visibility", +#if GTK_CHECK_VERSION (2, 19, 7) + gtk_widget_get_visible (ev_sidebar)); +#else GTK_WIDGET_VISIBLE (ev_sidebar)); +#endif } } @@ -4567,7 +4575,11 @@ { gboolean visible; +#if GTK_CHECK_VERSION (2, 19, 7) + visible = gtk_widget_get_visible (find_bar); +#else visible = GTK_WIDGET_VISIBLE (find_bar); +#endif if (ev_window->priv->document && EV_IS_DOCUMENT_FIND (ev_window->priv->document)) { @@ -4884,7 +4896,11 @@ */ if (priv->view) { g_object_ref (priv->view); +#if GTK_CHECK_VERSION (2, 19, 7) + if (gtk_widget_is_sensitive (priv->view)) +#else if (GTK_WIDGET_IS_SENSITIVE (priv->view)) +#endif handled = gtk_widget_event (priv->view, (GdkEvent*) event); g_object_unref (priv->view); } @@ -4895,7 +4911,11 @@ if (priv->menubar_accel_keyval != 0 && event->keyval == priv->menubar_accel_keyval && modifier == priv->menubar_accel_modifier) { +#if GTK_CHECK_VERSION (2, 19, 7) + if (!gtk_widget_get_visible (priv->menubar)) { +#else if (!GTK_WIDGET_VISIBLE (priv->menubar)) { +#endif g_signal_connect (priv->menubar, "deactivate", G_CALLBACK (menubar_deactivate_cb), ev_window);