[gtk/wip/exalm/show-title-buttons] headerbar: Show title buttons by default



commit 8c64cea9d1a5e34298e7b2051fdd394d06881eea
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon May 25 20:14:58 2020 +0500

    headerbar: Show title buttons by default
    
    Most of the time show-title-buttons is set to TRUE. Go ahead and make that
    the default.

 demos/constraint-editor/constraint-editor-window.ui | 1 -
 demos/gtk-demo/fishbowl.ui                          | 1 -
 demos/gtk-demo/font-features.ui                     | 1 -
 demos/gtk-demo/headerbar.c                          | 1 -
 demos/gtk-demo/iconscroll.ui                        | 1 -
 demos/gtk-demo/main.ui                              | 1 -
 demos/gtk-demo/markup.c                             | 1 -
 demos/gtk-demo/modelbutton.ui                       | 4 +---
 demos/gtk-demo/paint.c                              | 1 -
 demos/gtk-demo/peg_solitaire.c                      | 1 -
 demos/gtk-demo/sidebar.c                            | 1 -
 demos/gtk-demo/sliding_puzzle.c                     | 1 -
 demos/gtk-demo/themes.ui                            | 1 -
 demos/gtk-demo/video_player.c                       | 1 -
 demos/icon-browser/window.ui                        | 1 -
 demos/node-editor/node-editor-window.ui             | 1 -
 demos/widget-factory/widget-factory.ui              | 1 -
 docs/reference/gtk/migrating-3to4.xml               | 1 +
 examples/application3/window.ui                     | 1 -
 examples/application4/window.ui                     | 1 -
 examples/application5/window.ui                     | 1 -
 examples/application6/window.ui                     | 1 -
 examples/application7/window.ui                     | 1 -
 examples/application8/window.ui                     | 1 -
 examples/application9/window.ui                     | 1 -
 examples/sunny.c                                    | 1 -
 gtk/gtkheaderbar.c                                  | 4 +++-
 gtk/gtkshortcutswindow.c                            | 4 +---
 gtk/gtkwindow.c                                     | 1 -
 gtk/inspector/window.ui                             | 1 -
 gtk/ui/gtkaboutdialog.ui                            | 1 -
 gtk/ui/gtkassistant.ui                              | 4 +++-
 gtk/ui/gtkdialog.ui                                 | 4 +---
 gtk/ui/gtkmessagedialog.ui                          | 4 +++-
 tests/dialog.ui                                     | 1 +
 tests/testheaderbar.c                               | 4 ----
 tests/testpopover.c                                 | 1 -
 tests/testrevealer2.c                               | 1 -
 tests/testwidgettransforms.c                        | 1 -
 testsuite/a11y/headerbar.ui                         | 1 +
 testsuite/css/style/bloomfilter-not.ui              | 1 +
 testsuite/gtk/focus-chain/widget-factory.ui         | 1 -
 testsuite/gtk/focus-chain/widget-factory2.ui        | 1 -
 testsuite/gtk/focus-chain/widget-factory3.ui        | 1 -
 44 files changed, 16 insertions(+), 49 deletions(-)
---
diff --git a/demos/constraint-editor/constraint-editor-window.ui 
b/demos/constraint-editor/constraint-editor-window.ui
index 037de4bd33..aa809e393a 100644
--- a/demos/constraint-editor/constraint-editor-window.ui
+++ b/demos/constraint-editor/constraint-editor-window.ui
@@ -9,7 +9,6 @@
     <property name="default-height">768</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="start">
           <object class="GtkButton">
             <property name="icon-name">document-open-symbolic</property>
diff --git a/demos/gtk-demo/fishbowl.ui b/demos/gtk-demo/fishbowl.ui
index fcf5d38fa4..470a040eef 100644
--- a/demos/gtk-demo/fishbowl.ui
+++ b/demos/gtk-demo/fishbowl.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="">
-        <property name="show-title-buttons">1</property>
         <child>
           <object class="GtkBox">
             <style>
diff --git a/demos/gtk-demo/font-features.ui b/demos/gtk-demo/font-features.ui
index 464baa0735..1099cd08d0 100644
--- a/demos/gtk-demo/font-features.ui
+++ b/demos/gtk-demo/font-features.ui
@@ -7,7 +7,6 @@
     <property name="title">Font Explorer</property>
     <child type="titlebar">
       <object class="GtkHeaderBar">
-        <property name="show-title-buttons">1</property>
         <child>
           <object class="GtkButton" id="reset">
             <property name="receives-default">1</property>
diff --git a/demos/gtk-demo/headerbar.c b/demos/gtk-demo/headerbar.c
index dcb15a51c7..2783f08a8d 100644
--- a/demos/gtk-demo/headerbar.c
+++ b/demos/gtk-demo/headerbar.c
@@ -30,7 +30,6 @@ do_headerbar (GtkWidget *do_widget)
       gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
 
       header = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
 
       button = gtk_button_new ();
       icon = g_themed_icon_new ("mail-send-receive-symbolic");
diff --git a/demos/gtk-demo/iconscroll.ui b/demos/gtk-demo/iconscroll.ui
index f1ae6415b2..18e7317dff 100644
--- a/demos/gtk-demo/iconscroll.ui
+++ b/demos/gtk-demo/iconscroll.ui
@@ -6,7 +6,6 @@
     <property name="default-height">500</property>
     <child type="titlebar">
       <object class="GtkHeaderBar">
-        <property name="show-title-buttons">1</property>
         <child>
           <object class="GtkBox">
             <style>
diff --git a/demos/gtk-demo/main.ui b/demos/gtk-demo/main.ui
index cc652598ba..a34ccb0b5c 100644
--- a/demos/gtk-demo/main.ui
+++ b/demos/gtk-demo/main.ui
@@ -33,7 +33,6 @@
     <property name="default-height">600</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar">
-        <property name="show-title-buttons">1</property>
         <child>
           <object class="GtkButton">
             <property name="valign">center</property>
diff --git a/demos/gtk-demo/markup.c b/demos/gtk-demo/markup.c
index ff62521b36..6c1d87c94f 100644
--- a/demos/gtk-demo/markup.c
+++ b/demos/gtk-demo/markup.c
@@ -69,7 +69,6 @@ do_markup (GtkWidget *do_widget)
       g_signal_connect (show_source, "toggled", G_CALLBACK (source_toggled), stack);
 
       header = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
       gtk_header_bar_pack_start (GTK_HEADER_BAR (header), show_source);
       gtk_window_set_titlebar (GTK_WINDOW (window), header);
 
diff --git a/demos/gtk-demo/modelbutton.ui b/demos/gtk-demo/modelbutton.ui
index 5bfe1fab52..12593a29d5 100644
--- a/demos/gtk-demo/modelbutton.ui
+++ b/demos/gtk-demo/modelbutton.ui
@@ -4,9 +4,7 @@
     <property name="title" translatable="yes">Model Button</property>
     <property name="resizable">0</property>
     <child type="titlebar">
-      <object class="GtkHeaderBar">
-        <property name="show-title-buttons">1</property>
-      </object>
+      <object class="GtkHeaderBar"/>
     </child>
     <child>
       <object class="GtkBox">
diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c
index a7a7c4eddf..f3ba91d244 100644
--- a/demos/gtk-demo/paint.c
+++ b/demos/gtk-demo/paint.c
@@ -392,7 +392,6 @@ do_paint (GtkWidget *toplevel)
       gtk_window_set_child (GTK_WINDOW (window), draw_area);
 
       headerbar = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (headerbar), TRUE);
 
       colorbutton = gtk_color_button_new ();
       g_signal_connect (colorbutton, "color-set",
diff --git a/demos/gtk-demo/peg_solitaire.c b/demos/gtk-demo/peg_solitaire.c
index 61fddf9874..6532cce254 100644
--- a/demos/gtk-demo/peg_solitaire.c
+++ b/demos/gtk-demo/peg_solitaire.c
@@ -276,7 +276,6 @@ do_peg_solitaire (GtkWidget *do_widget)
       g_signal_connect (restart, "clicked", G_CALLBACK (restart), NULL);
 
       header = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
       gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
       window = gtk_window_new ();
       gtk_window_set_display (GTK_WINDOW (window),
diff --git a/demos/gtk-demo/sidebar.c b/demos/gtk-demo/sidebar.c
index 4ff4aa17b9..714978a1a2 100644
--- a/demos/gtk-demo/sidebar.c
+++ b/demos/gtk-demo/sidebar.c
@@ -40,7 +40,6 @@ do_sidebar (GtkWidget *do_widget)
       gtk_widget_set_size_request (window, 500, 350);
 
       header = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR(header), TRUE);
       gtk_window_set_titlebar (GTK_WINDOW(window), header);
       gtk_window_set_title (GTK_WINDOW(window), "Stack Sidebar");
       g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c
index 098048eb5d..5c387e61dd 100644
--- a/demos/gtk-demo/sliding_puzzle.c
+++ b/demos/gtk-demo/sliding_puzzle.c
@@ -451,7 +451,6 @@ do_sliding_puzzle (GtkWidget *do_widget)
       g_signal_connect (restart, "clicked", G_CALLBACK (reshuffle), NULL);
 
       header = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
       gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
       gtk_header_bar_pack_end (GTK_HEADER_BAR (header), tweak);
       window = gtk_window_new ();
diff --git a/demos/gtk-demo/themes.ui b/demos/gtk-demo/themes.ui
index ebf2d940a8..b94554520d 100644
--- a/demos/gtk-demo/themes.ui
+++ b/demos/gtk-demo/themes.ui
@@ -4,7 +4,6 @@
     <property name="resizable">0</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="end">
           <object class="GtkLabel" id="fps"/>
         </child>
diff --git a/demos/gtk-demo/video_player.c b/demos/gtk-demo/video_player.c
index 3054f63c8c..1dd38645da 100644
--- a/demos/gtk-demo/video_player.c
+++ b/demos/gtk-demo/video_player.c
@@ -73,7 +73,6 @@ do_video_player (GtkWidget *do_widget)
       gtk_window_set_child (GTK_WINDOW (window), video);
 
       title = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (title), TRUE);
       gtk_window_set_titlebar (GTK_WINDOW (window), title);
 
       open_button = gtk_button_new_with_mnemonic ("_Open");
diff --git a/demos/icon-browser/window.ui b/demos/icon-browser/window.ui
index 53767d6047..80234164c5 100644
--- a/demos/icon-browser/window.ui
+++ b/demos/icon-browser/window.ui
@@ -25,7 +25,6 @@
     <property name="default-height">768</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkBox">
             <style>
diff --git a/demos/node-editor/node-editor-window.ui b/demos/node-editor/node-editor-window.ui
index 835b154ec6..aa5f47a693 100644
--- a/demos/node-editor/node-editor-window.ui
+++ b/demos/node-editor/node-editor-window.ui
@@ -86,7 +86,6 @@
     <property name="focus-widget">text_view</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="start">
           <object class="GtkButton">
             <property name="icon-name">document-open-symbolic</property>
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 7523595c4b..77b1ee3fa3 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -436,7 +436,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
     <property name="title">GTK Widget Factory</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar1">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="stack_switcher">
             <property name="stack">toplevel_stack</property>
diff --git a/docs/reference/gtk/migrating-3to4.xml b/docs/reference/gtk/migrating-3to4.xml
index 2c58d0a3f8..e6ebb0e971 100644
--- a/docs/reference/gtk/migrating-3to4.xml
+++ b/docs/reference/gtk/migrating-3to4.xml
@@ -547,6 +547,7 @@
         The gtk_header_bar_set_show_close_button() function has been renamed to
         the more accurate name gtk_header_bar_set_show_title_buttons(). The
         corresponding getter and the property itself have also been renamed.
+        The default value of the property is now %TRUE instead of %FALSE.
       </para>
       <para>
         The gtk_header_bar_set_custom_title() function has been renamed to
diff --git a/examples/application3/window.ui b/examples/application3/window.ui
index 5d2d5a4249..53c19f6d93 100644
--- a/examples/application3/window.ui
+++ b/examples/application3/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="tabs">
             <property name="stack">stack</property>
diff --git a/examples/application4/window.ui b/examples/application4/window.ui
index eee9127573..cc7f073789 100644
--- a/examples/application4/window.ui
+++ b/examples/application4/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="tabs">
             <property name="stack">stack</property>
diff --git a/examples/application5/window.ui b/examples/application5/window.ui
index eee9127573..cc7f073789 100644
--- a/examples/application5/window.ui
+++ b/examples/application5/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="tabs">
             <property name="stack">stack</property>
diff --git a/examples/application6/window.ui b/examples/application6/window.ui
index eee9127573..cc7f073789 100644
--- a/examples/application6/window.ui
+++ b/examples/application6/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="tabs">
             <property name="stack">stack</property>
diff --git a/examples/application7/window.ui b/examples/application7/window.ui
index d4280f6354..3a4afed22f 100644
--- a/examples/application7/window.ui
+++ b/examples/application7/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="tabs">
             <property name="stack">stack</property>
diff --git a/examples/application8/window.ui b/examples/application8/window.ui
index 165ebacbcb..9c9a80ae54 100644
--- a/examples/application8/window.ui
+++ b/examples/application8/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="tabs">
             <property name="stack">stack</property>
diff --git a/examples/application9/window.ui b/examples/application9/window.ui
index 29af168d26..b0f9932b03 100644
--- a/examples/application9/window.ui
+++ b/examples/application9/window.ui
@@ -6,7 +6,6 @@
     <property name="default-height">400</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="header">
-        <property name="show-title-buttons">1</property>
         <child>
           <object class="GtkLabel" id="lines_label">
             <property name="visible">0</property>
diff --git a/examples/sunny.c b/examples/sunny.c
index 43757023a0..84a8aa3fad 100644
--- a/examples/sunny.c
+++ b/examples/sunny.c
@@ -15,7 +15,6 @@ new_window (GApplication *app,
   gtk_window_set_icon_name (GTK_WINDOW (window), "sunny");
 
   header = gtk_header_bar_new ();
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
   gtk_window_set_titlebar (GTK_WINDOW (window), header);
 
   overlay = gtk_overlay_new ();
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index c8579568ab..fa00f9a00b 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -595,7 +595,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
       g_param_spec_boolean ("show-title-buttons",
                             P_("Show title buttons"),
                             P_("Whether to show title buttons"),
-                            FALSE,
+                            TRUE,
                             GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
 
   /**
@@ -629,6 +629,7 @@ gtk_header_bar_init (GtkHeaderBar *bar)
 
   priv->title_widget = NULL;
   priv->decoration_layout = NULL;
+  priv->show_title_buttons = TRUE;
   priv->state = GDK_SURFACE_STATE_WITHDRAWN;
 
   priv->handle = gtk_window_handle_new ();
@@ -646,6 +647,7 @@ gtk_header_bar_init (GtkHeaderBar *bar)
   gtk_center_box_set_end_widget (GTK_CENTER_BOX (priv->center_box), priv->end_box);
 
   construct_title_label (bar);
+  create_window_controls (bar);
 }
 
 static GtkBuildableIface *parent_buildable_iface;
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index 643c1b0e68..8e3d2c12d7 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -860,9 +860,7 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
   priv->search_text_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
   priv->search_image_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
-  priv->header_bar = g_object_new (GTK_TYPE_HEADER_BAR,
-                                   "show-title-buttons", TRUE,
-                                   NULL);
+  priv->header_bar = GTK_HEADER_BAR (gtk_header_bar_new ());
   gtk_window_set_titlebar (GTK_WINDOW (self), GTK_WIDGET (priv->header_bar));
 
   search_button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 93139fb164..3d20001e02 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4318,7 +4318,6 @@ gtk_window_realize (GtkWidget *widget)
             if (priv->title_box == NULL)
               {
                 priv->titlebar = gtk_header_bar_new ();
-                gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (priv->titlebar), TRUE);
                 gtk_widget_add_css_class (priv->titlebar, GTK_STYLE_CLASS_TITLEBAR);
                 gtk_widget_add_css_class (priv->titlebar, "default-decoration");
 
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index e469cb23c2..ed657aac57 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -12,7 +12,6 @@
     <property name="default-width">800</property>
     <child type="titlebar">
       <object class="GtkHeaderBar">
-        <property name="show-title-buttons">1</property>
         <child>
           <object class="GtkStack" id="button_stack">
             <property name="visible-child-name" bind-source="top_stack" bind-property="visible-child-name"/>
diff --git a/gtk/ui/gtkaboutdialog.ui b/gtk/ui/gtkaboutdialog.ui
index fcb4f47400..1b5b532140 100644
--- a/gtk/ui/gtkaboutdialog.ui
+++ b/gtk/ui/gtkaboutdialog.ui
@@ -4,7 +4,6 @@
     <property name="resizable">0</property>
     <child internal-child="headerbar">
       <object class="GtkHeaderBar" id="headerbar1">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="stack_switcher">
             <property name="visible">0</property>
diff --git a/gtk/ui/gtkassistant.ui b/gtk/ui/gtkassistant.ui
index 101eb49641..f8742b5f0a 100644
--- a/gtk/ui/gtkassistant.ui
+++ b/gtk/ui/gtkassistant.ui
@@ -2,7 +2,9 @@
 <interface domain="gtk40">
   <template class="GtkAssistant" parent="GtkWindow">
     <child type="titlebar">
-      <object class="GtkHeaderBar" id="headerbar"/>
+      <object class="GtkHeaderBar" id="headerbar">
+        <property name="show-title-buttons">0</property>
+      </object>
     </child>
     <child>
       <object class="GtkBox" id="main_box">
diff --git a/gtk/ui/gtkdialog.ui b/gtk/ui/gtkdialog.ui
index 9bb4d880ca..2b25d79192 100644
--- a/gtk/ui/gtkdialog.ui
+++ b/gtk/ui/gtkdialog.ui
@@ -2,9 +2,7 @@
 <interface domain="gtk40">
   <template class="GtkDialog" parent="GtkWindow">
     <child type="titlebar">
-      <object class="GtkHeaderBar" id="headerbar">
-        <property name="show-title-buttons">1</property>
-      </object>
+      <object class="GtkHeaderBar" id="headerbar"/>
     </child>
     <child>
       <object class="GtkBox">
diff --git a/gtk/ui/gtkmessagedialog.ui b/gtk/ui/gtkmessagedialog.ui
index e03bccef31..c7e29be04d 100644
--- a/gtk/ui/gtkmessagedialog.ui
+++ b/gtk/ui/gtkmessagedialog.ui
@@ -4,7 +4,9 @@
     <property name="title"></property>
     <property name="resizable">0</property>
     <child internal-child="headerbar">
-      <object class="GtkHeaderBar" id="headerbar1"/>
+      <object class="GtkHeaderBar" id="headerbar1">
+        <property name="show-title-buttons">0</property>
+      </object>
     </child>
     <child internal-child="content_area">
       <object class="GtkBox" id="dialog-vbox1">
diff --git a/tests/dialog.ui b/tests/dialog.ui
index 67f2ef9d24..7d30d65ee1 100644
--- a/tests/dialog.ui
+++ b/tests/dialog.ui
@@ -18,6 +18,7 @@
     <property name="title" translatable="yes">Join Chat Room</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="titlebar">
+        <property name="show-title-buttons">0</property>
         <child>
           <object class="GtkButton" id="back_button">
             <property name="visible">0</property>
diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c
index 6326e54cc0..35f93d60ce 100644
--- a/tests/testheaderbar.c
+++ b/tests/testheaderbar.c
@@ -51,7 +51,6 @@ create_headerbar_as_titlebar (GtkApplication *app)
   gtk_window_set_title (GTK_WINDOW (window), "Headerbar as titlebar");
 
   header = gtk_header_bar_new ();
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
   gtk_window_set_titlebar (GTK_WINDOW (window), header);
 
   label = gtk_label_new ("This window has a headerbar set as a titlebar");
@@ -74,7 +73,6 @@ create_headerbar_inside_window (GtkApplication *app)
   gtk_window_set_child (GTK_WINDOW (window), box);
 
   header = gtk_header_bar_new ();
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
   gtk_box_append (GTK_BOX (box), header);
 
   label = gtk_label_new ("This window has a headerbar inside the window and no titlebar");
@@ -98,7 +96,6 @@ create_headerbar_overlay (GtkApplication *app)
   gtk_window_set_child (GTK_WINDOW (window), overlay);
 
   header = gtk_header_bar_new ();
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
   gtk_widget_set_valign (header, GTK_ALIGN_START);
   gtk_overlay_add_overlay (GTK_OVERLAY (overlay), header);
   load_css (header, "headerbar { background: alpha(shade(@theme_bg_color, .9), .8); }");
@@ -150,7 +147,6 @@ create_hiding_headerbar (GtkApplication *app)
   gtk_box_append (GTK_BOX (box), revealer);
 
   header = gtk_header_bar_new ();
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
   gtk_revealer_set_child (GTK_REVEALER (revealer), header);
 
   label = gtk_label_new ("This window's headerbar can be shown and hidden with animation");
diff --git a/tests/testpopover.c b/tests/testpopover.c
index 6f62ca9f01..e9e0a1c580 100644
--- a/tests/testpopover.c
+++ b/tests/testpopover.c
@@ -73,7 +73,6 @@ main (int argc, char *argv[])
   win = gtk_window_new ();
   gtk_window_set_default_size (GTK_WINDOW (win), 400, 600);
   header_bar = gtk_header_bar_new ();
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header_bar), TRUE);
   gtk_window_set_titlebar (GTK_WINDOW (win), header_bar);
   gtk_window_set_title (GTK_WINDOW (win), "Test GtkPopover");
   actions = g_simple_action_group_new ();
diff --git a/tests/testrevealer2.c b/tests/testrevealer2.c
index d058451a39..736bdadfde 100644
--- a/tests/testrevealer2.c
+++ b/tests/testrevealer2.c
@@ -20,7 +20,6 @@ on_activate (GApplication *app,
 
       /* titlebar */
       header = gtk_header_bar_new ();
-      gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
       gtk_window_set_titlebar (GTK_WINDOW (window), header);
 
       sidebar_toggle = gtk_toggle_button_new_with_label ("Show Sidebar");
diff --git a/tests/testwidgettransforms.c b/tests/testwidgettransforms.c
index 5071131446..fb88488b16 100644
--- a/tests/testwidgettransforms.c
+++ b/tests/testwidgettransforms.c
@@ -315,7 +315,6 @@ main (int argc, char **argv)
   titlebar = gtk_header_bar_new ();
 
   gtk_window_set_titlebar (GTK_WINDOW (window), titlebar);
-  gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (titlebar), TRUE);
 
   toggle_button = gtk_toggle_button_new ();
   gtk_button_set_label (GTK_BUTTON (toggle_button), "Picking");
diff --git a/testsuite/a11y/headerbar.ui b/testsuite/a11y/headerbar.ui
index 86b49a94f4..a0790778dc 100644
--- a/testsuite/a11y/headerbar.ui
+++ b/testsuite/a11y/headerbar.ui
@@ -2,6 +2,7 @@
   <object class="GtkWindow" id="window1">
     <child>
       <object class="GtkHeaderBar" id="headerbar1">
+        <property name="show-title-buttons">0</property>
         <child type="start">
           <object class="GtkButton" id="button1">
             <property name="label" translatable="yes">Yes</property>
diff --git a/testsuite/css/style/bloomfilter-not.ui b/testsuite/css/style/bloomfilter-not.ui
index cdbbfeb0ba..311274078f 100644
--- a/testsuite/css/style/bloomfilter-not.ui
+++ b/testsuite/css/style/bloomfilter-not.ui
@@ -3,6 +3,7 @@
   <object class="GtkApplicationWindow" id="window1">
     <child type="titlebar">
       <object class="GtkHeaderBar">
+        <property name="show-title-buttons">0</porperty>
         <child type="title">
           <object class="GtkStackSwitcher" id="stack_switcher">
             <property name="stack">toplevel_stack</property>
diff --git a/testsuite/gtk/focus-chain/widget-factory.ui b/testsuite/gtk/focus-chain/widget-factory.ui
index 0d577c431d..ff594c9eca 100644
--- a/testsuite/gtk/focus-chain/widget-factory.ui
+++ b/testsuite/gtk/focus-chain/widget-factory.ui
@@ -439,7 +439,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
     <property name="title">GTK Widget Factory</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar1">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="stack_switcher">
             <property name="stack">toplevel_stack</property>
diff --git a/testsuite/gtk/focus-chain/widget-factory2.ui b/testsuite/gtk/focus-chain/widget-factory2.ui
index 41b05fa134..f0456fb3ed 100644
--- a/testsuite/gtk/focus-chain/widget-factory2.ui
+++ b/testsuite/gtk/focus-chain/widget-factory2.ui
@@ -439,7 +439,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
     <property name="title">GTK Widget Factory</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar1">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="stack_switcher">
             <property name="stack">toplevel_stack</property>
diff --git a/testsuite/gtk/focus-chain/widget-factory3.ui b/testsuite/gtk/focus-chain/widget-factory3.ui
index 2cc3c4e01a..c4e4b679c3 100644
--- a/testsuite/gtk/focus-chain/widget-factory3.ui
+++ b/testsuite/gtk/focus-chain/widget-factory3.ui
@@ -439,7 +439,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
     <property name="title">GTK Widget Factory</property>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar1">
-        <property name="show-title-buttons">1</property>
         <child type="title">
           <object class="GtkStackSwitcher" id="stack_switcher">
             <property name="stack">toplevel_stack</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]