[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with
From: |
Ben Pfaff |
Subject: |
Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments) |
Date: |
Thu, 3 Oct 2013 23:25:46 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Oct 03, 2013 at 11:19:35PM -0700, Ben Pfaff wrote:
> On Thu, Oct 03, 2013 at 10:27:13PM -0700, Basti?n D?az wrote:
> > 1. Open an empty file or a file with some information (with the gui)
> > 2. Copy a long text (from a PDF file or from a web page)
> > 3. Paste the text into window "Data File Comments" in utilities menu
> > (Control + V or from the context menu)
> >
> > At that time, psppire closes.
>
> Thanks. I was testing with text that was only a little longer than 80
> characters. With a much longer line, like you provided, I also see the
> crash.
John, the following patch fixes the crash for me. The behavior still
looks otherwise OK to me, but presumably the deleted code was there for
a reason. Is this a correct patch?
Thanks,
Ben.
diff --git a/src/ui/gui/comments-dialog.c b/src/ui/gui/comments-dialog.c
index 1d31777..ba312ff 100644
--- a/src/ui/gui/comments-dialog.c
+++ b/src/ui/gui/comments-dialog.c
@@ -1,5 +1,5 @@
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2010, 2011, 2012 Free Software Foundation
+ Copyright (C) 2007, 2010, 2011, 2012, 2013 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -74,16 +74,10 @@ wrap_line (GtkTextBuffer *buffer,
if ( chars > DOC_LINE_LENGTH )
{
GtkTextIter line_fold = *iter;
- GtkTextIter cursor;
gtk_text_iter_set_line_offset (&line_fold, DOC_LINE_LENGTH);
gtk_text_buffer_insert (buffer, &line_fold, "\r\n", 2);
-
- cursor = line_fold;
- gtk_text_iter_forward_to_line_end (&cursor);
-
- gtk_text_buffer_place_cursor (buffer, &cursor);
}
}
- PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Bastián Díaz, 2013/10/03
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Ben Pfaff, 2013/10/04
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Bastián Díaz, 2013/10/04
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Bastián Díaz, 2013/10/04
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Ben Pfaff, 2013/10/04
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments),
Ben Pfaff <=
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), John Darrington, 2013/10/06
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Ben Pfaff, 2013/10/06
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), John Darrington, 2013/10/06
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Ben Pfaff, 2013/10/07
- Re: PSPP-BUG: [GUI] PSPPire closes unexpectedly when entering text with a length greater than 80 bytes (Utilities | Data File comments), Bastián Díaz, 2013/10/04