From 09958cbfa4c56ab8b3d7d2685d22fd55a1a4a30d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 3 Sep 2013 21:52:19 -0700 Subject: [PATCH] psppire-var-sheet: Generalize get_var_align_stock_id(). This change allows finding a stock-id speculatively, without having a variable on hand. --- src/ui/gui/psppire-var-sheet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index 837d112580..b52d420262 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -310,9 +310,9 @@ render_popup_cell (PsppSheetViewColumn *tree_column, } const char * -get_var_align_stock_id (const struct variable *var) +get_var_align_stock_id (enum alignment alignment) { - switch (var_get_alignment (var)) + switch (alignment) { case ALIGN_LEFT: return GTK_STOCK_JUSTIFY_LEFT; @@ -454,7 +454,8 @@ render_var_cell (PsppSheetViewColumn *tree_column, "editable", TRUE, NULL); else - g_object_set (cell, "stock-id", get_var_align_stock_id (var), NULL); + g_object_set (cell, "stock-id", + get_var_align_stock_id (var_get_alignment (var)), NULL); break; case VS_MEASURE: -- 2.30.2