pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Re: [0.109] Pan aborts when enlarging jpegs in body pane


From: Shining Chaos
Subject: Re: [Pan-users] Re: [0.109] Pan aborts when enlarging jpegs in body pane
Date: Mon, 21 Aug 2006 13:59:34 -0500

On 8/20/06, jef_e <address@hidden> wrote:
One other note -- this is definitely something introduced in .109. I
reverted back to .108 with a clean .pan2 directory and things behave
normally. HTH.

jef

Actually I've been getting this since .108 myself, but I've been able
to suppress the crashes by wrapping the assert in an if-clause
depending on the return value of the previous line:

--- pan-0.109/pan/gui/body-pane.cc      2006-08-17 15:17:18.000000000 -0500
+++ pan-0.109a/pan/gui/body-pane.cc     2006-08-18 21:47:52.000000000 -0500
@@ -365,14 +365,16 @@
        get_iter_from_event_coords (w, (int)event->x, (int)event->y, &iter);
        if (gtk_text_iter_has_tag (&iter, pix_tag))
        {
-          gtk_text_iter_backward_to_tag_toggle (&iter, pix_tag);
-          g_assert (gtk_text_iter_begins_tag (&iter, pix_tag));
+          if (gtk_text_iter_backward_to_tag_toggle (&iter, pix_tag))
+          {
+         g_assert (gtk_text_iter_begins_tag (&iter, pix_tag));
          const int offset (gtk_text_iter_get_offset (&iter));
          GtkTextBuffer * buf (gtk_text_view_get_buffer (GTK_TEXT_VIEW(w)));
          const bool fullsize (toggle_fullsize_flag (buf));
          resize_picture_at_iter (buf, &iter, fullsize,
&w->allocation, pix_tag
);
          gtk_text_iter_set_offset (&iter, offset);
          set_cursor_from_iter (event->window, w, &iter);
+         }
        }
      }
    }


I'm not sure if I'm breaking anything because of this, but since
gtk_text_iter_backward_to_tag_toggle returns FALSE if it can't find a
tag, the assert would seem to fail, and that's what seems to be
happening.

I may be completely off base, but the change above did remove the
crashes for me, and that's all I need :)

Stephen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]