eb43ce438e27706dd4c19893b767aca68cfe4c61
[pspp-builds.git] / src / ui / gui / glade-register.c
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2007  Free Software Foundation
3
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.
8
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.
13
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/>. */
16
17
18 #include <config.h>
19
20 #include <string.h>
21
22 #include <glade/glade-build.h>
23 #include "psppire-dialog.h"
24 #include "psppire-selector.h"
25 #include "psppire-keypad.h"
26 #include "psppire-hbuttonbox.h"
27 #include "psppire-vbuttonbox.h"
28
29 GLADE_MODULE_CHECK_INIT
30
31 /* Glade registration functions for PSPPIRE custom widgets */
32
33 static GtkWidget *
34 dialog_find_internal_child (GladeXML *xml,
35                             GtkWidget *parent,
36                             const gchar *childname)
37 {
38   if (!strcmp(childname, "hbox"))
39     return PSPPIRE_DIALOG (parent)->box;
40
41   return NULL;
42 }
43
44 void
45 glade_module_register_widgets (void)
46 {
47   glade_register_widget (PSPPIRE_DIALOG_TYPE, NULL,
48                          glade_standard_build_children,
49                          dialog_find_internal_child);
50
51
52   glade_register_widget (PSPPIRE_VBUTTON_BOX_TYPE, NULL,
53                          glade_standard_build_children,
54                          NULL);
55
56   glade_register_widget (PSPPIRE_HBUTTON_BOX_TYPE, NULL,
57                          glade_standard_build_children,
58                          NULL);
59
60   glade_register_widget (PSPPIRE_SELECTOR_TYPE, NULL,
61                          glade_standard_build_children,
62                          NULL);
63
64   glade_register_widget (PSPPIRE_KEYPAD_TYPE, NULL,
65                          glade_standard_build_children,
66                          NULL);
67
68 }
69
70
71