On Sun, 27 Jan 2008, Klaus Weidner wrote:

On Sun, Jan 27, 2008 at 03:08:34AM -0800, [EMAIL PROTECTED] wrote:
The "continuous pages" mode is what had previously been the only mode.
You can see the bottom of one page and the top of the next page on the
screen simultaneously. In "single pages" mode, you never see more than
one page at a time.

This is a matter of taste and the more useful one also depends on the
document, which is why I think it should be switchable.

Ok, I can see the desire for this mode, but I'm not sure it's worth the
complication (especially given the other simplifications done to sugar)

I think the addition is not that complicated (could be a single toggle
button, two-half-pages-with-gap as the icon). The single page mode can
make reading documents much less confusing, especially in the case of
multi-column documents where you would otherwise need to be careful when
moving back to the next column to make sure you're on the right page.
This way you can clearly see where the page ends, and either move back up
manually or hit "home" to go back to the top of the page.

Actually, I think non-continuous mode would even make sense as the
default since it's simpler and more book-like than the continuous one,
which acts more like a scroll. And it should use less memory since it
never needs to render more than a page at a time.

on large PDF's it doesn't render the entire document currently, it tries to stay a few pages ahead of you, but if you start at the beginning of a long document and page down you will fairly quickly get to a message saying that the page isn't ready yet. if you then jump to the bottom of the document you will see the same thing, but it will then render the pages. if you then jump back to the top of the document you will find that it needs to re-render pages that you already viewed.

I've got an electronic subscription to Circuit Cellar and I loaded the last 30 or so issues onto my SD card and read the last few on the XO. I've also loaded some software manuals (~200 pages each) and tried to read them as well (the manuals suffered from fonts being invisable, but this seems to be mostly, if not completely fixed in recent builds)

David Lang
diff --git a/shell/ev-view.c b/shell/ev-view.c
index b464c3f..3bfe7da 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -360,7 +360,7 @@ scroll_to_current_page (EvView *view, GtkOrientation 
orientation)
                                                   view_point.y + 
view->vadjustment->page_size);
                } else {
                        gtk_adjustment_set_value (view->vadjustment,
-                                                 CLAMP (view_point.y,
+                                                 CLAMP 
(view->vadjustment->value,
                                                  view->vadjustment->lower,
                                                  view->vadjustment->upper -
                                                  
view->vadjustment->page_size));
@@ -372,7 +372,7 @@ scroll_to_current_page (EvView *view, GtkOrientation 
orientation)
                                                   view_point.x + 
view->hadjustment->page_size);
                } else {
                        gtk_adjustment_set_value (view->hadjustment,
-                                                 CLAMP (view_point.x,
+                                                 CLAMP 
(view->hadjustment->value,
                                                  view->hadjustment->lower,
                                                  view->hadjustment->upper -
                                                  
view->hadjustment->page_size));
@@ -3996,6 +3996,8 @@ ev_view_class_init (EvViewClass *class)
 
        binding_set = gtk_binding_set_by_class (class);
 
+       add_scroll_binding_keypad (binding_set, GDK_Page_Up,  0, 
EV_SCROLL_PAGE_BACKWARD, FALSE);
+       add_scroll_binding_keypad (binding_set, GDK_Page_Down, 0, 
EV_SCROLL_PAGE_FORWARD,  FALSE);
        add_scroll_binding_keypad (binding_set, GDK_Left,  0, 
EV_SCROLL_STEP_BACKWARD, TRUE);
        add_scroll_binding_keypad (binding_set, GDK_Right, 0, 
EV_SCROLL_STEP_FORWARD,  TRUE);
        add_scroll_binding_keypad (binding_set, GDK_Left,  GDK_MOD1_MASK, 
EV_SCROLL_STEP_DOWN, TRUE);
diff --git a/readactivity.py b/readactivity.py
index 956e3b0..99b9244 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -95,7 +95,7 @@ class ReadActivity(activity.Activity):
         toolbox.add_toolbar(_('Read'), self._read_toolbar)
         self._read_toolbar.show()
 
-        self._view_toolbar = ViewToolbar(self._view)
+        self._view_toolbar = ViewToolbar(self._view, self)
         self._view_toolbar.connect('needs-update-size',
                 self.__view_toolbar_needs_update_size_cb)
         toolbox.add_toolbar(_('View'), self._view_toolbar)
diff --git a/readtoolbar.py b/readtoolbar.py
index 332e4fa..be475b2 100644
--- a/readtoolbar.py
+++ b/readtoolbar.py
@@ -258,9 +258,10 @@ class ViewToolbar(gtk.Toolbar):
                               ([]))
     }
 
-    def __init__(self, evince_view):
+    def __init__(self, evince_view, activity):
         gtk.Toolbar.__init__(self)
 
+        self._activity = activity
         self._evince_view = evince_view
         self._document = None
             
@@ -293,6 +294,16 @@ class ViewToolbar(gtk.Toolbar):
         palette.menu.append(menu_item)
         menu_item.show()
 
+        menu_item = MenuItem(_('Single pages'))
+        menu_item.connect('activate', 
self._continuous_false_menu_item_activate_cb)
+        palette.menu.append(menu_item)
+        menu_item.show()
+
+        menu_item = MenuItem(_('Continuous pages'))
+        menu_item.connect('activate', 
self._continuous_true_menu_item_activate_cb)
+        palette.menu.append(menu_item)
+        menu_item.show()
+
         tool_item = gtk.ToolItem()
         self.insert(tool_item, -1)
         tool_item.show()
@@ -313,6 +324,14 @@ class ViewToolbar(gtk.Toolbar):
         self.insert(tool_item_zoom_perc_label, -1)
         tool_item_zoom_perc_label.show()
 
+        self._view_fullscreen = ToolButton('view-fullscreen')
+        self._view_fullscreen.set_tooltip(_('Fullscreen mode'))
+        self._view_fullscreen.connect('clicked', self._view_fullscreen_cb)
+        self.insert(self._view_fullscreen, -1)
+        self._view_fullscreen.show()
+
+        self._zoom_to_width.show()
+
         self._view_notify_zoom_handler = self._evince_view.connect(
                 'notify::zoom', self._view_notify_zoom_cb)
 
@@ -364,3 +383,12 @@ class ViewToolbar(gtk.Toolbar):
         self._evince_view.props.zoom = 1.0
         self._update_zoom_buttons()
 
+    def _continuous_false_menu_item_activate_cb(self, menu_item):
+        self._evince_view.set_continuous(False)
+
+    def _continuous_true_menu_item_activate_cb(self, menu_item):
+        self._evince_view.set_continuous(True)
+
+    def _view_fullscreen_cb(self, button):
+        self._activity.fullscreen()
+
_______________________________________________
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel

Reply via email to