output: Make GUI output window scrollable.
authorBen Pfaff <blp@gnu.org>
Sun, 21 Jun 2009 03:29:08 +0000 (20:29 -0700)
committerBen Pfaff <blp@gnu.org>
Sun, 21 Jun 2009 03:29:08 +0000 (20:29 -0700)
src/ui/gui/psppire-output-window.c
src/ui/gui/psppire-output-window.h

index 510d1c9e0c7e51836a1d9d06cf202699a18ce362..ea713c4fa98b4115e7c677ead276170b3e73248e 100644 (file)
@@ -178,7 +178,12 @@ psppire_output_submit (struct outp_driver *this, struct som_entity *entity)
       driver->class->close_driver (driver);
       outp_free_driver (driver);
 
+      if (tw / 1024 > the_output_viewer->max_width)
+        the_output_viewer->max_width = tw / 1024;
       the_output_viewer->y += th / 1024;
+
+      gtk_layout_set_size (the_output_viewer->output,
+                           the_output_viewer->max_width, the_output_viewer->y);
     }
 
   gtk_window_set_urgency_hint (GTK_WINDOW (the_output_viewer), TRUE);
index 7b62be2069ada9147065c49ce8832ae70a9c4b09..5cb2528e08a6d9defbe8bcb2a6a435c17542129d 100644 (file)
@@ -52,6 +52,7 @@ struct _PsppireOutputWindow
 
   /* <private> */
   GtkLayout *output;
+  int max_width;
   int y;
 };