X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire-data-store.c;h=7dca919c019ed11610943029231eedb13c8323cd;hb=0e9db36b34555b194714aa3f2af19e51907e8426;hp=5bdb8020849498134a58a4400a08184f5a3e4aae;hpb=8fa97cbb0299bddaa217bb23dcbac3e6f2503cd1;p=pspp diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 5bdb802084..7dca919c01 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -747,6 +747,27 @@ geometry_get_column_button_label (const GSheetColumn *geom, gint unit) } +static gchar * +geometry_get_column_subtitle (const GSheetColumn *geom, gint unit) +{ + gchar *text; + const struct variable *v ; + PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom); + + if ( unit >= psppire_dict_get_var_cnt (ds->dict) ) + return NULL; + + v = psppire_dict_get_variable (ds->dict, unit); + + if ( ! var_has_label (v)) + return NULL; + + text = pspp_locale_to_utf8 (var_get_label (v), -1, 0); + + return text; +} + + static gboolean geometry_get_sensitivity (const GSheetColumn *geom, gint unit) { @@ -766,6 +787,7 @@ psppire_data_store_sheet_column_init (GSheetColumnIface *iface) iface->get_sensitivity = geometry_get_sensitivity; iface->get_justification = geometry_get_justification; iface->get_button_label = geometry_get_column_button_label; + iface->get_subtitle = geometry_get_column_subtitle; }