Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-08-21 10:56:35 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-09-15 13:56:02 (GMT)
commit8f8663bd6503f53ad78c68aefe44800575959944 (patch)
treed8742a67c47e6cc205f024b20e7c246080499e8c /shell/ev-window.c
parent6965a51a28f76d0a669d0d1c9fdc089e6cf46c7d (diff)
Remove zoom-invalid signal from EvView
It was used by EvView when sizing mode was best-fit or fit-width to request the window for its content size. This is not needed at all, since we already call size_allocate on parent class. GtkScrolledWindow takes into account the shadow type and scrollbars visibility in its size_allocate method, so we can just take the allocation returned to calculate the zoom in case of best-fit or fit-width.
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 078cb9c..7593fd8 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3965,43 +3965,6 @@ save_sizing_mode (EvWindow *window)
enum_value->value_nick);
}
-static void
-ev_window_set_view_size (EvWindow *window)
-{
- gint width, height;
- GtkRequisition vsb_requisition;
- GtkRequisition hsb_requisition;
- gint scrollbar_spacing;
- GtkWidget *scrolled_window = window->priv->scrolled_window;
-
- if (!window->priv->view)
- return;
-
- /* Calculate the width available for the content */
- width = scrolled_window->allocation.width;
- height = scrolled_window->allocation.height;
-
- if (gtk_scrolled_window_get_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window)) == GTK_SHADOW_IN) {
- width -= 2 * window->priv->view->style->xthickness;
- height -= 2 * window->priv->view->style->ythickness;
- }
-
- gtk_widget_size_request (GTK_SCROLLED_WINDOW (scrolled_window)->vscrollbar,
- &vsb_requisition);
- gtk_widget_size_request (GTK_SCROLLED_WINDOW (scrolled_window)->hscrollbar,
- &hsb_requisition);
- gtk_widget_style_get (scrolled_window,
- "scrollbar_spacing",
- &scrollbar_spacing,
- NULL);
-
- ev_view_set_zoom_for_size (EV_VIEW (window->priv->view),
- MAX (1, width),
- MAX (1, height),
- vsb_requisition.width + scrollbar_spacing,
- hsb_requisition.height + scrollbar_spacing);
-}
-
static void
ev_window_sizing_mode_changed_cb (EvView *view, GParamSpec *pspec,
EvWindow *ev_window)
@@ -6087,9 +6050,6 @@ ev_window_init (EvWindow *ev_window)
g_signal_connect_object (ev_window->priv->view, "handle-link",
G_CALLBACK (view_handle_link_cb),
ev_window, 0);
- g_signal_connect_swapped (ev_window->priv->view, "zoom_invalid",
- G_CALLBACK (ev_window_set_view_size),
- ev_window);
g_signal_connect_object (ev_window->priv->view,
"popup",
G_CALLBACK (view_menu_popup_cb),