shell: Remove cc_shell_set_custom_titlebar

This is now unused.
This commit is contained in:
Georges Basile Stavracas Neto
2022-01-19 19:22:10 -03:00
parent 5017f3b21e
commit bcd969f052
3 changed files with 0 additions and 41 deletions

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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 */