5 #include "psppire-dialog.h"
8 #include <gladeui/glade.h>
12 glade_psppire_dialog_post_create (GladeWidgetAdaptor
*adaptor
,
14 GladeCreateReason reason
)
18 GladeWidget
*box_widget
;
20 PsppireDialog
*dialog
= PSPPIRE_DIALOG (object
);
22 g_return_if_fail (PSPPIRE_IS_DIALOG (dialog
));
24 widget
= glade_widget_get_from_gobject (GTK_WIDGET (dialog
));
29 if (reason
== GLADE_CREATE_USER
)
31 /* HIG compliant border-width defaults on dialogs */
32 glade_widget_property_set (widget
, "border-width", 5);
35 box_widget
= glade_widget_adaptor_create_internal
36 (widget
, G_OBJECT(dialog
->box
),
37 "hbox", "dialog", FALSE
, reason
);
39 /* These properties are controlled by the GtkDialog style properties:
40 * "content-area-border", "button-spacing" and "action-area-border",
41 * so we must disable their use.
43 glade_widget_remove_property (box_widget
, "border-width");
45 /* Only set these on the original create. */
46 if (reason
== GLADE_CREATE_USER
)
49 /* HIG compliant spacing defaults on dialogs */
50 glade_widget_property_set (box_widget
, "spacing", 2);
52 glade_widget_property_set (box_widget
, "size", 2);
59 glade_psppire_dialog_get_internal_child (GladeWidgetAdaptor
*adaptor
,
60 PsppireDialog
*dialog
,
64 g_print ("%s\n", __FUNCTION__
);
67 g_assert (0 == strcmp (name
, "hbox"));
75 glade_psppire_dialog_set_property (GladeWidgetAdaptor
*adaptor
,
81 g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__
, object
,
82 G_OBJECT_TYPE_NAME( object
),
86 assert ( GWA_GET_CLASS (GTK_TYPE_WINDOW
)->set_property
);
88 GWA_GET_CLASS (GTK_TYPE_WINDOW
)->set_property (adaptor
, object
,
95 glade_psppire_dialog_get_children (GladeWidgetAdaptor
*adaptor
,
96 PsppireDialog
*dialog
)
100 g_return_val_if_fail (PSPPIRE_IS_DIALOG (dialog
), NULL
);
102 list
= glade_util_container_get_all_children (GTK_CONTAINER (dialog
));