diff options
author | Timm Bäder <mail@baedert.org> | 2018-11-13 05:09:35 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-11-13 14:10:17 +0100 |
commit | e656f667202da0029cc9481455f598d9d288d015 (patch) | |
tree | 7d5e1aeac491edd2061c6019ef3674a226ad8e69 /gtk/gtktoolbar.c | |
parent | 0d47a6c970f9285273197c3236febc5436aabea7 (diff) | |
download | gtk+-e656f667202da0029cc9481455f598d9d288d015.tar.gz |
toolbar: Remove dead code
The size definitely changes, otherwise ->size_allocate does not get
called.
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r-- | gtk/gtktoolbar.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 3007880910..fdc4331157 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -1201,7 +1201,7 @@ gtk_toolbar_size_allocate (GtkWidget *widget, { GtkToolbar *toolbar = GTK_TOOLBAR (widget); GtkToolbarPrivate *priv = toolbar->priv; - GtkAllocation arrow_allocation, item_area, widget_allocation; + GtkAllocation arrow_allocation, item_area; GtkAllocation *allocations; ItemState *new_states; gint arrow_size; @@ -1215,20 +1215,8 @@ gtk_toolbar_size_allocate (GtkWidget *widget, gint needed_size; GtkRequisition arrow_requisition; gboolean overflowing; - gboolean size_changed; - gtk_widget_get_allocation (widget, &widget_allocation); - size_changed = FALSE; - if (widget_allocation.x != priv->prev_allocation.x || - widget_allocation.y != priv->prev_allocation.y || - widget_allocation.width != priv->prev_allocation.width || - widget_allocation.height != priv->prev_allocation.height) - { - size_changed = TRUE; - } - - if (size_changed) - gtk_toolbar_stop_sliding (toolbar); + gtk_toolbar_stop_sliding (toolbar); gtk_widget_get_preferred_size (priv->arrow_button, &arrow_requisition, NULL); @@ -1430,8 +1418,7 @@ gtk_toolbar_size_allocate (GtkWidget *widget, new_states[i] != NORMAL) { /* an item disappeared and we didn't change size, so begin sliding */ - if (!size_changed) - gtk_toolbar_begin_sliding (toolbar); + gtk_toolbar_begin_sliding (toolbar); } } |