[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/ui/gui ChangeLog output-viewer.c outpu...
From: |
John Darrington |
Subject: |
[Pspp-cvs] pspp/src/ui/gui ChangeLog output-viewer.c outpu... |
Date: |
Tue, 25 Sep 2007 23:59:40 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Changes by: John Darrington <jmd> 07/09/25 23:59:40
Modified files:
src/ui/gui : ChangeLog output-viewer.c output-viewer.h
psppire.c
Log message:
Fix GUI output viewer to use the "auto" feature of the driver width
and length. Closes patch #6210.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/ChangeLog?cvsroot=pspp&r1=1.90&r2=1.91
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/output-viewer.c?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/output-viewer.h?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire.c?cvsroot=pspp&r1=1.51&r2=1.52
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/ChangeLog,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- ChangeLog 25 Sep 2007 04:21:02 -0000 1.90
+++ ChangeLog 25 Sep 2007 23:59:40 -0000 1.91
@@ -1,3 +1,11 @@
+2007-09-26 John Darrington <address@hidden>
+
+ * output-viewer.c output-viewer.h psppire.c: (closes patch #6210)
+ Changed width and length parameters of output driver to
+ "auto". Changed default width and length to be something
+ acceptable to the ascii driver. (reload_viewer) Dynamically
+ allocate the line buffer so that it matches the width of the output.
+
2007-09-24 Ben Pfaff <address@hidden>
* message-dialog.c (popup_message): Refer to files that contain
Index: output-viewer.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/output-viewer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- output-viewer.c 25 Sep 2007 04:16:20 -0000 1.2
+++ output-viewer.c 25 Sep 2007 23:59:40 -0000 1.3
@@ -46,8 +46,8 @@
static struct output_viewer *the_output_viewer = NULL;
-int viewer_length = -1;
-int viewer_width = -1;
+int viewer_length = 16;
+int viewer_width = 59;
/* Callback for the "delete" action (clicking the x on the top right
hand corner of the window) */
@@ -196,7 +196,7 @@
reload_viewer (struct output_viewer *ov)
{
GtkTextIter end_iter;
- char line[OUTPUT_LINE_WIDTH];
+ static char *line = NULL;
GtkTextMark *mark ;
gboolean chars_inserted = FALSE;
@@ -211,12 +211,14 @@
}
}
+ line = xrealloc (line, sizeof (char) * (viewer_width + 1));
+
gtk_text_buffer_get_end_iter (ov->buffer, &end_iter);
mark = gtk_text_buffer_create_mark (ov->buffer, NULL, &end_iter, TRUE);
/* Read in the next lot of text */
- while (fgets (line, OUTPUT_LINE_WIDTH, ov->fp) != NULL)
+ while (fgets (line, viewer_width + 1, ov->fp) != NULL)
{
chars_inserted = TRUE;
gtk_text_buffer_insert (ov->buffer, &end_iter, line, -1);
Index: output-viewer.h
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/output-viewer.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- output-viewer.h 25 Sep 2007 04:16:20 -0000 1.2
+++ output-viewer.h 25 Sep 2007 23:59:40 -0000 1.3
@@ -35,10 +35,5 @@
#define OUTPUT_FILE_NAME "psppire.txt"
-/* Make sure these two agree !! */
-#define OUTPUT_LINE_WIDTH 80
-#define OUTPUT_LINE_WIDTH_str "80"
-
-
#endif
Index: psppire.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- psppire.c 25 Sep 2007 04:16:20 -0000 1.51
+++ psppire.c 25 Sep 2007 23:59:40 -0000 1.52
@@ -111,8 +111,8 @@
outp_configure_driver_line (
ss_cstr ("gui:ascii:screen:squeeze=on headers=off top-margin=0 "
- "bottom-margin=0 paginate=off length=50 "
- "width=" OUTPUT_LINE_WIDTH_str " emphasis=none "
+ "bottom-margin=0 paginate=off length=auto width=auto "
+ "emphasis=none "
"output-file=\"" OUTPUT_FILE_NAME "\" append=yes"));
unlink (OUTPUT_FILE_NAME);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src/ui/gui ChangeLog output-viewer.c outpu...,
John Darrington <=