remove variable n_overflowed_menu_items_when_dnd_started
Mon Nov 24 02:19:33 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtktoolbar.c: remove variable n_overflowed_menu_items_when_dnd_started
This commit is contained in:
parent
2e98304e9b
commit
cc70808fb6
@ -1,3 +1,8 @@
|
|||||||
|
Mon Nov 24 02:19:33 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c: remove variable
|
||||||
|
n_overflowed_menu_items_when_dnd_started
|
||||||
|
|
||||||
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
Rework sliding algorithm.
|
Rework sliding algorithm.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Mon Nov 24 02:19:33 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c: remove variable
|
||||||
|
n_overflowed_menu_items_when_dnd_started
|
||||||
|
|
||||||
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
Rework sliding algorithm.
|
Rework sliding algorithm.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Mon Nov 24 02:19:33 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c: remove variable
|
||||||
|
n_overflowed_menu_items_when_dnd_started
|
||||||
|
|
||||||
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
Rework sliding algorithm.
|
Rework sliding algorithm.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Mon Nov 24 02:19:33 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c: remove variable
|
||||||
|
n_overflowed_menu_items_when_dnd_started
|
||||||
|
|
||||||
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
Rework sliding algorithm.
|
Rework sliding algorithm.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Mon Nov 24 02:19:33 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c: remove variable
|
||||||
|
n_overflowed_menu_items_when_dnd_started
|
||||||
|
|
||||||
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
Mon Nov 24 01:47:10 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
Rework sliding algorithm.
|
Rework sliding algorithm.
|
||||||
|
@ -226,7 +226,6 @@ struct _GtkToolbarPrivate
|
|||||||
gboolean need_sync;
|
gboolean need_sync;
|
||||||
gboolean leaving_dnd;
|
gboolean leaving_dnd;
|
||||||
gboolean in_dnd;
|
gboolean in_dnd;
|
||||||
gint n_overflow_items_when_dnd_started;
|
|
||||||
GtkToolItem *highlight_tool_item;
|
GtkToolItem *highlight_tool_item;
|
||||||
gint max_homogeneous_pixels;
|
gint max_homogeneous_pixels;
|
||||||
|
|
||||||
@ -1087,7 +1086,6 @@ slide_idle_handler (gpointer data)
|
|||||||
{
|
{
|
||||||
priv->in_dnd = FALSE;
|
priv->in_dnd = FALSE;
|
||||||
priv->leaving_dnd = FALSE;
|
priv->leaving_dnd = FALSE;
|
||||||
priv->n_overflow_items_when_dnd_started = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->idle_id = 0;
|
priv->idle_id = 0;
|
||||||
@ -1196,7 +1194,6 @@ gtk_toolbar_stop_sliding (GtkToolbar *toolbar)
|
|||||||
priv->is_sliding = FALSE;
|
priv->is_sliding = FALSE;
|
||||||
priv->in_dnd = FALSE;
|
priv->in_dnd = FALSE;
|
||||||
priv->leaving_dnd = FALSE;
|
priv->leaving_dnd = FALSE;
|
||||||
priv->n_overflow_items_when_dnd_started = 0;
|
|
||||||
|
|
||||||
if (priv->idle_id)
|
if (priv->idle_id)
|
||||||
{
|
{
|
||||||
@ -1238,7 +1235,6 @@ gtk_toolbar_size_allocate (GtkWidget *widget,
|
|||||||
gint n_items;
|
gint n_items;
|
||||||
gint needed_size;
|
gint needed_size;
|
||||||
GtkRequisition arrow_requisition;
|
GtkRequisition arrow_requisition;
|
||||||
gint n_overflowed;
|
|
||||||
gboolean overflowing;
|
gboolean overflowing;
|
||||||
gboolean size_changed;
|
gboolean size_changed;
|
||||||
gdouble elapsed;
|
gdouble elapsed;
|
||||||
@ -1319,8 +1315,6 @@ gtk_toolbar_size_allocate (GtkWidget *widget,
|
|||||||
else
|
else
|
||||||
size = available_size;
|
size = available_size;
|
||||||
|
|
||||||
n_overflowed = 0;
|
|
||||||
|
|
||||||
/* calculate widths of items */
|
/* calculate widths of items */
|
||||||
overflowing = FALSE;
|
overflowing = FALSE;
|
||||||
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
|
||||||
@ -1344,7 +1338,6 @@ gtk_toolbar_size_allocate (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
++n_overflowed;
|
|
||||||
overflowing = TRUE;
|
overflowing = TRUE;
|
||||||
new_states[i] = OVERFLOWN;
|
new_states[i] = OVERFLOWN;
|
||||||
}
|
}
|
||||||
@ -1359,16 +1352,11 @@ gtk_toolbar_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
/* expand expandable items */
|
/* expand expandable items */
|
||||||
|
|
||||||
/* FIXME, there is a lot of status stuff (like n_overflowed_items_when_dnd_started)
|
/* We don't expand when there is an overflow menu, because that leads to
|
||||||
* that should be removed. The comment below is obsolete.
|
* weird jumps when items get moved to the overflow menu and the expanding
|
||||||
|
* items suddenly get a lot of extra space
|
||||||
*/
|
*/
|
||||||
|
if (!overflowing)
|
||||||
/* We don't expand when dnd causes items to overflow. Doing so would result in
|
|
||||||
* weird jumps as items are overflowed and expandable items suddenly get lots of
|
|
||||||
* extra space. On the other hand we can't disable expanding completely, because
|
|
||||||
* that would cause a weird jump when dnd begins
|
|
||||||
*/
|
|
||||||
if (!n_overflowed && !(priv->in_dnd && n_overflowed > priv->n_overflow_items_when_dnd_started))
|
|
||||||
{
|
{
|
||||||
n_expand_items = 0;
|
n_expand_items = 0;
|
||||||
for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
|
for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
|
||||||
@ -2019,17 +2007,6 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
|||||||
GTK_WIDGET (toolbar));
|
GTK_WIDGET (toolbar));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!priv->in_dnd)
|
|
||||||
{
|
|
||||||
priv->n_overflow_items_when_dnd_started = 0;
|
|
||||||
for (list = priv->content; list != NULL; list = list->next)
|
|
||||||
{
|
|
||||||
content = list->data;
|
|
||||||
if (content->state == OVERFLOWN)
|
|
||||||
priv->n_overflow_items_when_dnd_started++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->in_dnd = TRUE;
|
priv->in_dnd = TRUE;
|
||||||
priv->leaving_dnd = FALSE;
|
priv->leaving_dnd = FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user