GtkMenuTracker: fix signal handler argument list

The signal handler for the visibility of menu items changing had the
wrong signature, resulting in the GParamSpec from the notify signal
being treated as a boolean (which was always true).  This resulted in
items being added over and over and never being removed.

Fix that...
This commit is contained in:
Ryan Lortie
2014-06-05 08:28:48 -04:00
parent dc9d8e9202
commit f15f13a0fb

View File

@@ -219,14 +219,17 @@ gtk_menu_tracker_section_sync_separators (GtkMenuTrackerSection *section,
static void
gtk_menu_tracker_item_visibility_changed (GtkMenuTrackerItem *item,
gboolean is_now_visible,
GParamSpec *pspec,
gpointer user_data)
{
GtkMenuTracker *tracker = user_data;
GtkMenuTrackerSection *section;
gboolean is_now_visible;
gboolean was_visible;
gint offset = 0;
is_now_visible = gtk_menu_tracker_item_get_is_visible (item);
/* remember: the item is our model */
section = gtk_menu_tracker_section_find_model (tracker->toplevel, item, &offset);