[gtk+/gtk-3-12] GtkMenuTracker: fix signal handler argument list

commit f15f13a0fb9ef0f362c44d300bae48e2c1946dfe
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Jun 5 08:28:48 2014 -0400

    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...

 gtk/gtkmenutracker.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/gtk/gtkmenutracker.c b/gtk/gtkmenutracker.c
index 86ee9fc..6a1fb67 100644
--- a/gtk/gtkmenutracker.c
+++ b/gtk/gtkmenutracker.c
@@ -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);

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