[libdazzle] properties-group: implement action removal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] properties-group: implement action removal
- Date: Fri, 7 Jul 2017 21:12:55 +0000 (UTC)
commit 3379030e8c908c7b3323dcb3053716faade96ce0
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 7 14:12:40 2017 -0700
properties-group: implement action removal
src/actions/dzl-properties-group.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/actions/dzl-properties-group.c b/src/actions/dzl-properties-group.c
index 16d7db2..c00816b 100644
--- a/src/actions/dzl-properties-group.c
+++ b/src/actions/dzl-properties-group.c
@@ -749,4 +749,18 @@ dzl_properties_group_remove (DzlPropertiesGroup *self,
{
g_return_if_fail (DZL_IS_PROPERTIES_GROUP (self));
g_return_if_fail (name != NULL);
+
+ name = g_intern_string (name);
+
+ for (guint i = 0; i < self->mappings->len; i++)
+ {
+ const Mapping *mapping = &g_array_index (self->mappings, Mapping, i);
+
+ if (mapping->action_name == name)
+ {
+ g_array_remove_index_fast (self->mappings, i);
+ g_action_group_action_removed (G_ACTION_GROUP (self), name);
+ break;
+ }
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]