* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <stdlib.h>
#include "gtkbindings.h"
#include "gtkprivate.h"
#include "gtkbuildable.h"
-#include "gtkalias.h"
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_DIALOG, GtkDialogPrivate))
-typedef struct {
+struct _GtkDialogPriv
+{
+ GtkWidget *vbox;
+ GtkWidget *action_area;
+
+ GtkWidget *separator;
+
guint ignore_separator : 1;
-} GtkDialogPrivate;
+};
typedef struct _ResponseData ResponseData;
gint response_id;
};
-static void gtk_dialog_add_buttons_valist (GtkDialog *dialog,
- const gchar *first_button_text,
- va_list args);
-
-static gint gtk_dialog_delete_event_handler (GtkWidget *widget,
- GdkEventAny *event,
- gpointer user_data);
-
-static void gtk_dialog_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gtk_dialog_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void gtk_dialog_style_set (GtkWidget *widget,
- GtkStyle *prev_style);
-static void gtk_dialog_map (GtkWidget *widget);
-
-static void gtk_dialog_close (GtkDialog *dialog);
-
-static void gtk_dialog_add (GtkContainer *container,
- GtkWidget *widget);
-static void gtk_dialog_remove (GtkContainer *container,
- GtkWidget *widget);
-
-static ResponseData* get_response_data (GtkWidget *widget,
- gboolean create);
-static void gtk_dialog_buildable_interface_init (GtkBuildableIface *iface);
-static GObject * gtk_dialog_buildable_get_internal_child (GtkBuildable *buildable,
- GtkBuilder *builder,
- const gchar *childname);
-static gboolean gtk_dialog_buildable_custom_tag_start (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- GMarkupParser *parser,
- gpointer *data);
-static void gtk_dialog_buildable_custom_finished (GtkBuildable *buildable,
- GtkBuilder *builder,
- GObject *child,
- const gchar *tagname,
- gpointer user_data);
+static void gtk_dialog_add_buttons_valist (GtkDialog *dialog,
+ const gchar *first_button_text,
+ va_list args);
+
+static gboolean gtk_dialog_delete_event_handler (GtkWidget *widget,
+ GdkEventAny *event,
+ gpointer user_data);
+
+static void gtk_dialog_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gtk_dialog_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void gtk_dialog_style_set (GtkWidget *widget,
+ GtkStyle *prev_style);
+static void gtk_dialog_map (GtkWidget *widget);
+
+static void gtk_dialog_close (GtkDialog *dialog);
+
+static ResponseData * get_response_data (GtkWidget *widget,
+ gboolean create);
+
+static void gtk_dialog_buildable_interface_init (GtkBuildableIface *iface);
+static GObject * gtk_dialog_buildable_get_internal_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname);
+static gboolean gtk_dialog_buildable_custom_tag_start (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ GMarkupParser *parser,
+ gpointer *data);
+static void gtk_dialog_buildable_custom_finished (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer user_data);
enum {
{
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
GtkBindingSet *binding_set;
gobject_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
- container_class = GTK_CONTAINER_CLASS (class);
gobject_class->set_property = gtk_dialog_set_property;
gobject_class->get_property = gtk_dialog_get_property;
-
- container_class->add = gtk_dialog_add;
- container_class->remove = gtk_dialog_remove;
widget_class->map = gtk_dialog_map;
widget_class->style_set = gtk_dialog_style_set;
class->close = gtk_dialog_close;
- g_type_class_add_private (gobject_class, sizeof (GtkDialogPrivate));
+ g_type_class_add_private (gobject_class, sizeof (GtkDialogPriv));
/**
* GtkDialog:has-separator:
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkDialogClass, response),
NULL, NULL,
- _gtk_marshal_NONE__INT,
+ _gtk_marshal_VOID__INT,
G_TYPE_NONE, 1,
G_TYPE_INT);
*
* The ::close signal is a
* <link linkend="keybinding-signals">keybinding signal</link>
- * which getrs emitted when the user uses a keybinding to close
+ * which gets emitted when the user uses a keybinding to close
* the dialog.
*
* The default binding for this signal is the Escape key.
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkDialogClass, close),
NULL, NULL,
- _gtk_marshal_NONE__NONE,
+ _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
gtk_widget_class_install_style_property (widget_class,
G_MAXINT,
2,
GTK_PARAM_READABLE));
+ /**
+ * GtkDialog:content-area-spacing:
+ *
+ * The default spacing used between elements of the
+ * content area of the dialog, as returned by
+ * gtk_dialog_get_content_area(), unless gtk_box_set_spacing()
+ * was called on that widget directly.
+ *
+ * Since: 2.16
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("content-area-spacing",
+ P_("Content area spacing"),
+ P_("Spacing between elements of the main dialog area"),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("button-spacing",
P_("Button spacing"),
static void
update_spacings (GtkDialog *dialog)
{
- GtkWidget *widget;
+ GtkDialogPriv *priv = dialog->priv;
gint content_area_border;
+ gint content_area_spacing;
gint button_spacing;
gint action_area_border;
-
- widget = GTK_WIDGET (dialog);
- gtk_widget_style_get (widget,
+ gtk_widget_style_get (GTK_WIDGET (dialog),
"content-area-border", &content_area_border,
+ "content-area-spacing", &content_area_spacing,
"button-spacing", &button_spacing,
"action-area-border", &action_area_border,
NULL);
- gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox),
+ gtk_container_set_border_width (GTK_CONTAINER (priv->vbox),
content_area_border);
- gtk_box_set_spacing (GTK_BOX (dialog->action_area),
+ if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox)))
+ {
+ gtk_box_set_spacing (GTK_BOX (priv->vbox), content_area_spacing);
+ _gtk_box_set_spacing_set (GTK_BOX (priv->vbox), FALSE);
+ }
+ gtk_box_set_spacing (GTK_BOX (priv->action_area),
button_spacing);
- gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area),
+ gtk_container_set_border_width (GTK_CONTAINER (priv->action_area),
action_area_border);
}
static void
gtk_dialog_init (GtkDialog *dialog)
{
- GtkDialogPrivate *priv;
+ GtkDialogPriv *priv;
+
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog,
+ GTK_TYPE_DIALOG,
+ GtkDialogPriv);
+ priv = dialog->priv;
- priv = GET_PRIVATE (dialog);
priv->ignore_separator = FALSE;
/* To avoid breaking old code that prevents destroy on delete event
* connection on the dialog.
*/
g_signal_connect (dialog,
- "delete_event",
+ "delete-event",
G_CALLBACK (gtk_dialog_delete_event_handler),
NULL);
-
- dialog->vbox = gtk_vbox_new (FALSE, 0);
- /* gtk_container_add () from superclass */
- GTK_CONTAINER_CLASS (gtk_dialog_parent_class)->add (GTK_CONTAINER (dialog),
- dialog->vbox);
- gtk_widget_show (dialog->vbox);
+ priv->vbox = gtk_vbox_new (FALSE, 0);
- dialog->action_area = gtk_hbutton_box_new ();
+ gtk_container_add (GTK_CONTAINER (dialog), priv->vbox);
+ gtk_widget_show (priv->vbox);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog->action_area),
- GTK_BUTTONBOX_END);
+ priv->action_area = gtk_hbutton_box_new ();
- gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area,
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (priv->action_area),
+ GTK_BUTTONBOX_END);
+
+ gtk_box_pack_end (GTK_BOX (priv->vbox), priv->action_area,
FALSE, TRUE, 0);
- gtk_widget_show (dialog->action_area);
+ gtk_widget_show (priv->action_area);
- dialog->separator = gtk_hseparator_new ();
- gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->separator, FALSE, TRUE, 0);
- gtk_widget_show (dialog->separator);
+ priv->separator = gtk_hseparator_new ();
+ gtk_box_pack_end (GTK_BOX (priv->vbox), priv->separator, FALSE, TRUE, 0);
+ gtk_widget_show (priv->separator);
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
GtkBuilder *builder,
const gchar *childname)
{
- if (strcmp (childname, "vbox") == 0)
- return G_OBJECT (GTK_DIALOG (buildable)->vbox);
- else if (strcmp (childname, "action_area") == 0)
- return G_OBJECT (GTK_DIALOG (buildable)->action_area);
-
- return parent_buildable_iface->get_internal_child (buildable,
- builder,
- childname);
+ GtkDialogPriv *priv = GTK_DIALOG (buildable)->priv;
+
+ if (strcmp (childname, "vbox") == 0)
+ return G_OBJECT (priv->vbox);
+ else if (strcmp (childname, "action_area") == 0)
+ return G_OBJECT (priv->action_area);
+
+ return parent_buildable_iface->get_internal_child (buildable,
+ builder,
+ childname);
}
static void
GValue *value,
GParamSpec *pspec)
{
- GtkDialog *dialog;
-
- dialog = GTK_DIALOG (object);
+ GtkDialog *dialog = GTK_DIALOG (object);
+ GtkDialogPriv *priv = dialog->priv;
switch (prop_id)
{
case PROP_HAS_SEPARATOR:
- g_value_set_boolean (value, dialog->separator != NULL);
+ g_value_set_boolean (value, priv->separator != NULL);
break;
default:
}
}
-static void
-gtk_dialog_add (GtkContainer *container,
- GtkWidget *widget)
-{
- GtkDialog *dialog;
-
- dialog = GTK_DIALOG (container);
-
- gtk_box_pack_start (GTK_BOX (dialog->vbox), widget, FALSE, FALSE, 0);
-}
-
-static void
-gtk_dialog_remove (GtkContainer *container,
- GtkWidget *widget)
-{
- GtkDialog *dialog;
-
- dialog = GTK_DIALOG (container);
-
- gtk_container_remove (GTK_CONTAINER (dialog->vbox), widget);
-}
-
-static gint
+static gboolean
gtk_dialog_delete_event_handler (GtkWidget *widget,
GdkEventAny *event,
gpointer user_data)
{
GtkWindow *window = GTK_WINDOW (widget);
GtkDialog *dialog = GTK_DIALOG (widget);
+ GtkDialogPriv *priv = dialog->priv;
GTK_WIDGET_CLASS (gtk_dialog_parent_class)->map (widget);
if (first_focus == NULL)
first_focus = window->focus_widget;
else if (first_focus == window->focus_widget)
- break;
-
+ break;
if (!GTK_IS_LABEL (window->focus_widget))
break;
- else
- gtk_label_select_region (GTK_LABEL (window->focus_widget), 0, 0);
+ if (!gtk_label_get_current_uri (GTK_LABEL (window->focus_widget)))
+ gtk_label_select_region (GTK_LABEL (window->focus_widget), 0, 0);
}
while (TRUE);
- tmp_list = children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));
+ tmp_list = children = gtk_container_get_children (GTK_CONTAINER (priv->action_area));
while (tmp_list)
{
dialog_find_button (GtkDialog *dialog,
gint response_id)
{
- GList *children, *tmp_list;
+ GtkDialogPriv *priv = dialog->priv;
GtkWidget *child = NULL;
+ GList *children, *tmp_list;
- children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));
+ children = gtk_container_get_children (GTK_CONTAINER (priv->action_area));
for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
{
/**
* gtk_dialog_new_with_buttons:
- * @title: Title of the dialog, or %NULL
- * @parent: Transient parent of the dialog, or %NULL
+ * @title: (allow-none): Title of the dialog, or %NULL
+ * @parent: (allow-none): Transient parent of the dialog, or %NULL
* @flags: from #GtkDialogFlags
- * @first_button_text: stock ID or text to go in first button, or %NULL
+ * @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
- *
+ *
* Creates a new #GtkDialog with title @title (or %NULL for the default
* title; see gtk_window_set_title()) and transient parent @parent (or
* %NULL for none; see gtk_window_set_transient_for()). The @flags
GtkWidget *child,
gint response_id)
{
+ GtkDialogPriv *priv;
ResponseData *ad;
guint signal_id;
g_return_if_fail (GTK_IS_DIALOG (dialog));
g_return_if_fail (GTK_IS_WIDGET (child));
+ priv = dialog->priv;
+
ad = get_response_data (child, TRUE);
ad->response_id = response_id;
else
g_warning ("Only 'activatable' widgets can be packed into the action area of a GtkDialog");
- gtk_box_pack_end (GTK_BOX (dialog->action_area),
+ gtk_box_pack_end (GTK_BOX (priv->action_area),
child,
FALSE, TRUE, 0);
if (response_id == GTK_RESPONSE_HELP)
- gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (dialog->action_area), child, TRUE);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (priv->action_area), child, TRUE);
}
/**
button = gtk_button_new_from_stock (button_text);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
gint response_id,
gboolean setting)
{
+ GtkDialogPriv *priv;
GList *children;
GList *tmp_list;
g_return_if_fail (GTK_IS_DIALOG (dialog));
- children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));
+ priv = dialog->priv;
+
+ children = gtk_container_get_children (GTK_CONTAINER (priv->action_area));
tmp_list = children;
while (tmp_list != NULL)
gtk_dialog_set_default_response (GtkDialog *dialog,
gint response_id)
{
+ GtkDialogPriv *priv;
GList *children;
GList *tmp_list;
g_return_if_fail (GTK_IS_DIALOG (dialog));
- children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));
+ priv = dialog->priv;
+
+ children = gtk_container_get_children (GTK_CONTAINER (priv->action_area));
tmp_list = children;
while (tmp_list != NULL)
gtk_dialog_set_has_separator (GtkDialog *dialog,
gboolean setting)
{
- GtkDialogPrivate *priv;
+ GtkDialogPriv *priv;
g_return_if_fail (GTK_IS_DIALOG (dialog));
- priv = GET_PRIVATE (dialog);
+ priv = dialog->priv;
/* this might fail if we get called before _init() somehow */
- g_assert (dialog->vbox != NULL);
+ g_assert (priv->vbox != NULL);
if (priv->ignore_separator)
{
return;
}
- if (setting && dialog->separator == NULL)
+ if (setting && priv->separator == NULL)
{
- dialog->separator = gtk_hseparator_new ();
- gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->separator, FALSE, TRUE, 0);
+ priv->separator = gtk_hseparator_new ();
+ gtk_box_pack_end (GTK_BOX (priv->vbox), priv->separator, FALSE, TRUE, 0);
/* The app programmer could screw this up, but, their own fault.
* Moves the separator just above the action area.
*/
- gtk_box_reorder_child (GTK_BOX (dialog->vbox), dialog->separator, 1);
- gtk_widget_show (dialog->separator);
+ gtk_box_reorder_child (GTK_BOX (priv->vbox), priv->separator, 1);
+ gtk_widget_show (priv->separator);
}
- else if (!setting && dialog->separator != NULL)
+ else if (!setting && priv->separator != NULL)
{
- gtk_widget_destroy (dialog->separator);
- dialog->separator = NULL;
+ gtk_widget_destroy (priv->separator);
+ priv->separator = NULL;
}
g_object_notify (G_OBJECT (dialog), "has-separator");
{
g_return_val_if_fail (GTK_IS_DIALOG (dialog), FALSE);
- return dialog->separator != NULL;
+ return dialog->priv->separator != NULL;
}
/**
if (!was_modal)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- if (!GTK_WIDGET_VISIBLE (dialog))
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog)))
gtk_widget_show (GTK_WIDGET (dialog));
response_handler =
_gtk_dialog_set_ignore_separator (GtkDialog *dialog,
gboolean ignore_separator)
{
- GtkDialogPrivate *priv;
+ GtkDialogPriv *priv = dialog->priv;
- priv = GET_PRIVATE (dialog);
priv->ignore_separator = ignore_separator;
}
+/**
+ * gtk_dialog_get_widget_for_response:
+ * @dialog: a #GtkDialog
+ * @response_id: the response ID used by the @dialog widget
+ *
+ * Gets the widget button that uses the given response ID in the action area
+ * of a dialog.
+ *
+ * Returns: the @widget button that uses the given @response_id, or %NULL.
+ *
+ * Since: 2.20
+ */
+GtkWidget*
+gtk_dialog_get_widget_for_response (GtkDialog *dialog,
+ gint response_id)
+{
+ GtkDialogPriv *priv;
+ GList *children;
+ GList *tmp_list;
+
+ g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
+
+ priv = dialog->priv;
+
+ children = gtk_container_get_children (GTK_CONTAINER (priv->action_area));
+
+ tmp_list = children;
+ while (tmp_list != NULL)
+ {
+ GtkWidget *widget = tmp_list->data;
+ ResponseData *rd = get_response_data (widget, FALSE);
+
+ if (rd && rd->response_id == response_id)
+ {
+ g_list_free (children);
+ return widget;
+ }
+
+ tmp_list = g_list_next (tmp_list);
+ }
+
+ g_list_free (children);
+
+ return NULL;
+}
+
/**
* gtk_dialog_get_response_for_widget:
* @dialog: a #GtkDialog
/**
* gtk_alternative_dialog_button_order:
- * @screen: a #GdkScreen, or %NULL to use the default screen
+ * @screen: (allow-none): a #GdkScreen, or %NULL to use the default screen
*
* Returns %TRUE if dialogs are expected to use an alternative
- * button order on the screen @screen. See
+ * button order on the screen @screen. See
* gtk_dialog_set_alternative_button_order() for more details
* about alternative button order.
*
gint first_response_id,
va_list args)
{
+ GtkDialogPriv *priv = dialog->priv;
GtkWidget *child;
gint response_id;
gint position;
{
/* reorder child with response_id to position */
child = dialog_find_button (dialog, response_id);
- gtk_box_reorder_child (GTK_BOX (dialog->action_area), child, position);
+ gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
response_id = va_arg (args, gint);
position++;
gint n_params,
gint *new_order)
{
+ GtkDialogPriv *priv = dialog->priv;
GdkScreen *screen;
GtkWidget *child;
gint position;
{
/* reorder child with response_id to position */
child = dialog_find_button (dialog, new_order[position]);
- gtk_box_reorder_child (GTK_BOX (dialog->action_area), child, position);
+ gtk_box_reorder_child (GTK_BOX (priv->action_area), child, position);
}
}
guint i;
if (strcmp (element_name, "action-widget") == 0)
- for (i = 0; names[i]; i++)
- if (strcmp (names[i], "response") == 0)
- parser_data->response = g_strdup (values[i]);
+ {
+ for (i = 0; names[i]; i++)
+ if (strcmp (names[i], "response") == 0)
+ parser_data->response = g_strdup (values[i]);
+ }
else if (strcmp (element_name, "action-widgets") == 0)
return;
else
attributes_text_element,
};
-gboolean
+static gboolean
gtk_dialog_buildable_custom_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
const gchar *tagname,
gpointer user_data)
{
+ GtkDialog *dialog = GTK_DIALOG (buildable);
+ GtkDialogPriv *priv = dialog->priv;
GSList *l;
ActionWidgetsSubParserData *parser_data;
GObject *object;
- GtkDialog *dialog;
ResponseData *ad;
guint signal_id;
return;
}
- dialog = GTK_DIALOG (buildable);
parser_data = (ActionWidgetsSubParserData*)user_data;
parser_data->items = g_slist_reverse (parser_data->items);
}
if (ad->response_id == GTK_RESPONSE_HELP)
- gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (dialog->action_area),
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (priv->action_area),
GTK_WIDGET (object), TRUE);
g_free (item->widget_name);
*
* Returns the action area of @dialog.
*
- * Returns: the action area.
+ * Returns: (transfer none): the action area.
*
* Since: 2.14
**/
{
g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
- return dialog->action_area;
+ return dialog->priv->action_area;
}
/**
- * gtk_dialog_pack_start:
+ * gtk_dialog_get_content_area:
* @dialog: a #GtkDialog
- * @widget: #GtkWidget to be added to @dialog.
- * @expand: %TRUE if @widget should take all extra space.
- * @fill: %TRUE if all space given should be used by @widget
- * @padding: extra pixels to put between @widget and its neighbors
*
- * This function similar to gtk_box_pack_start() packs @widget
- * with reference to the start of @dialog.
+ * Returns the content area of @dialog.
*
- * Since: 2.14
- **/
-void
-gtk_dialog_pack_start (GtkDialog *dialog,
- GtkWidget *widget,
- gboolean expand,
- gboolean fill,
- guint padding)
-{
- g_return_if_fail (GTK_IS_DIALOG (dialog));
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- gtk_box_pack_start (GTK_BOX (dialog->vbox),
- widget, expand, fill, padding);
-}
-
-/**
- * gtk_dialog_pack_end:
- * @dialog: a #GtkDialog
- * @widget: #GtkWidget to be added to @dialog.
- * @expand: %TRUE if @widget should take all extra space.
- * @fill: %TRUE if all space given should be used by @widget
- * @padding: extra pixels to put between @widget and its neighbors
- *
- * This function similar to gtk_box_pack_end() packs @widget
- * with reference to the end of @dialog.
+ * Returns: (transfer none): the content area #GtkVBox.
*
* Since: 2.14
**/
-void
-gtk_dialog_pack_end (GtkDialog *dialog,
- GtkWidget *widget,
- gboolean expand,
- gboolean fill,
- guint padding)
+GtkWidget *
+gtk_dialog_get_content_area (GtkDialog *dialog)
{
- g_return_if_fail (GTK_IS_DIALOG (dialog));
- g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
- gtk_box_pack_end (GTK_BOX (dialog->vbox),
- widget, expand, fill, padding);
+ return dialog->priv->vbox;
}
-
-#define __GTK_DIALOG_C__
-#include "gtkaliasdef.c"