From: Hib Eris Date: Mon, 29 Mar 2010 14:58:14 +0000 (+0200) Subject: Replace GTK_WIDGET_VISIBLE() with gtk_widget_get_visible() X-Git-Tag: EVINCE_2_31_1~47 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=41d617b23b7dd9e3162779396b3557bcde17d53b;p=evince.git Replace GTK_WIDGET_VISIBLE() with gtk_widget_get_visible() --- diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c index 5cf6c31e..6cd7fa03 100644 --- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c +++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c @@ -872,7 +872,7 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) priv->visibility_id = gtk_ui_manager_new_merge_id (priv->manager); - showing = GTK_WIDGET_VISIBLE (etoolbar); + showing = gtk_widget_get_visible (GTK_WIDGET (etoolbar)); n_toolbars = egg_toolbars_model_n_toolbars (priv->model); for (i = 0; i < n_toolbars; i++) @@ -954,7 +954,7 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) 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); - gtk_toggle_action_set_active (action, GTK_WIDGET_VISIBLE + gtk_toggle_action_set_active (action, gtk_widget_get_visible (get_dock_nth (etoolbar, i))); for (list = priv->visibility_paths; list != NULL; list = g_list_next (list)) diff --git a/libview/ev-view.c b/libview/ev-view.c index 2837f0fd..8ccee695 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -2398,7 +2398,7 @@ ev_view_window_child_move_with_parent (EvView *view, ev_view_window_child_move (view, child, dest_x, dest_y); } - if (child->visible && !GTK_WIDGET_VISIBLE (window)) + if (child->visible && !gtk_widget_get_visible (window)) gtk_widget_show (window); } diff --git a/shell/ev-navigation-action-widget.c b/shell/ev-navigation-action-widget.c index 5a04fd3a..a9a60233 100644 --- a/shell/ev-navigation-action-widget.c +++ b/shell/ev-navigation-action-widget.c @@ -98,7 +98,7 @@ ev_navigation_action_widget_set_menu(EvNavigationActionWidget *button, GtkWidget if (button->menu == GTK_MENU (menu)) return; - if (button->menu && GTK_WIDGET_VISIBLE (button->menu)) + if (button->menu && gtk_widget_get_visible (GTK_WIDGET (button->menu))) gtk_menu_shell_deactivate (GTK_MENU_SHELL (button->menu)); if (button->menu) { @@ -186,7 +186,7 @@ ev_navigation_action_widget_toggled (GtkToggleToolButton *toggle) return; if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (button)) && - !GTK_WIDGET_VISIBLE (button->menu)) { + !gtk_widget_get_visible (GTK_WIDGET (button->menu))) { /* 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 --git a/shell/ev-window.c b/shell/ev-window.c index 3d1ffaf0..bd4097ae 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -4301,12 +4301,13 @@ ev_window_sidebar_visibility_changed_cb (EvSidebar *ev_sidebar, action = gtk_action_group_get_action (ev_window->priv->action_group, "ViewSidebar"); if (!EV_WINDOW_IS_PRESENTATION (ev_window)) { - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - GTK_WIDGET_VISIBLE (ev_sidebar)); + gboolean visible = gtk_widget_get_visible (GTK_WIDGET (ev_sidebar)); + + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible); if (ev_window->priv->metadata) ev_metadata_set_boolean (ev_window->priv->metadata, "sidebar_visibility", - GTK_WIDGET_VISIBLE (ev_sidebar)); + visible); } } @@ -4625,7 +4626,7 @@ find_bar_visibility_changed_cb (EggFindBar *find_bar, { gboolean visible; - visible = GTK_WIDGET_VISIBLE (find_bar); + visible = gtk_widget_get_visible (GTK_WIDGET (find_bar)); if (ev_window->priv->document && EV_IS_DOCUMENT_FIND (ev_window->priv->document)) { @@ -4946,7 +4947,7 @@ ev_window_key_press_event (GtkWidget *widget, if (priv->menubar_accel_keyval != 0 && event->keyval == priv->menubar_accel_keyval && modifier == priv->menubar_accel_modifier) { - if (!GTK_WIDGET_VISIBLE (priv->menubar)) { + if (!gtk_widget_get_visible (priv->menubar)) { g_signal_connect (priv->menubar, "deactivate", G_CALLBACK (menubar_deactivate_cb), ev_window);