forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
94eb8c9b15
commit
160ea46dba
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user