[gtk/wip/exalm/window-headerbar: 6/6] window: Stop listening to headerbar title changes



commit aecebca7403315495eec305a0ce22e6c043e7134
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Apr 22 22:56:52 2020 +0500

    window: Stop listening to headerbar title changes
    
    Remove another dependency.

 gtk/gtkwindow.c | 23 -----------------------
 1 file changed, 23 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5de13adca4..08fc088acc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -538,9 +538,6 @@ static void             gtk_window_native_interface_init  (GtkNativeInterface  *
 
 static void ensure_state_flag_backdrop (GtkWidget *widget);
 static void unset_titlebar (GtkWindow *window);
-static void on_titlebar_title_notify (GtkHeaderBar *titlebar,
-                                      GParamSpec   *pspec,
-                                      GtkWindow    *self);
 static GtkWindowRegion get_active_region_type (GtkWindow   *window,
                                                gint         x,
                                                gint         y);
@@ -3053,9 +3050,6 @@ unset_titlebar (GtkWindow *window)
 
   if (priv->title_box != NULL)
     {
-      g_signal_handlers_disconnect_by_func (priv->title_box,
-                                            on_titlebar_title_notify,
-                                            window);
       gtk_widget_unparent (priv->title_box);
       priv->title_box = NULL;
       priv->titlebar = NULL;
@@ -3103,17 +3097,6 @@ gtk_window_enable_csd (GtkWindow *window)
   priv->client_decorated = TRUE;
 }
 
-static void
-on_titlebar_title_notify (GtkHeaderBar *titlebar,
-                          GParamSpec   *pspec,
-                          GtkWindow    *self)
-{
-  const gchar *title;
-
-  title = gtk_header_bar_get_title (titlebar);
-  gtk_window_set_title_internal (self, title, FALSE);
-}
-
 /**
  * gtk_window_set_titlebar:
  * @window: a #GtkWindow
@@ -3172,12 +3155,6 @@ gtk_window_set_titlebar (GtkWindow *window,
                               NULL);
 
   gtk_widget_set_parent (priv->title_box, widget);
-  if (GTK_IS_HEADER_BAR (titlebar))
-    {
-      g_signal_connect (titlebar, "notify::title",
-                        G_CALLBACK (on_titlebar_title_notify), window);
-      on_titlebar_title_notify (GTK_HEADER_BAR (titlebar), NULL, window);
-    }
 
   gtk_widget_add_css_class (titlebar, GTK_STYLE_CLASS_TITLEBAR);
 


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