psppire-var-sheet: Hard-code size of pixbuf cells. 20130812030507/pspp 20130813030502/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 12 Aug 2013 04:56:52 +0000 (21:56 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 12 Aug 2013 04:56:52 +0000 (21:56 -0700)
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.

src/ui/gui/psppire-var-sheet.c

index e82c5200b6d0b7b3c5c916d76e4c654925a4c4a0..3a2d232002adb8d8a83e7aba6a24ee1233b78db2 100644 (file)
@@ -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);