X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=shell%2Fev-page-cache.c;h=a79ba056e73f8ac542eddb9f63782cb434a0f786;hb=0d19025d51e4a14ae553a4fc877c04261a11c902;hp=eb88ed9d607880b346382bc6378e848a1d40c5ae;hpb=c1ecd5af7022d14f69151860508d9603afa4e3af;p=evince.git diff --git a/shell/ev-page-cache.c b/shell/ev-page-cache.c index eb88ed9d..a79ba056 100644 --- a/shell/ev-page-cache.c +++ b/shell/ev-page-cache.c @@ -341,16 +341,6 @@ ev_page_cache_set_page_label (EvPageCache *page_cache, return FALSE; } -void -ev_page_cache_set_link (EvPageCache *page_cache, - EvLink *link) -{ - g_return_if_fail (EV_IS_PAGE_CACHE (page_cache)); - g_return_if_fail (EV_IS_LINK (link)); - - ev_page_cache_set_current_page (page_cache, ev_link_get_page (link)); -} - const char * ev_page_cache_get_title (EvPageCache *page_cache) { @@ -367,7 +357,7 @@ ev_page_cache_get_size (EvPageCache *page_cache, gint *width, gint *height) { - int w, h; + double w, h; g_return_if_fail (EV_IS_PAGE_CACHE (page_cache)); g_return_if_fail (page >= 0 && page < page_cache->n_pages); @@ -384,15 +374,15 @@ ev_page_cache_get_size (EvPageCache *page_cache, h = info->height; } - w = (int) (w * scale + 0.5); - h = (int) (h * scale + 0.5); + w = w * scale + 0.5; + h = h * scale + 0.5; if (rotation == 0 || rotation == 180) { - if (width) *width = w; - if (height) *height = h; + if (width) *width = (int)w; + if (height) *height = (int)h; } else { - if (width) *width = h; - if (height) *height = w; + if (width) *width = (int)h; + if (height) *height = (int)w; } } @@ -497,32 +487,6 @@ ev_page_cache_get_info (EvPageCache *page_cache) return page_cache->page_info; } - -gboolean -ev_page_cache_next_page (EvPageCache *page_cache) -{ - g_return_val_if_fail (EV_IS_PAGE_CACHE (page_cache), FALSE); - - if (page_cache->current_page >= page_cache->n_pages - 1) - return FALSE; - - ev_page_cache_set_current_page (page_cache, page_cache->current_page + 1); - return TRUE; - -} - -gboolean -ev_page_cache_prev_page (EvPageCache *page_cache) -{ - g_return_val_if_fail (EV_IS_PAGE_CACHE (page_cache), FALSE); - - if (page_cache->current_page <= 0) - return FALSE; - - ev_page_cache_set_current_page (page_cache, page_cache->current_page - 1); - return TRUE; -} - #define PAGE_CACHE_STRING "ev-page-cache" EvPageCache *