diff --git a/ChangeLog b/ChangeLog index 3cbc892a42..6638b574e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-12 Matthias Clasen + + * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the + previous change to this function, clarify the docs instead. + 2004-05-11 Michael Natterer Merged from HEAD: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3cbc892a42..6638b574e0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-05-12 Matthias Clasen + + * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the + previous change to this function, clarify the docs instead. + 2004-05-11 Michael Natterer Merged from HEAD: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3cbc892a42..6638b574e0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-05-12 Matthias Clasen + + * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the + previous change to this function, clarify the docs instead. + 2004-05-11 Michael Natterer Merged from HEAD: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3cbc892a42..6638b574e0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-05-12 Matthias Clasen + + * gtk/gtkuimanager.c (gtk_ui_manager_get_widget): Revert the + previous change to this function, clarify the docs instead. + 2004-05-11 Michael Natterer Merged from HEAD: diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index f9cbc07157..45f5eeafdf 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -690,6 +690,9 @@ gtk_ui_manager_get_accel_group (GtkUIManager *self) * the XML (e.g. <popup>) can be addressed by their XML element name * (e.g. "popup"). The root element ("/ui") can be omitted in the path. * + * Note that the widget found by following a path that ends in a <menu> + * element is the menuitem to which the menu is attached, not the menu itself. + * * Return value: the widget found by following the path, or %NULL if no widget * was found. * @@ -715,14 +718,7 @@ gtk_ui_manager_get_widget (GtkUIManager *self, if (node == NULL) return NULL; - if (NODE_INFO (node)->type == NODE_TYPE_MENU) - { - GtkWidget *proxy = NODE_INFO (node)->proxy; - - return gtk_menu_item_get_submenu (GTK_MENU_ITEM (proxy)); - } - else - return NODE_INFO (node)->proxy; + return NODE_INFO (node)->proxy; } static void