[gtk/wip/exalm/window-headerbar: 5/6] window: Stop updating headerbar window buttons



commit 3e258f031d049aec2a98d781417c8b60df15c910
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Apr 22 22:39:40 2020 +0500

    window: Stop updating headerbar window buttons
    
    It should work automatically at this point. Make that function static.

 gtk/gtkheaderbar.c        | 2 +-
 gtk/gtkheaderbarprivate.h | 1 -
 gtk/gtkwindow.c           | 8 ++------
 3 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 1c540d2f4b..9728f2b3ca 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -275,7 +275,7 @@ _gtk_header_bar_update_separator_visibility (GtkHeaderBar *bar)
     gtk_widget_set_visible (priv->titlebar_end_separator, have_visible_at_end);
 }
 
-void
+static void
 _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
 {
   GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (bar);
diff --git a/gtk/gtkheaderbarprivate.h b/gtk/gtkheaderbarprivate.h
index 11d8ed0748..d6a0a7cda3 100644
--- a/gtk/gtkheaderbarprivate.h
+++ b/gtk/gtkheaderbarprivate.h
@@ -25,7 +25,6 @@
 G_BEGIN_DECLS
 
 void         _gtk_header_bar_track_default_decoration (GtkHeaderBar *bar);
-void         _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar);
 
 G_END_DECLS
 
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 0abba8d1e7..5de13adca4 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -46,7 +46,7 @@
 #include "gtkgesturedrag.h"
 #include "gtkgestureclick.h"
 #include "gtkgestureprivate.h"
-#include "gtkheaderbarprivate.h"
+#include "gtkheaderbar.h"
 #include "gtkicontheme.h"
 #include "gtkintl.h"
 #include "gtkmain.h"
@@ -4174,11 +4174,7 @@ update_window_actions (GtkWindow *window)
   gtk_widget_action_set_enabled (GTK_WIDGET (window), "window.close",
                                  priv->deletable);
 
-  if (!update_csd_visibility (window))
-    return;
-
-  if (GTK_IS_HEADER_BAR (priv->title_box))
-    _gtk_header_bar_update_window_buttons (GTK_HEADER_BAR (priv->title_box));
+  update_csd_visibility (window);
 }
 
 static GtkWidget *


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