[gnome-control-center/gbsneto/panel-headerbar-cleanup: 14/19] shell: Remove cc_shell_set_custom_titlebar




commit bcd969f052da84a9974ff2aaec7f674250e1a05c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jan 19 19:22:10 2022 -0300

    shell: Remove cc_shell_set_custom_titlebar
    
    This is now unused.

 shell/cc-shell.c  |  9 ---------
 shell/cc-shell.h  |  5 -----
 shell/cc-window.c | 27 ---------------------------
 3 files changed, 41 deletions(-)
---
diff --git a/shell/cc-shell.c b/shell/cc-shell.c
index 3c74ada93..a8a3dad03 100644
--- a/shell/cc-shell.c
+++ b/shell/cc-shell.c
@@ -150,12 +150,3 @@ cc_shell_get_toplevel (CcShell *shell)
 
   return NULL;
 }
-
-void
-cc_shell_set_custom_titlebar (CcShell   *self,
-                              GtkWidget *titlebar)
-{
-  g_return_if_fail (CC_IS_SHELL (self));
-
-  CC_SHELL_GET_IFACE (self)->set_custom_titlebar (self, titlebar);
-}
diff --git a/shell/cc-shell.h b/shell/cc-shell.h
index 9bf4ddca5..0c2bfd26d 100644
--- a/shell/cc-shell.h
+++ b/shell/cc-shell.h
@@ -54,8 +54,6 @@ struct _CcShellInterface
                                            GVariant     *parameters,
                                            GError      **error);
   GtkWidget * (*get_toplevel)             (CcShell      *shell);
-  void        (*set_custom_titlebar)      (CcShell      *self,
-                                           GtkWidget    *titlebar);
 };
 
 GType           cc_shell_get_type                 (void) G_GNUC_CONST;
@@ -69,7 +67,4 @@ gboolean        cc_shell_set_active_panel_from_id (CcShell      *shell,
                                                    GError      **error);
 GtkWidget *     cc_shell_get_toplevel             (CcShell      *shell);
 
-void            cc_shell_set_custom_titlebar      (CcShell      *self,
-                                                   GtkWidget    *titlebar);
-
 G_END_DECLS
diff --git a/shell/cc-window.c b/shell/cc-window.c
index a29aa88a5..6c525badd 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -150,9 +150,6 @@ activate_panel (CcWindow          *self,
   if (visibility == CC_PANEL_HIDDEN)
     CC_RETURN (FALSE);
 
-  /* clear any custom widgets */
-  cc_shell_set_custom_titlebar (CC_SHELL (self), NULL);
-
   timer = g_timer_new ();
 
   g_settings_set_string (self->settings, "last-panel", id);
@@ -609,35 +606,11 @@ cc_window_get_toplevel (CcShell *self)
   return GTK_WIDGET (self);
 }
 
-static void
-cc_window_set_custom_titlebar (CcShell   *shell,
-                               GtkWidget *titlebar)
-{
-  CcWindow *self = CC_WINDOW (shell);
-
-  /* Remove the current custom titlebar */
-  if (self->custom_titlebar)
-    {
-      gtk_stack_set_visible_child (self->panel_titlebar_stack,
-                                   GTK_WIDGET (self->panel_headerbar));
-      gtk_stack_remove (self->panel_titlebar_stack, self->custom_titlebar);
-    }
-
-  g_set_object (&self->custom_titlebar, titlebar);
-
-  if (titlebar)
-    {
-      gtk_stack_add_named (self->panel_titlebar_stack, titlebar,  "custom");
-      gtk_stack_set_visible_child (self->panel_titlebar_stack, titlebar);
-    }
-}
-
 static void
 cc_shell_iface_init (CcShellInterface *iface)
 {
   iface->set_active_panel_from_id = cc_window_set_active_panel_from_id;
   iface->get_toplevel = cc_window_get_toplevel;
-  iface->set_custom_titlebar = cc_window_set_custom_titlebar;
 }
 
 /* GtkWidget overrides */


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