From: Ben Pfaff <blp@cs.stanford.edu>
Date: Mon, 12 Aug 2013 04:56:52 +0000 (-0700)
Subject: psppire-var-sheet: Hard-code size of pixbuf cells.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a8bdf66c95cbe4fa4ba52aac432ae32aafec80d;p=pspp

psppire-var-sheet: Hard-code size of pixbuf cells.

Otherwise the icons disappear if the sheet is initially empty, because
there's no icon for an empty row and thus nothing to make the pixbuf cells
nonzero size.

Reported by Bastian Diaz.
---

diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c
index e82c5200b6..3a2d232002 100644
--- a/src/ui/gui/psppire-var-sheet.c
+++ b/src/ui/gui/psppire-var-sheet.c
@@ -1259,6 +1259,7 @@ psppire_var_sheet_init (PsppireVarSheet *obj)
                        alignment_to_string (ALIGN_RIGHT), ALIGN_RIGHT,
                        NULL);
   cell = gtk_cell_renderer_pixbuf_new ();
+  g_object_set (cell, "width", 16, "height", 16, NULL);
   pspp_sheet_view_column_pack_end (column, cell, FALSE);
   pspp_sheet_view_column_set_cell_data_func (
     column, cell, render_var_cell, obj, NULL);
@@ -1270,6 +1271,7 @@ psppire_var_sheet_init (PsppireVarSheet *obj)
                         measure_to_string (MEASURE_SCALE), MEASURE_SCALE,
                         NULL);
   cell = gtk_cell_renderer_pixbuf_new ();
+  g_object_set (cell, "width", 16, "height", 16, NULL);
   pspp_sheet_view_column_pack_end (column, cell, FALSE);
   pspp_sheet_view_column_set_cell_data_func (
     column, cell, render_var_cell, obj, NULL);