From: Ben Pfaff Date: Sat, 16 Dec 2006 22:13:12 +0000 (+0000) Subject: Don't assume that ALIGN_* and GTK_JUSTIFY_* values coincide. X-Git-Tag: v0.6.0~632 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e66ec694c4237bbc9e77bb3822a333377318ef94;p=pspp-builds.git Don't assume that ALIGN_* and GTK_JUSTIFY_* values coincide. --- diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index c20e3be2..daa4de7d 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,8 @@ +Sat Dec 16 14:13:07 2006 Ben Pfaff + + * psppire-data-store.c (geometry_get_justification): Don't assume + that ALIGN_* and GTK_JUSTIFY_* values coincide. + Sat Dec 16 14:10:43 2006 Ben Pfaff * psppire-var-store.c (text_for_column): Adjust to account for new diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 840c4c83..c761c237 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -715,9 +715,9 @@ geometry_get_justification(const GSheetColumn *geom, gint unit) pv = psppire_dict_get_variable(ds->dict, unit); - /* Kludge: Happily GtkJustification is defined similarly - to enum alignment from pspp/variable.h */ - return var_get_alignment(pv); + return (var_get_alignment (pv) == ALIGN_LEFT ? GTK_JUSTIFY_LEFT + : var_get_alignment (pv) == ALIGN_RIGHT ? GTK_JUSTIFY_RIGHT + : GTK_JUSTIFY_CENTER); }