+ g_signal_new ("response",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GtkDialogClass, response),
+ NULL, NULL,
+ _gtk_marshal_NONE__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ dialog_signals[CLOSE] =
+ g_signal_new ("close",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (GtkDialogClass, close),
+ NULL, NULL,
+ _gtk_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("content_area_border",
+ _("Content area border"),
+ _("Width of border around the main dialog area"),
+ 0,
+ G_MAXINT,
+ 2,
+ G_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("button_spacing",
+ _("Button spacing"),
+ _("Spacing between buttons"),
+ 0,
+ G_MAXINT,
+ 10,
+ G_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("action_area_border",
+ _("Action area border"),
+ _("Width of border around the button area at the bottom of the dialog"),
+ 0,
+ G_MAXINT,
+ 5,
+ G_PARAM_READABLE));
+
+ binding_set = gtk_binding_set_by_class (class);
+
+ gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
+ "close", 0);
+}
+
+static void
+update_spacings (GtkDialog *dialog)
+{
+ GtkWidget *widget;
+ gint content_area_border;
+ gint button_spacing;
+ gint action_area_border;
+
+ widget = GTK_WIDGET (dialog);
+
+ gtk_widget_style_get (widget,
+ "content_area_border",
+ &content_area_border,
+ "button_spacing",
+ &button_spacing,
+ "action_area_border",
+ &action_area_border,
+ NULL);
+
+ gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox),
+ content_area_border);
+ gtk_box_set_spacing (GTK_BOX (dialog->action_area),
+ button_spacing);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area),
+ action_area_border);