Add _gtk_check_menu_item_set_active() internal function
It's needed by gtkradiomenuitem Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624432
This commit is contained in:
@@ -586,3 +586,23 @@ gtk_check_menu_item_set_property (GObject *object,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Private */
|
||||
|
||||
/*
|
||||
* _gtk_check_menu_item_set_active:
|
||||
* @check_menu_item: a #GtkCheckMenuItem
|
||||
* @is_active: whether the action is active or not
|
||||
*
|
||||
* Sets the #GtkCheckMenuItem:active property directly. This function does
|
||||
* not emit signals or notifications: it is left to the caller to do so.
|
||||
*/
|
||||
void
|
||||
_gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
|
||||
gboolean is_active)
|
||||
{
|
||||
GtkCheckMenuItemPriv *priv = check_menu_item->priv;
|
||||
|
||||
priv->active = is_active;
|
||||
}
|
||||
|
||||
@@ -90,6 +90,11 @@ void gtk_check_menu_item_set_draw_as_radio (GtkCheckMenuItem *check_menu_i
|
||||
gboolean gtk_check_menu_item_get_draw_as_radio (GtkCheckMenuItem *check_menu_item);
|
||||
|
||||
|
||||
/* private */
|
||||
void _gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
|
||||
gboolean is_active);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CHECK_MENU_ITEM_H__ */
|
||||
|
||||
@@ -164,7 +164,7 @@ gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radio_menu_item), TRUE);
|
||||
_gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radio_menu_item), TRUE);
|
||||
/* gtk_widget_set_state (GTK_WIDGET (radio_menu_item), GTK_STATE_ACTIVE);
|
||||
*/
|
||||
}
|
||||
@@ -480,13 +480,13 @@ gtk_radio_menu_item_activate (GtkMenuItem *menu_item)
|
||||
if (tmp_menu_item)
|
||||
{
|
||||
toggled = TRUE;
|
||||
gtk_check_menu_item_set_active (check_menu_item, !active);
|
||||
_gtk_check_menu_item_set_active (check_menu_item, !active);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
toggled = TRUE;
|
||||
gtk_check_menu_item_set_active (check_menu_item, !active);
|
||||
_gtk_check_menu_item_set_active (check_menu_item, !active);
|
||||
|
||||
tmp_list = priv->group;
|
||||
while (tmp_list)
|
||||
|
||||
Reference in New Issue
Block a user