X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkdialog.c;h=b88ca5f5ba5d637f51e1ade6beafebf6d0a07540;hb=56bcb1933f6de613e5d8689e23420d47b65425c3;hp=17f9fcc09f7c4ef281ed99bedad9dc2a05450666;hpb=4765f37484b28b99b18b8e7c96bc71754cfe9ebd;p=~andy%2Fgtk diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 17f9fcc09..b88ca5f5b 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -12,9 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ /* @@ -31,15 +29,17 @@ #include "gtkbutton.h" #include "gtkdialog.h" -#include "gtkhbbox.h" +#include "gtkbbox.h" #include "gtklabel.h" #include "gtkmarshalers.h" -#include "gtkvbox.h" +#include "gtkbox.h" +#include "gtkboxprivate.h" #include "gtkmain.h" #include "gtkintl.h" #include "gtkbindings.h" #include "gtkprivate.h" #include "gtkbuildable.h" +#include "gtksettings.h" /** * SECTION:gtkdialog @@ -241,6 +241,8 @@ gtk_dialog_class_init (GtkDialogClass *class) widget_class->map = gtk_dialog_map; widget_class->style_updated = gtk_dialog_style_updated; + gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_DIALOG); + class->close = gtk_dialog_close; g_type_class_add_private (gobject_class, sizeof (GtkDialogPrivate)); @@ -349,6 +351,7 @@ update_spacings (GtkDialog *dialog) "action-area-border", &action_area_border, NULL); + gtk_container_set_border_width (GTK_CONTAINER (priv->vbox), content_area_border); if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox))) @@ -397,6 +400,8 @@ gtk_dialog_init (GtkDialog *dialog) gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT); + + update_spacings (dialog); } static GtkBuildableIface *parent_buildable_iface; @@ -602,7 +607,7 @@ gtk_dialog_new_empty (const gchar *title, * @parent: (allow-none): Transient parent of the dialog, or %NULL * @flags: from #GtkDialogFlags * @first_button_text: (allow-none): stock ID or text to go in first button, or %NULL - * @Varargs: response ID for first button, then additional buttons, ending with %NULL + * @...: response ID for first button, then additional buttons, ending with %NULL * * Creates a new #GtkDialog with title @title (or %NULL for the default * title; see gtk_window_set_title()) and transient parent @parent (or @@ -636,7 +641,7 @@ gtk_dialog_new_empty (const gchar *title, * ]| * * Return value: a new #GtkDialog - **/ + */ GtkWidget* gtk_dialog_new_with_buttons (const gchar *title, GtkWindow *parent, @@ -823,13 +828,13 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog, * gtk_dialog_add_buttons: * @dialog: a #GtkDialog * @first_button_text: button text or stock ID - * @Varargs: response ID for first button, then more text-response_id pairs + * @...: response ID for first button, then more text-response_id pairs * * Adds more buttons, same as calling gtk_dialog_add_button() * repeatedly. The variable argument list should be %NULL-terminated * as with gtk_dialog_new_with_buttons(). Each button must have both * text and response ID. - **/ + */ void gtk_dialog_add_buttons (GtkDialog *dialog, const gchar *first_button_text, @@ -1101,9 +1106,9 @@ gtk_dialog_run (GtkDialog *dialog) ri.loop = g_main_loop_new (NULL, FALSE); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); g_main_loop_run (ri.loop); - GDK_THREADS_ENTER (); + gdk_threads_enter (); g_main_loop_unref (ri.loop); @@ -1260,7 +1265,7 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog, * gtk_dialog_set_alternative_button_order: * @dialog: a #GtkDialog * @first_response_id: a response id used by one @dialog's buttons - * @Varargs: a list of more response ids of @dialog's buttons, terminated by -1 + * @...: a list of more response ids of @dialog's buttons, terminated by -1 * * Sets an alternative button order. If the * #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,