+Fri Jun 3 21:07:57 2005 Jonathan Blandford <jrb@redhat.com>
+
+ * shell/ev-view.c (get_page_extents): other_page isn't necessarily
+ page + 1.
+
+ * shell/ev-window.c: Make sure we add the timeout when we get a
+ focus-in event.
+
+ * shell/ev-view.c (view_set_adjustment_values): Add 0.5 to
+ adjustment->value before calculating the zoom factor to average
+ out all of our rounding errors. The page no longer 'drifts' when
+ resizing.
+
2005-06-04 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* data/evince-properties.glade:
Hook up recent documents support (though rumors are that it's slow)
+Fix shadow to be a real shadow -- not the thick bars they are now.
+
Improve Find system
Display location of results in thumbnails?
Only display thumbnails of pages found?
-Sidebar improvements for ps/pixbuf, or PDF files without a TOC. bug 164811
Improve Printing Support: (libgnomeprintui?)
* Free zooming
* constrain to width
* constrain to height
+Sidebar improvements for ps/pixbuf, or PDF files without a TOC. bug 164811
return;
factor = 1.0;
+ /* We add 0.5 to the values before to average out our rounding errors.
+ */
switch (view->pending_scroll) {
case SCROLL_TO_KEEP_POSITION:
- factor = adjustment->value / adjustment->upper;
+ factor = (adjustment->value + 0.5) / adjustment->upper;
break;
case SCROLL_TO_CURRENT_PAGE:
break;
case SCROLL_TO_CENTER:
- factor = (adjustment->value + adjustment->page_size * 0.5) / adjustment->upper;
+ factor = (adjustment->value + adjustment->page_size * 0.5 + 0.5) / adjustment->upper;
break;
}
/* First, we get the bounding box of the two pages */
if (other_page < ev_page_cache_get_n_pages (view->page_cache)) {
ev_page_cache_get_size (view->page_cache,
- page + 1,
+ other_page,
view->scale,
&width_2, &height_2);
if (width_2 > width)
static void ev_window_stop_presentation (EvWindow *window);
static void ev_window_cmd_view_presentation (GtkAction *action,
EvWindow *window);
-
+static void show_fullscreen_popup (EvWindow *window);
+
G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW)
set_widget_visibility (priv->fullscreen_toolbar, fullscreen_toolbar);
if (priv->fullscreen_popup != NULL) {
- set_widget_visibility (priv->fullscreen_popup, fullscreen);
+ if (fullscreen)
+ show_fullscreen_popup (window);
+ else
+ set_widget_visibility (priv->fullscreen_popup, FALSE);
}
}
ev_view_show_cursor (EV_VIEW (window->priv->view));
}
+
+static void
+show_fullscreen_popup (EvWindow *window)
+{
+ if (!GTK_WIDGET_VISIBLE (window->priv->fullscreen_popup)) {
+ g_object_set (window->priv->fullscreen_popup, "visible", TRUE, NULL);
+ ev_view_show_cursor (EV_VIEW (window->priv->view));
+ }
+
+ fullscreen_set_timeout (window);
+}
+
static gboolean
fullscreen_motion_notify_cb (GtkWidget *widget,
GdkEventMotion *event,
{
EvWindow *window = EV_WINDOW (user_data);
- if (!GTK_WIDGET_VISIBLE (window->priv->fullscreen_popup)) {
- g_object_set (window->priv->fullscreen_popup, "visible", TRUE, NULL);
- ev_view_show_cursor (EV_VIEW (window->priv->view));
- }
-
- fullscreen_set_timeout (window);
+ show_fullscreen_popup (window);
return FALSE;
}
NULL);
if (fullscreen)
- gtk_widget_show (priv->fullscreen_popup);
+ show_fullscreen_popup (window);
return GTK_WIDGET_CLASS (ev_window_parent_class)->focus_in_event (widget, event);
}
priv->find_bar = NULL;
}
+ if (window->priv->fullscreen_timeout_source) {
+ g_source_destroy (window->priv->fullscreen_timeout_source);
+ window->priv->fullscreen_timeout_source = NULL;
+ }
destroy_fullscreen_popup (window);
G_OBJECT_CLASS (ev_window_parent_class)->dispose (object);