diff options
author | Ted Gould <ted@gould.cx> | 2010-04-15 00:54:44 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-04-15 00:54:44 -0500 |
commit | e4a3d964d9c5b57fe1f3488459545212891732b0 (patch) | |
tree | a72a3e8bc4852f80ab380fa72f4e6d0bf685d96f | |
parent | 9931bb8eddce86cae0896285b19a5830079923b8 (diff) | |
download | libdbusmenu-e4a3d964d9c5b57fe1f3488459545212891732b0.tar.gz libdbusmenu-e4a3d964d9c5b57fe1f3488459545212891732b0.tar.bz2 libdbusmenu-e4a3d964d9c5b57fe1f3488459545212891732b0.zip |
Making every insertion now use the realized position. It HAS to be one of these.
-rw-r--r-- | libdbusmenu-gtk/client.c | 4 | ||||
-rw-r--r-- | libdbusmenu-gtk/menu.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index eabfa9b..b13af6a 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -335,7 +335,7 @@ new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, Dbus } GtkMenuItem * childmi = dbusmenu_gtkclient_menuitem_get(gtkclient, child); - gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), position); + gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), dbusmenu_menuitem_get_position_realized(child, mi)); gtk_widget_show(GTK_WIDGET(menu)); return; @@ -373,7 +373,7 @@ move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint ol } GtkMenuItem * childmi = dbusmenu_gtkclient_menuitem_get(gtkclient, child); - gtk_menu_reorder_child(GTK_MENU(ann_menu), GTK_WIDGET(childmi), new); + gtk_menu_reorder_child(GTK_MENU(ann_menu), GTK_WIDGET(childmi), dbusmenu_menuitem_get_position_realized(child, mi)); return; } diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c index 409b7ed..4fa546b 100644 --- a/libdbusmenu-gtk/menu.c +++ b/libdbusmenu-gtk/menu.c @@ -237,7 +237,7 @@ root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint posit GtkMenuItem * mi = dbusmenu_gtkclient_menuitem_get(priv->client, child); if (mi != NULL) { GtkWidget * item = GTK_WIDGET(mi); - gtk_menu_insert(GTK_MENU(menu), item, position); + gtk_menu_insert(GTK_MENU(menu), item, dbusmenu_menuitem_get_position_realized(child, root)); #ifdef MASSIVEDEBUGGING menu_pos_t menu_pos; menu_pos.mi = mi; @@ -260,7 +260,7 @@ root_child_moved (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint newpo g_debug("Root child moved"); #endif DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu); - gtk_menu_reorder_child(GTK_MENU(menu), GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)), newposition); + gtk_menu_reorder_child(GTK_MENU(menu), GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)), dbusmenu_menuitem_get_position_realized(child, root)); return; } |