Commit 160ea46d authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

queue a draw on the parent_menu_item of this menu item's menu, to enable

2007-01-29  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenuitem.c (gtk_menu_item_select)
	(gtk_menu_item_deselect): queue a draw on the parent_menu_item of
	this menu item's menu, to enable themeing menu items depending on
	whether something is selected in their submenu (patch taken from
	maemo-gtk).


svn path=/trunk/; revision=17234
parent 94eb8c9b
2007-01-29 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenuitem.c (gtk_menu_item_select)
(gtk_menu_item_deselect): queue a draw on the parent_menu_item of
this menu item's menu, to enable themeing menu items depending on
whether something is selected in their submenu (patch taken from
maemo-gtk).
2007-01-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktoolbar.c: Reinstate gtk_toolbar_content_new_compatibility()
......
......@@ -385,16 +385,38 @@ void
gtk_menu_item_select (GtkMenuItem *menu_item)
{
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
gtk_item_select (GTK_ITEM (menu_item));
/* Enable themeing of the parent menu item depending on whether
* something is selected in its submenu
*/
if (GTK_IS_MENU (GTK_WIDGET (menu_item)->parent))
{
GtkMenu *menu = GTK_MENU (GTK_WIDGET (menu_item)->parent);
if (menu->parent_menu_item)
gtk_widget_queue_draw (GTK_WIDGET (menu->parent_menu_item));
}
}
void
gtk_menu_item_deselect (GtkMenuItem *menu_item)
{
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
gtk_item_deselect (GTK_ITEM (menu_item));
/* Enable themeing of the parent menu item depending on whether
* something is selected in its submenu
*/
if (GTK_IS_MENU (GTK_WIDGET (menu_item)->parent))
{
GtkMenu *menu = GTK_MENU (GTK_WIDGET (menu_item)->parent);
if (menu->parent_menu_item)
gtk_widget_queue_draw (GTK_WIDGET (menu->parent_menu_item));
}
}
void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment