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