272f7dbecc0a832bac5bfe3a1184fc96295fb7ce
[pspp-builds.git] / glade / var-view.c
1 #include <config.h>
2
3 #include <glib.h>
4 #include <gtk/gtk.h>
5 #include "psppire-var-view.h"
6
7 #include <gladeui/glade.h>
8
9
10
11
12 void
13 glade_psppire_var_view_post_create (GladeWidgetAdaptor *adaptor,
14                                     GObject            *object,
15                                     GladeCreateReason   reason)
16 {
17   GladeWidget *widget ;
18
19   PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object);
20
21   g_return_if_fail (PSPPIRE_IS_VAR_VIEW (var_view));
22
23   widget = glade_widget_get_from_gobject (GTK_WIDGET (var_view));
24   if (!widget)
25     return;
26
27   if (reason == GLADE_CREATE_USER)
28     {
29       /* HIG complient border-width defaults on var_views */
30       glade_widget_property_set (widget, "border-width", 5);
31     }
32 }
33
34
35 GtkWidget *
36 glade_psppire_var_view_get_internal_child (GladeWidgetAdaptor  *adaptor,
37                                          PsppireVarView       *var_view,
38                                          const gchar         *name)
39 {
40 #if DEBUGGING
41   g_print ("%s\n", __FUNCTION__);
42 #endif
43   return GTK_WIDGET (var_view);
44 }
45
46
47
48 void
49 glade_psppire_var_view_set_property (GladeWidgetAdaptor *adaptor,
50                                      GObject            *object,
51                                      const gchar        *id,
52                                      const GValue       *value)
53 {
54 #if DEBUGGING
55   g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object,
56            G_OBJECT_TYPE_NAME( object ),
57            id);
58 #endif
59
60   GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object,
61                                                  id, value);
62 }
63
64
65 GList *
66 glade_psppire_var_view_get_children (GladeWidgetAdaptor  *adaptor,
67                                      PsppireVarView  *dv)
68 {
69   GList *list = NULL;
70
71   g_return_val_if_fail (PSPPIRE_IS_VAR_VIEW (dv), NULL);
72
73   list = glade_util_container_get_all_children (GTK_CONTAINER (dv));
74
75   return list;
76 }