diff options
author | Timm Bäder <mail@baedert.org> | 2018-12-26 09:00:08 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-01-23 19:30:46 -0500 |
commit | 494e9d750a68b8de25853d7ad908bf83d359a077 (patch) | |
tree | 2f9950a0a700d1fe60e57fba18720c53b8c549ec /gtk | |
parent | 3a13515777dc098610185e07ad0153622b7c3d02 (diff) | |
download | gtk+-494e9d750a68b8de25853d7ad908bf83d359a077.tar.gz |
dialog: Expose the content area as a separate GtkBox child
This way, the "vbox" internal child does not contain anything by
default. It previously did contain "internal" widgetry like the action
area.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkdialog.c | 12 | ||||
-rw-r--r-- | gtk/ui/gtkaboutdialog.ui | 4 | ||||
-rw-r--r-- | gtk/ui/gtkappchooserdialog.ui | 2 | ||||
-rw-r--r-- | gtk/ui/gtkcolorchooserdialog.ui | 2 | ||||
-rw-r--r-- | gtk/ui/gtkdialog.ui | 10 | ||||
-rw-r--r-- | gtk/ui/gtkfilechooserdialog.ui | 4 | ||||
-rw-r--r-- | gtk/ui/gtkfontchooserdialog.ui | 2 | ||||
-rw-r--r-- | gtk/ui/gtkmessagedialog.ui | 2 | ||||
-rw-r--r-- | gtk/ui/gtkpagesetupunixdialog.ui | 2 | ||||
-rw-r--r-- | gtk/ui/gtkprintunixdialog.ui | 2 |
10 files changed, 25 insertions, 17 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 756446aaa8..3604c592c9 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -133,8 +133,8 @@ * # GtkDialog as GtkBuildable * * The GtkDialog implementation of the #GtkBuildable interface exposes the - * @vbox and @action_area as internal children with the names “vbox” and - * “action_area”. + * @message_area and @action_area as internal children with the names + * “action_area” and “action_area”. * * GtkDialog supports a custom <action-widgets> element, which can contain * multiple <action-widget> elements. The “response” attribute specifies a @@ -170,9 +170,9 @@ typedef struct { - GtkWidget *vbox; GtkWidget *headerbar; GtkWidget *action_area; + GtkWidget *content_area; GtkWidget *action_box; GtkSizeGroup *size_group; @@ -592,9 +592,9 @@ gtk_dialog_class_init (GtkDialogClass *class) /* Bind class to template */ gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/ui/gtkdialog.ui"); - gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, vbox); gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, headerbar); gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, action_area); + gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, content_area); gtk_widget_class_bind_template_child_private (widget_class, GtkDialog, action_box); gtk_widget_class_set_css_name (widget_class, I_("dialog")); @@ -727,7 +727,7 @@ gtk_dialog_close (GtkDialog *dialog) * Creates a new dialog box. * * Widgets should not be packed into this #GtkWindow - * directly, but into the @vbox and @action_area, as described above. + * directly, but into the @content_area and @action_area, as described above. * * Returns: the new dialog as a #GtkWidget */ @@ -1621,5 +1621,5 @@ gtk_dialog_get_content_area (GtkDialog *dialog) g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL); - return priv->vbox; + return priv->content_area; } diff --git a/gtk/ui/gtkaboutdialog.ui b/gtk/ui/gtkaboutdialog.ui index f698c758b9..10d42987d2 100644 --- a/gtk/ui/gtkaboutdialog.ui +++ b/gtk/ui/gtkaboutdialog.ui @@ -15,8 +15,8 @@ </child> </object> </child> - <child internal-child="vbox"> - <object class="GtkBox" id="dialog-vbox1"> + <child internal-child="content_area"> + <object class="GtkBox"> <property name="orientation">vertical</property> <property name="spacing">2</property> <property name="margin">5</property> diff --git a/gtk/ui/gtkappchooserdialog.ui b/gtk/ui/gtkappchooserdialog.ui index 9c09d757c7..27a0a62114 100644 --- a/gtk/ui/gtkappchooserdialog.ui +++ b/gtk/ui/gtkappchooserdialog.ui @@ -4,7 +4,7 @@ <template class="GtkAppChooserDialog" parent="GtkDialog"> <property name="title" translatable="yes">Select Application</property> <property name="type-hint">dialog</property> - <child internal-child="vbox"> + <child internal-child="content_area"> <object class="GtkBox" id="dialog-vbox1"> <property name="orientation">vertical</property> <property name="spacing">2</property> diff --git a/gtk/ui/gtkcolorchooserdialog.ui b/gtk/ui/gtkcolorchooserdialog.ui index 347fc6f99f..814222f912 100644 --- a/gtk/ui/gtkcolorchooserdialog.ui +++ b/gtk/ui/gtkcolorchooserdialog.ui @@ -5,7 +5,7 @@ <property name="title" translatable="yes">Select a Color</property> <property name="type-hint">dialog</property> <property name="resizable">0</property> - <child internal-child="vbox"> + <child internal-child="content_area"> <object class="GtkBox" id="dialog-vbox1"> <property name="orientation">vertical</property> <property name="spacing">2</property> diff --git a/gtk/ui/gtkdialog.ui b/gtk/ui/gtkdialog.ui index d2d2638947..1bd869b6c5 100644 --- a/gtk/ui/gtkdialog.ui +++ b/gtk/ui/gtkdialog.ui @@ -10,11 +10,19 @@ </object> </child> <child> - <object class="GtkBox" id="vbox"> + <object class="GtkBox"> <property name="orientation">vertical</property> <style> <class name="dialog-vbox"/> </style> + + <!-- This is empty here and just exists so we can expose it as + GtkDialog API. --> + <child> + <object class="GtkBox" id="content_area"> + </object> + </child> + <child> <object class="GtkBox" id="action_box"> <style> diff --git a/gtk/ui/gtkfilechooserdialog.ui b/gtk/ui/gtkfilechooserdialog.ui index 1b37a4ce0e..fac32bca11 100644 --- a/gtk/ui/gtkfilechooserdialog.ui +++ b/gtk/ui/gtkfilechooserdialog.ui @@ -6,8 +6,8 @@ <property name="type-hint">dialog</property> <property name="default-width">600</property> <signal name="response" handler="response_cb" swapped="no"/> - <child internal-child="vbox"> - <object class="GtkBox" id="dialog-vbox1"> + <child internal-child="content_area"> + <object class="GtkBox"> <property name="orientation">vertical</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> diff --git a/gtk/ui/gtkfontchooserdialog.ui b/gtk/ui/gtkfontchooserdialog.ui index e6fb4ec3a6..cb244a94a0 100644 --- a/gtk/ui/gtkfontchooserdialog.ui +++ b/gtk/ui/gtkfontchooserdialog.ui @@ -4,7 +4,7 @@ <template class="GtkFontChooserDialog" parent="GtkDialog"> <property name="title" translatable="yes">Select Font</property> <property name="type-hint">dialog</property> - <child internal-child="vbox"> + <child internal-child="content_area"> <object class="GtkBox" id="dialog-vbox1"> <property name="orientation">vertical</property> <property name="spacing">2</property> diff --git a/gtk/ui/gtkmessagedialog.ui b/gtk/ui/gtkmessagedialog.ui index 35834d9d48..7b4588fb80 100644 --- a/gtk/ui/gtkmessagedialog.ui +++ b/gtk/ui/gtkmessagedialog.ui @@ -9,7 +9,7 @@ <child internal-child="headerbar"> <object class="GtkHeaderBar" id="headerbar1"/> </child> - <child internal-child="vbox"> + <child internal-child="content_area"> <object class="GtkBox" id="dialog-vbox1"> <property name="orientation">vertical</property> <property name="spacing">20</property> diff --git a/gtk/ui/gtkpagesetupunixdialog.ui b/gtk/ui/gtkpagesetupunixdialog.ui index 4b0b948f0c..4e94af14db 100644 --- a/gtk/ui/gtkpagesetupunixdialog.ui +++ b/gtk/ui/gtkpagesetupunixdialog.ui @@ -27,7 +27,7 @@ <property name="resizable">0</property> <property name="type-hint">dialog</property> <property name="title" translatable="yes">Page Setup</property> - <child internal-child="vbox"> + <child internal-child="content_area"> <object class="GtkBox" id="dialog-vbox1"> <property name="orientation">vertical</property> <property name="spacing">2</property> diff --git a/gtk/ui/gtkprintunixdialog.ui b/gtk/ui/gtkprintunixdialog.ui index 056877c5c0..71ffe20151 100644 --- a/gtk/ui/gtkprintunixdialog.ui +++ b/gtk/ui/gtkprintunixdialog.ui @@ -51,7 +51,7 @@ <property name="type-hint">dialog</property> <signal name="notify::page-setup" handler="redraw_page_layout_preview" swapped="no"/> <signal name="response" handler="error_dialogs" swapped="no"/> - <child internal-child="vbox"> + <child internal-child="content_area"> <object class="GtkBox" id="dialog-vbox1"> <property name="orientation">vertical</property> <property name="spacing">2</property> |