[gnome-control-center/gbsneto/panel-widget-in-sidebar: 4/14] panel: Remove size negotiation machinery overrides
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/panel-widget-in-sidebar: 4/14] panel: Remove size negotiation machinery overrides
- Date: Fri, 16 Nov 2018 17:20:38 +0000 (UTC)
commit 3e9425aee35f68fea43f9021ac705e8264428145
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Nov 12 00:34:41 2018 -0200
panel: Remove size negotiation machinery overrides
These overrides were added eight years ago, as a port from
GTK3's size_request() deprecation, in commit f5f5aac5c0.
These overrides are not necessary these days, since they
just reproduce the default behavior now.
Remove these overrides then.
shell/cc-panel.c | 57 --------------------------------------------------------
1 file changed, 57 deletions(-)
---
diff --git a/shell/cc-panel.c b/shell/cc-panel.c
index 262f03e5d..f4d7c4316 100644
--- a/shell/cc-panel.c
+++ b/shell/cc-panel.c
@@ -143,72 +143,15 @@ cc_panel_finalize (GObject *object)
G_OBJECT_CLASS (cc_panel_parent_class)->finalize (object);
}
-static void
-cc_panel_get_preferred_width (GtkWidget *widget,
- gint *minimum,
- gint *natural)
-{
- GtkBin *bin = GTK_BIN (widget);
- GtkWidget *child;
-
- if (minimum != NULL)
- *minimum = 0;
-
- if (natural != NULL)
- *natural = 0;
-
- if ((child = gtk_bin_get_child (bin)))
- gtk_widget_get_preferred_width (child, minimum, natural);
-}
-
-static void
-cc_panel_get_preferred_height (GtkWidget *widget,
- gint *minimum,
- gint *natural)
-{
- GtkBin *bin = GTK_BIN (widget);
- GtkWidget *child;
-
- if (minimum != NULL)
- *minimum = 0;
-
- if (natural != NULL)
- *natural = 0;
-
- if ((child = gtk_bin_get_child (bin)))
- gtk_widget_get_preferred_height (child, minimum, natural);
-}
-
-static void
-cc_panel_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkAllocation child_allocation;
- GtkWidget *child;
-
- gtk_widget_set_allocation (widget, allocation);
-
- child_allocation = *allocation;
-
- child = gtk_bin_get_child (GTK_BIN (widget));
- g_assert (child);
- gtk_widget_size_allocate (child, &child_allocation);
-}
-
static void
cc_panel_class_init (CcPanelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->get_property = cc_panel_get_property;
object_class->set_property = cc_panel_set_property;
object_class->finalize = cc_panel_finalize;
- widget_class->get_preferred_width = cc_panel_get_preferred_width;
- widget_class->get_preferred_height = cc_panel_get_preferred_height;
- widget_class->size_allocate = cc_panel_size_allocate;
-
properties[PROP_SHELL] = g_param_spec_object ("shell",
"Shell",
"Shell the Panel resides in",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]