summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-08-20 16:00:14 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-12-14 18:36:53 -0500
commit2f9e88b664e57b833d8af403d03406318a737b0b (patch)
tree53f749fd75c7e5fd5f577a3e793392579134f229
parentbd6608036a3bec20abf6ca6b6477f23cea2547f3 (diff)
downloadgtk+-2f9e88b664e57b833d8af403d03406318a737b0b.tar.gz
GtkMenuTracker: one more visibility tweak
On creation, we call action_removed() in case the action was missing from the start. Because we just created the action, 'can_activate' will always be FALSE here and this function will therefore always do nothing. We do want the visibility state to be updated though, for the case where the action is missing but the item should still be visible from the start. Update the visibility directly instead of trying to call action_removed(). https://bugzilla.gnome.org/show_bug.cgi?id=735122
-rw-r--r--gtk/gtkmenutrackeritem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtkmenutrackeritem.c b/gtk/gtkmenutrackeritem.c
index a815d330c4..b9185def48 100644
--- a/gtk/gtkmenutrackeritem.c
+++ b/gtk/gtkmenutrackeritem.c
@@ -548,10 +548,9 @@ _gtk_menu_tracker_item_new (GtkActionObservable *observable,
else
{
GTK_NOTE(ACTIONS, g_message ("menutracker: %s missing from the start", action_name));
- gtk_menu_tracker_item_action_removed (GTK_ACTION_OBSERVER (self), observable, NULL);
+ gtk_menu_tracker_item_update_visibility (self);
}
-
if (state)
g_variant_unref (state);
}