1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2016 John Darrington
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include "psppire-var-sheet-header.h"
25 #define _(msgid) gettext (msgid)
26 #define N_(msgid) msgid
31 static guint signals [n_SIGNALS];
34 gni (GListModel *list)
40 git (GListModel *list)
42 return GTK_TYPE_BUTTON;
47 gi (GListModel *list, guint position)
49 GtkWidget *button = gtk_button_new ();
70 text = N_("Value Labels");
73 text = N_("Missing Values");
92 gtk_button_set_label (GTK_BUTTON (button), gettext (text));
99 psppire_init_iface (GListModelInterface *iface)
101 iface->get_n_items = gni;
102 iface->get_item = gi;
103 iface->get_item_type = git;
107 G_DEFINE_TYPE_WITH_CODE (PsppireVarSheetHeader, psppire_var_sheet_header,
109 G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, psppire_init_iface));
112 psppire_var_sheet_header_init (PsppireVarSheetHeader *d)
119 psppire_var_sheet_header_class_init (PsppireVarSheetHeaderClass *dc)
121 GObjectClass *object_class = G_OBJECT_CLASS (dc);
123 /* This signal is never emitted. It is just to satisfy the interface. */
125 g_signal_new ("changed",
126 G_TYPE_FROM_CLASS (object_class),
130 g_cclosure_marshal_VOID__VOID,