[gtk+] GtkMenuTracker: fix signal handler argument list

commit 8011d853e195bd783db8ec2110a7ecd93e65e237
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 dc6e5eb..46d87eb 100644
--- a/gtk/gtkmenutracker.c
+++ b/gtk/gtkmenutracker.c
@@ -220,14 +220,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]