Added the Compute dialog box.
[pspp-builds.git] / src / ui / gui / glade-register.c
1 /*
2     PSPPIRE --- A Graphical User Interface for PSPP
3     Copyright (C) 2007  Free Software Foundation
4
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 2 of the License, or
8     (at your option) any later version.
9
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.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18     02110-1301, USA. */
19
20
21 #include <config.h>
22
23 #include <string.h>
24
25 #include <glade/glade-build.h>
26 #include "psppire-dialog.h"
27 #include "psppire-selector.h"
28 #include "psppire-keypad.h"
29 #include "psppire-hbuttonbox.h"
30 #include "psppire-vbuttonbox.h"
31
32 GLADE_MODULE_CHECK_INIT
33
34 /* Glade registration functions for PSPPIRE custom widgets */
35
36 static GtkWidget *
37 dialog_find_internal_child (GladeXML *xml,
38                             GtkWidget *parent,
39                             const gchar *childname)
40 {
41   if (!strcmp(childname, "hbox"))
42     return PSPPIRE_DIALOG (parent)->box;
43
44   return NULL;
45 }
46
47 void
48 glade_module_register_widgets (void)
49 {
50   glade_register_widget (PSPPIRE_DIALOG_TYPE, NULL,
51                          glade_standard_build_children,
52                          dialog_find_internal_child);
53
54
55   glade_register_widget (PSPPIRE_VBUTTON_BOX_TYPE, NULL,
56                          glade_standard_build_children,
57                          NULL);
58
59   glade_register_widget (PSPPIRE_HBUTTON_BOX_TYPE, NULL,
60                          glade_standard_build_children,
61                          NULL);
62
63   glade_register_widget (PSPPIRE_SELECTOR_TYPE, NULL,
64                          glade_standard_build_children,
65                          NULL);
66
67   glade_register_widget (PSPPIRE_KEYPAD_TYPE, NULL,
68                          glade_standard_build_children,
69                          NULL);
70
71 }
72
73
74