GtkCheckMenuItem: remove an unused boolean field

always_show_toggle was always set to TRUE in _init() and never changed
from anywhere else.  Remove it and remove the if() statements based on
it.

https://bugzilla.gnome.org/show_bug.cgi?id=699929
This commit is contained in:
Ryan Lortie 2013-05-08 08:15:40 -04:00 committed by Matthias Clasen
parent b9b196abe3
commit 434dfc20c7

View File

@ -53,7 +53,6 @@
struct _GtkCheckMenuItemPrivate struct _GtkCheckMenuItemPrivate
{ {
guint active : 1; guint active : 1;
guint always_show_toggle : 1;
guint draw_as_radio : 1; guint draw_as_radio : 1;
guint inconsistent : 1; guint inconsistent : 1;
}; };
@ -467,7 +466,6 @@ gtk_check_menu_item_init (GtkCheckMenuItem *check_menu_item)
priv = check_menu_item->priv; priv = check_menu_item->priv;
priv->active = FALSE; priv->active = FALSE;
priv->always_show_toggle = TRUE;
} }
static gint static gint
@ -556,10 +554,6 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
y = (allocation.height - indicator_size) / 2; y = (allocation.height - indicator_size) / 2;
if (priv->active ||
priv->always_show_toggle ||
(state & GTK_STATE_FLAG_PRELIGHT))
{
gtk_style_context_save (context); gtk_style_context_save (context);
if (priv->inconsistent) if (priv->inconsistent)
@ -585,7 +579,6 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
gtk_style_context_restore (context); gtk_style_context_restore (context);
} }
} }
}
static void static void