4 #include "psppire-dialog.h"
7 #include <gladeui/glade.h>
11 glade_psppire_dialog_post_create (GladeWidgetAdaptor *adaptor,
13 GladeCreateReason reason)
17 GladeWidget *box_widget;
19 PsppireDialog *dialog = PSPPIRE_DIALOG (object);
21 g_return_if_fail (PSPPIRE_IS_DIALOG (dialog));
23 widget = glade_widget_get_from_gobject (GTK_WIDGET (dialog));
28 if (reason == GLADE_CREATE_USER)
30 /* HIG compliant border-width defaults on dialogs */
31 glade_widget_property_set (widget, "border-width", 5);
34 box_widget = glade_widget_adaptor_create_internal
35 (widget, G_OBJECT(dialog->box),
36 "hbox", "dialog", FALSE, reason);
38 /* These properties are controlled by the GtkDialog style properties:
39 * "content-area-border", "button-spacing" and "action-area-border",
40 * so we must disable their use.
42 glade_widget_remove_property (box_widget, "border-width");
44 /* Only set these on the original create. */
45 if (reason == GLADE_CREATE_USER)
48 /* HIG compliant spacing defaults on dialogs */
49 glade_widget_property_set (box_widget, "spacing", 2);
51 glade_widget_property_set (box_widget, "size", 2);
58 glade_psppire_dialog_get_internal_child (GladeWidgetAdaptor *adaptor,
59 PsppireDialog *dialog,
63 g_print ("%s\n", __FUNCTION__);
66 g_assert (0 == strcmp (name, "hbox"));
74 glade_psppire_dialog_set_property (GladeWidgetAdaptor *adaptor,
80 g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object,
81 G_OBJECT_TYPE_NAME( object ),
85 assert ( GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property );
87 GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object,
94 glade_psppire_dialog_get_children (GladeWidgetAdaptor *adaptor,
95 PsppireDialog *dialog)
99 g_return_val_if_fail (PSPPIRE_IS_DIALOG (dialog), NULL);
101 list = glade_util_container_get_all_children (GTK_CONTAINER (dialog));