#include <gtk/gtk.h>
#include <gtk/gtksignal.h>
+#include <gtk/gtkbuildable.h>
#include "psppire-dialog.h"
#include "psppire-buttonbox.h"
#include "psppire-selector.h"
+#include <string.h>
static void psppire_dialog_class_init (PsppireDialogClass *);
static void psppire_dialog_init (PsppireDialog *);
static guint signals [n_SIGNALS];
+static void psppire_dialog_buildable_init (GtkBuildableIface *iface);
+
+
GType
psppire_dialog_get_type (void)
{
(GInstanceInitFunc) psppire_dialog_init,
};
+ static const GInterfaceInfo buildable_info =
+ {
+ (GInterfaceInitFunc) psppire_dialog_buildable_init,
+ NULL,
+ NULL
+ };
+
dialog_type = g_type_register_static (GTK_TYPE_WINDOW,
"PsppireDialog", &dialog_info, 0);
+
+ g_type_add_interface_static (dialog_type,
+ GTK_TYPE_BUILDABLE,
+ &buildable_info);
+
}
return dialog_type;
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
+ g_object_set (dialog, "icon-name", "psppicon", NULL);
+
gtk_widget_show_all (dialog->box);
}
{
PsppireDialog *dialog ;
- dialog = g_object_new (psppire_dialog_get_type (), NULL);
+ dialog = g_object_new (psppire_dialog_get_type (),
+ NULL);
return GTK_WIDGET (dialog) ;
}
g_main_loop_run (dialog->loop);
+ g_main_loop_unref (dialog->loop);
+
return dialog->response;
}
}
+
+
+
+static GObject *
+get_internal_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname)
+{
+ PsppireDialog *dialog = PSPPIRE_DIALOG (buildable);
+
+ if ( 0 == strcmp (childname, "hbox"))
+ return G_OBJECT (dialog->box);
+
+ return NULL;
+}
+
+
+
+static void
+psppire_dialog_buildable_init (GtkBuildableIface *iface)
+{
+ iface->get_internal_child = get_internal_child;
+}