2 A candidate replacement for Pspp's sheet
3 Copyright (C) 2016 John Darrington
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "psppire-var-sheet-header.h"
26 #define _(msgid) gettext (msgid)
27 #define N_(msgid) msgid
32 static guint signals [n_SIGNALS];
35 gni (GListModel *list)
41 git (GListModel *list)
43 return GTK_TYPE_BUTTON;
48 gi (GListModel *list, guint position)
50 GtkWidget *button = gtk_button_new ();
71 text = N_("Value Labels");
74 text = N_("Missing Values");
93 gtk_button_set_label (GTK_BUTTON (button), gettext (text));
100 psppire_init_iface (GListModelInterface *iface)
102 iface->get_n_items = gni;
103 iface->get_item = gi;
104 iface->get_item_type = git;
108 G_DEFINE_TYPE_WITH_CODE (PsppireVarSheetHeader, psppire_var_sheet_header,
110 G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, psppire_init_iface));
113 psppire_var_sheet_header_init (PsppireVarSheetHeader *d)
120 psppire_var_sheet_header_class_init (PsppireVarSheetHeaderClass *dc)
122 GObjectClass *object_class = G_OBJECT_CLASS (dc);
124 /* This signal is never emitted. It is just to satisfy the interface. */
126 g_signal_new ("changed",
127 G_TYPE_FROM_CLASS (object_class),
131 g_cclosure_marshal_VOID__VOID,