4 #include "psppire-dialog.h"
10 glade_psppire_dialog_post_create (GladeWidgetAdaptor *adaptor,
12 GladeCreateReason reason)
16 GladeWidget *box_widget;
18 PsppireDialog *dialog = PSPPIRE_DIALOG (object);
20 g_return_if_fail (PSPPIRE_IS_DIALOG (dialog));
22 widget = glade_widget_get_from_gobject (GTK_WIDGET (dialog));
27 if (reason == GLADE_CREATE_USER)
29 /* HIG complient border-width defaults on dialogs */
30 glade_widget_property_set (widget, "border-width", 5);
33 box_widget = glade_widget_adaptor_create_internal
34 (widget, G_OBJECT(dialog->box),
35 "hbox", "dialog", FALSE, reason);
37 /* These properties are controlled by the GtkDialog style properties:
38 * "content-area-border", "button-spacing" and "action-area-border",
39 * so we must disable their use.
41 glade_widget_remove_property (box_widget, "border-width");
43 /* Only set these on the original create. */
44 if (reason == GLADE_CREATE_USER)
47 /* HIG complient spacing defaults on dialogs */
48 glade_widget_property_set (box_widget, "spacing", 2);
50 glade_widget_property_set (box_widget, "size", 2);
55 /* set a reasonable default size for a dialog */
56 gtk_window_set_default_size (GTK_WINDOW (dialog), 320, 260);
62 glade_psppire_dialog_get_internal_child (GladeWidgetAdaptor *adaptor,
63 PsppireDialog *dialog,
67 g_print ("%s\n", __FUNCTION__);
70 g_assert (0 == strcmp (name, "hbox"));
78 glade_psppire_dialog_set_property (GladeWidgetAdaptor *adaptor,
84 g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object,
85 G_OBJECT_TYPE_NAME( object ),
89 GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object,
96 glade_psppire_dialog_get_children (GladeWidgetAdaptor *adaptor,
97 PsppireDialog *dialog)
101 g_return_val_if_fail (PSPPIRE_IS_DIALOG (dialog), NULL);
103 list = glade_util_container_get_all_children (GTK_CONTAINER (dialog));