[gtk+/wip/baedert/drawing: 66/128] Remove calls to gtk_widget_set_allocation
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 66/128] Remove calls to gtk_widget_set_allocation
- Date: Sat, 13 May 2017 19:16:44 +0000 (UTC)
commit 649c8274786631a52aba475f3e2662605fa2ccff
Author: Timm Bäder <mail baedert org>
Date: Fri May 5 19:18:53 2017 +0200
Remove calls to gtk_widget_set_allocation
gtk_widget_size_allocate_with_baselines does it automatically now.
demos/gtk-demo/gtkfishbowl.c | 4 ++--
gtk/gtkcalendar.c | 1 -
gtk/gtkeventbox.c | 2 --
gtk/gtkfixed.c | 2 --
gtk/gtkinvisible.c | 2 +-
gtk/gtklayout.c | 2 --
gtk/gtkmenu.c | 2 --
gtk/gtkpathbar.c | 2 --
gtk/gtkpopover.c | 1 -
gtk/gtktextview.c | 2 --
gtk/gtktoolitem.c | 2 --
gtk/gtktreeview.c | 2 --
gtk/gtkviewport.c | 2 --
gtk/gtkwindow.c | 2 --
14 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/demos/gtk-demo/gtkfishbowl.c b/demos/gtk-demo/gtkfishbowl.c
index fd7b262..447610c 100644
--- a/demos/gtk-demo/gtkfishbowl.c
+++ b/demos/gtk-demo/gtkfishbowl.c
@@ -113,8 +113,6 @@ gtk_fishbowl_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GList *children;
- gtk_widget_set_allocation (widget, allocation);
-
for (children = priv->children; children; children = children->next)
{
child = children->data;
@@ -130,6 +128,8 @@ gtk_fishbowl_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (child->widget, &child_allocation);
}
+
+ gtk_widget_set_clip (widget, allocation);
}
static double
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index b2d1f84..ed5e209 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2067,7 +2067,6 @@ gtk_calendar_size_allocate (GtkWidget *widget,
gint calendar_xsep = calendar_get_xsep (calendar);
get_component_paddings (calendar, &padding, NULL, NULL, NULL);
- gtk_widget_set_allocation (widget, allocation);
if (priv->display_flags & GTK_CALENDAR_SHOW_WEEK_NUMBERS)
{
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index d8bb6a6..475314a 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -478,8 +478,6 @@ gtk_event_box_size_allocate (GtkWidget *widget,
bin = GTK_BIN (widget);
- gtk_widget_set_allocation (widget, allocation);
-
if (!gtk_widget_get_has_window (widget))
{
child_allocation.x = allocation->x;
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 6a05363..225325b 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -421,8 +421,6 @@ gtk_fixed_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GList *children;
- gtk_widget_set_allocation (widget, allocation);
-
if (gtk_widget_get_has_window (widget))
{
if (gtk_widget_get_realized (widget))
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 16f5ef6..9478977 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -255,7 +255,7 @@ static void
gtk_invisible_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
- gtk_widget_set_allocation (widget, allocation);
+ gtk_widget_set_clip (widget, allocation);
}
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index fe73830..ebb2725 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -868,8 +868,6 @@ gtk_layout_size_allocate (GtkWidget *widget,
GtkLayoutPrivate *priv = layout->priv;
GList *tmp_list;
- gtk_widget_set_allocation (widget, allocation);
-
tmp_list = priv->children;
while (tmp_list)
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 2a87460..e52dfef 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2820,8 +2820,6 @@ gtk_menu_size_allocate (GtkWidget *widget,
menu_shell = GTK_MENU_SHELL (widget);
priv = menu->priv;
- gtk_widget_set_allocation (widget, allocation);
-
get_menu_padding (widget, &padding);
g_free (priv->heights);
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 1c19243..69daabf 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -512,8 +512,6 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
gint down_slider_offset = 0;
GtkRequisition child_requisition;
- gtk_widget_set_allocation (widget, allocation);
-
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (path_bar->priv->event_window,
allocation->x, allocation->y,
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index e392766..3ac73bb 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1360,7 +1360,6 @@ gtk_popover_size_allocate (GtkWidget *widget,
GtkAllocation child_clip;
GtkAllocation clip = *allocation;
- gtk_widget_set_allocation (widget, allocation);
child = gtk_bin_get_child (GTK_BIN (widget));
if (child)
{
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 7a3b653..9614255 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4207,8 +4207,6 @@ gtk_text_view_size_allocate (GtkWidget *widget,
widget_allocation.width != allocation->width ||
widget_allocation.height != allocation->height;
- gtk_widget_set_allocation (widget, allocation);
-
/* distribute width/height among child windows. Ensure all
* windows get at least a 1x1 allocation.
*/
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index e7a8a8b..82ae959 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -397,8 +397,6 @@ gtk_tool_item_size_allocate (GtkWidget *widget,
GtkAllocation child_allocation;
GtkWidget *child;
- gtk_widget_set_allocation (widget, allocation);
-
if (toolitem->priv->drag_window)
gdk_window_move_resize (toolitem->priv->drag_window,
allocation->x,
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index bdf28fa..35b257f 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2656,8 +2656,6 @@ gtk_tree_view_size_allocate (GtkWidget *widget,
if (allocation->width != old_width)
width_changed = TRUE;
- gtk_widget_set_allocation (widget, allocation);
-
/* We size-allocate the columns first because the width of the
* tree view (used in updating the adjustments below) might change.
*/
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 7c7b9ed..bf9b7e2 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -614,8 +614,6 @@ gtk_viewport_size_allocate (GtkWidget *widget,
widget_allocation.height != allocation->height))
gdk_window_invalidate_rect (gtk_widget_get_window (widget), NULL, FALSE);
- gtk_widget_set_allocation (widget, allocation);
-
g_object_freeze_notify (G_OBJECT (hadjustment));
g_object_freeze_notify (G_OBJECT (vadjustment));
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 19dd247..3123bc4 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7178,8 +7178,6 @@ _gtk_window_set_allocation (GtkWindow *window,
g_assert (allocation != NULL);
g_assert (allocation_out != NULL);
- gtk_widget_set_allocation (widget, allocation);
-
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.width = allocation->width;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]