[libdazzle] menu-button: remove proper menu position



commit 237359074ba3975fe8a698e7afae8d88799600b2
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 10 16:03:56 2017 -0700

    menu-button: remove proper menu position
    
    The next item is always shifted down, so keep removing the
    same position index.

 src/menus/dzl-menu-button.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/menus/dzl-menu-button.c b/src/menus/dzl-menu-button.c
index c900f6c..ce81635 100644
--- a/src/menus/dzl-menu-button.c
+++ b/src/menus/dzl-menu-button.c
@@ -130,7 +130,8 @@ dzl_menu_button_items_changed (DzlMenuButton *self,
 
   for (guint i = 0; i < removed; i++)
     {
-      GtkWidget *child = dzl_box_get_nth_child (priv->popover_box, i);
+      GtkWidget *child = dzl_box_get_nth_child (priv->popover_box, position);
+
       gtk_widget_destroy (child);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]