Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--TODO4
-rw-r--r--shell/ev-view.c8
-rw-r--r--shell/ev-window.c33
4 files changed, 45 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 665f682..460cebc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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:
diff --git a/TODO b/TODO
index 576f2ab..9245e73 100644
--- a/TODO
+++ b/TODO
@@ -1,10 +1,11 @@
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?)
@@ -37,3 +38,4 @@ Move to having three sizing types:
* Free zooming
* constrain to width
* constrain to height
+Sidebar improvements for ps/pixbuf, or PDF files without a TOC. bug 164811
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 5b81ce3..20c0eef 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -422,14 +422,16 @@ view_set_adjustment_values (EvView *view,
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;
}
@@ -806,7 +808,7 @@ get_page_extents (EvView *view,
/* 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)
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 2ebcc1b..034fa1b 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -172,7 +172,8 @@ static void ev_window_run_presentation (EvWindow *windo
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)
@@ -316,7 +317,10 @@ update_chrome_visibility (EvWindow *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);
}
}
@@ -1388,6 +1392,18 @@ fullscreen_clear_timeout (EvWindow *window)
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,
@@ -1395,12 +1411,7 @@ fullscreen_motion_notify_cb (GtkWidget *widget,
{
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;
}
@@ -1645,7 +1656,7 @@ ev_window_focus_in_event (GtkWidget *widget, GdkEventFocus *event)
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);
}
@@ -2327,6 +2338,10 @@ ev_window_dispose (GObject *object)
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);