Commit 9640eccd authored by William Jon McCann's avatar William Jon McCann Committed by Matthias Clasen

dialog: Add a headerbar

This change makes it possible for GtkDialog to pack
its action widgets into a header bar, instead of the
traditional action area. This change is controlled
by the use-header-bar construct-only property.

https://bugzilla.gnome.org/show_bug.cgi?id=720059
parent 25e6ba48
......@@ -1033,6 +1033,7 @@ gtk_dialog_get_response_for_widget
gtk_dialog_get_widget_for_response
gtk_dialog_get_action_area
gtk_dialog_get_content_area
gtk_dialog_get_header_bar
<SUBSECTION>
gtk_alternative_dialog_button_order
gtk_dialog_set_alternative_button_order
......
This diff is collapsed.
......@@ -41,13 +41,16 @@ G_BEGIN_DECLS
* see gtk_window_set_modal()
* @GTK_DIALOG_DESTROY_WITH_PARENT: Destroy the dialog when its
* parent is destroyed, see gtk_window_set_destroy_with_parent()
* @GTK_DIALOG_USE_HEADER_BAR: Create dialog with actions in header
* bar instead of action area. Since 3.12.
*
* Flags used to influence dialog construction.
*/
typedef enum
{
GTK_DIALOG_MODAL = 1 << 0,
GTK_DIALOG_DESTROY_WITH_PARENT = 1 << 1
GTK_DIALOG_DESTROY_WITH_PARENT = 1 << 1,
GTK_DIALOG_USE_HEADER_BAR = 1 << 2
} GtkDialogFlags;
/**
......@@ -192,6 +195,8 @@ GDK_DEPRECATED_IN_3_10
GtkWidget * gtk_dialog_get_action_area (GtkDialog *dialog);
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_dialog_get_content_area (GtkDialog *dialog);
GDK_AVAILABLE_IN_3_12
GtkWidget * gtk_dialog_get_header_bar (GtkDialog *dialog);
G_END_DECLS
......
......@@ -6,6 +6,13 @@
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<signal name="delete-event" handler="gtk_dialog_delete_event_handler" swapped="no"/>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show-close-button">True</property>
</object>
</child>
<child>
<object class="GtkBox" id="vbox">
<property name="visible">True</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment