tests: Convert do-repeat.sh test to use Autotest.
[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 /* Dummy function to keep the linker happy.
11    Glade never actually needs to use this return value.
12  */
13 GType
14 psppire_var_ptr_get_type (void)
15 {
16   return 0;
17 }
18
19 void
20 glade_psppire_var_view_post_create (GladeWidgetAdaptor *adaptor,
21                                     GObject            *object,
22                                     GladeCreateReason   reason)
23 {
24   GladeWidget *widget ;
25
26   PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object);
27
28   g_return_if_fail (PSPPIRE_IS_VAR_VIEW (var_view));
29
30   widget = glade_widget_get_from_gobject (GTK_WIDGET (var_view));
31   if (!widget)
32     return;
33
34   if (reason == GLADE_CREATE_USER)
35     {
36       /* HIG complient border-width defaults on var_views */
37       glade_widget_property_set (widget, "border-width", 5);
38     }
39 }
40
41
42 GtkWidget *
43 glade_psppire_var_view_get_internal_child (GladeWidgetAdaptor  *adaptor,
44                                          PsppireVarView       *var_view,
45                                          const gchar         *name)
46 {
47 #if DEBUGGING
48   g_print ("%s\n", __FUNCTION__);
49 #endif
50   return GTK_WIDGET (var_view);
51 }
52
53
54
55 void
56 glade_psppire_var_view_set_property (GladeWidgetAdaptor *adaptor,
57                                      GObject            *object,
58                                      const gchar        *id,
59                                      const GValue       *value)
60 {
61 #if DEBUGGING
62   g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object,
63            G_OBJECT_TYPE_NAME( object ),
64            id);
65 #endif
66
67   GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object,
68                                                  id, value);
69 }
70
71
72 GList *
73 glade_psppire_var_view_get_children (GladeWidgetAdaptor  *adaptor,
74                                      PsppireVarView  *dv)
75 {
76   GList *list = NULL;
77
78   g_return_val_if_fail (PSPPIRE_IS_VAR_VIEW (dv), NULL);
79
80   list = glade_util_container_get_all_children (GTK_CONTAINER (dv));
81
82   return list;
83 }