* 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 <http://www.gnu.org/licenses/>.
*/
/*
#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
* be packed. The bottom area is known as the
* <structfield>action_area</structfield>. This is generally used for
* packing buttons into the dialog which may perform functions such as
- * cancel, ok, or apply. The two areas are separated by a #GtkHSeparator.
+ * cancel, ok, or apply.
*
* #GtkDialog boxes are created with a call to gtk_dialog_new() or
* gtk_dialog_new_with_buttons(). gtk_dialog_new_with_buttons() is
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));
"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)))
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;
* @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
* ]|
*
* Return value: a new #GtkDialog
- **/
+ */
GtkWidget*
gtk_dialog_new_with_buttons (const gchar *title,
GtkWindow *parent,
* 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,
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);
* 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,