]> www.fi.muni.cz Git - evince.git/commitdiff
Fixes assertion fail on selecting text. See bug #561393.
authorMarek Kašík <mkasik@redhat.com>
Tue, 18 Nov 2008 23:15:12 +0000 (23:15 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Tue, 18 Nov 2008 23:15:12 +0000 (23:15 +0000)
2008-11-19  Marek Kašík <mkasik@redhat.com>

* shell/ev-pixbuf-cache.c (ev_pixbuf_cache_add_jobs_if_needed):
* shell/ev-window.c (launch_external_uri):

Fixes assertion fail on selecting text. See bug #561393.

svn path=/trunk/; revision=3271

ChangeLog
shell/ev-pixbuf-cache.c
shell/ev-window.c

index 9b3ab874c3f9f9c6904c030fd451d55ad19fee88..5b23292b305d518860bf1f5dcc5a1345b3b7352b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-19  Marek Kašík <mkasik@redhat.com>
+
+       * shell/ev-pixbuf-cache.c (ev_pixbuf_cache_add_jobs_if_needed):
+       * shell/ev-window.c (launch_external_uri):
+       
+       Fixes assertion fail on selecting text. See bug #561393.
+
 2008-11-15  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/Makefile.am:
index d9252fdb99f26299039d36e00843dc35454f305d..ffa03772b51595585d3d4998467fb39e7fa18d58 100644 (file)
@@ -94,8 +94,8 @@ static gboolean      new_selection_surface_needed(EvPixbufCache      *pixbuf_cac
 
 
 /* These are used for iterating through the prev and next arrays */
-#define FIRST_VISABLE_PREV(pixbuf_cache) \
-       (MAX (0, pixbuf_cache->preload_cache_size + 1 - pixbuf_cache->start_page))
+#define FIRST_VISIBLE_PREV(pixbuf_cache) \
+       (MAX (0, pixbuf_cache->preload_cache_size - pixbuf_cache->start_page))
 #define VISIBLE_NEXT_LEN(pixbuf_cache, page_cache) \
        (MIN(pixbuf_cache->preload_cache_size, ev_page_cache_get_n_pages (page_cache) - (1 + pixbuf_cache->end_page)))
 #define PAGE_CACHE_LEN(pixbuf_cache) \
@@ -593,9 +593,6 @@ ev_pixbuf_cache_clear_job_sizes (EvPixbufCache *pixbuf_cache,
        }
 }
 
-#define FIRST_VISABLE_PREV(pixbuf_cache) \
-       (MAX (0, pixbuf_cache->preload_cache_size + 1 - pixbuf_cache->start_page))
-
 static void
 get_selection_colors (GtkWidget *widget, GdkColor **text, GdkColor **base)
 {
@@ -711,7 +708,7 @@ ev_pixbuf_cache_add_jobs_if_needed (EvPixbufCache *pixbuf_cache,
                                   EV_JOB_PRIORITY_URGENT);
        }
 
-       for (i = FIRST_VISABLE_PREV(pixbuf_cache); i < pixbuf_cache->preload_cache_size; i++) {
+       for (i = FIRST_VISIBLE_PREV(pixbuf_cache); i < pixbuf_cache->preload_cache_size; i++) {
                job_info = (pixbuf_cache->prev_job + i);
                page = pixbuf_cache->start_page - pixbuf_cache->preload_cache_size + i;
 
index ef96dce527ec0b6b1285c628657788d98fadf972..99dece092ffec12f8ecdabf2b65d1bd74c0499bc 100644 (file)
@@ -4902,9 +4902,11 @@ static void
 launch_external_uri (EvWindow *window, EvLinkAction *action)
 {
        const gchar *uri = ev_link_action_get_uri (action);
-       GAppLaunchContext *context = NULL;
        GError *error = NULL;
        gboolean ret;
+#if GTK_CHECK_VERSION (2, 14, 0)
+       GAppLaunchContext *context = NULL;
+#endif
 
 #if GTK_CHECK_VERSION (2, 14, 0)
        context = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ());