summaryrefslogtreecommitdiff
path: root/gtk/gtkaccelgroup.c
diff options
context:
space:
mode:
authorMartyn James Russell <mr@src.gnome.org>2008-06-20 14:45:54 +0000
committerMartyn James Russell <mr@src.gnome.org>2008-06-20 14:45:54 +0000
commit7e374415b6c126824376b1dd7a9923502d2b38c8 (patch)
tree508a34d36fadaa34ba5aab8b899ce742d8281b19 /gtk/gtkaccelgroup.c
parent90bc8940c8b4715231bf9703531d825bb69d6e0d (diff)
downloadgtk+-7e374415b6c126824376b1dd7a9923502d2b38c8.tar.gz
Don't call g_object_notify() with properties that don't exist. Also, make
* gtk/gtkaccelgroup.c: Don't call g_object_notify() with properties that don't exist. Also, make sure we notify for the "is-locked" property. svn path=/trunk/; revision=20650
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r--gtk/gtkaccelgroup.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index b41002b5f3..fb17d79ff6 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -266,7 +266,6 @@ accel_group_weak_ref_detach (GSList *free_list,
accel_group = slist->data;
accel_group->acceleratables = g_slist_remove (accel_group->acceleratables, stale_object);
g_object_unref (accel_group);
- g_object_notify (G_OBJECT (accel_group), "acceleratables");
}
g_slist_free (free_list);
g_object_set_qdata (stale_object, quark_acceleratable_groups, NULL);
@@ -294,7 +293,6 @@ _gtk_accel_group_attach (GtkAccelGroup *accel_group,
g_object_weak_ref (object,
(GWeakNotify) accel_group_weak_ref_detach,
slist);
- g_object_notify (G_OBJECT (accel_group), "acceleratables");
}
void
@@ -318,7 +316,6 @@ _gtk_accel_group_detach (GtkAccelGroup *accel_group,
g_object_weak_ref (object,
(GWeakNotify) accel_group_weak_ref_detach,
slist);
- g_object_notify (G_OBJECT (accel_group), "acceleratables");
g_object_unref (accel_group);
}
@@ -395,7 +392,10 @@ gtk_accel_group_lock (GtkAccelGroup *accel_group)
accel_group->lock_count += 1;
- g_object_notify (G_OBJECT (accel_group), "lock-count");
+ if (accel_group->lock_count == 1) {
+ /* State change from unlocked to locked */
+ g_object_notify (accel_group, "is-locked");
+ }
}
/**
@@ -412,7 +412,10 @@ gtk_accel_group_unlock (GtkAccelGroup *accel_group)
accel_group->lock_count -= 1;
- g_object_notify (G_OBJECT (accel_group), "lock-count");
+ if (accel_group->lock_count < 1) {
+ /* State change from locked to unlocked */
+ g_object_notify (accel_group, "is-locked");
+ }
}
static void
@@ -465,7 +468,6 @@ quick_accel_add (GtkAccelGroup *accel_group,
accel_group->priv_accels[pos].closure = g_closure_ref (closure);
accel_group->priv_accels[pos].accel_path_quark = path_quark;
g_closure_sink (closure);
- g_object_notify (G_OBJECT (accel_group), "priv-accels");
/* handle closure invalidation and reverse lookups */
g_closure_add_invalidate_notifier (closure, accel_group, accel_closure_invalidate);