X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-var-sheet-header.c;h=01743a12673249d07a98e7b85a7949327fc5f5dc;hb=0f447caa885d8f0fd8c30d4440556d9b6abb99ea;hp=cd2121fd8b20aa93f1d793d74c649a32a4e8f943;hpb=55c55aa33d0f90d1b3b58f8b33b3fc54062c553e;p=pspp diff --git a/src/ui/gui/psppire-var-sheet-header.c b/src/ui/gui/psppire-var-sheet-header.c index cd2121fd8b..01743a1267 100644 --- a/src/ui/gui/psppire-var-sheet-header.c +++ b/src/ui/gui/psppire-var-sheet-header.c @@ -1,5 +1,4 @@ -/* - A candidate replacement for Pspp's sheet +/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2016 John Darrington This program is free software: you can redistribute it and/or modify @@ -21,8 +20,10 @@ #include "psppire-var-sheet-header.h" -#include "efficient-sheet/jmd-axis-model.h" -#include "efficient-sheet/jmd-datum.h" +#include + +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid enum {CHANGED, n_SIGNALS}; @@ -38,56 +39,59 @@ gni (GListModel *list) static GType git (GListModel *list) { - return JMD_TYPE_DATUM; + return GTK_TYPE_BUTTON; } + static gpointer gi (GListModel *list, guint position) { - JmdDatum *gd = JMD_DATUM (g_object_new (JMD_TYPE_DATUM, NULL)); + GtkWidget *button = gtk_button_new (); + gchar *text = NULL; switch (position) { case 0: - gd->text = g_strdup ("Name"); + text = N_("Name"); break; case 1: - gd->text = g_strdup ("Type"); + text = N_("Type"); break; case 2: - gd->text = g_strdup ("Width"); + text = N_("Width"); break; case 3: - gd->text = g_strdup ("Decimal"); + text = N_("Decimal"); break; case 4: - gd->text = g_strdup ("Label"); + text = N_("Label"); break; case 5: - gd->text = g_strdup ("Value Labels"); + text = N_("Value Labels"); break; case 6: - gd->text = g_strdup ("Missing Values"); + text = N_("Missing Values"); break; case 7: - gd->text = g_strdup ("Columns"); + text = N_("Columns"); break; case 8: - gd->text = g_strdup ("Align"); + text = N_("Align"); break; case 9: - gd->text = g_strdup ("Measure"); + text = N_("Measure"); break; case 10: - gd->text = g_strdup ("Role"); + text = N_("Role"); break; default: - // g_assert_not_reached (); - g_print ("Bug: Request for item %d\n", position); break; } - return gd; + if (text) + gtk_button_set_label (GTK_BUTTON (button), gettext (text)); + + return button; }