[gnome-builder] libide/tweaks: remove id property
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/tweaks: remove id property
- Date: Sun, 31 Jul 2022 12:01:45 +0000 (UTC)
commit 2def7a245c140c30853b8a817a2645337357a87c
Author: Christian Hergert <chergert redhat com>
Date: Sun Jul 31 04:18:07 2022 -0700
libide/tweaks: remove id property
We don't need this as we will rely on GtkBuildable for ids.
src/libide/tweaks/ide-tweaks-item.c | 37 -------------------------------------
src/libide/tweaks/ide-tweaks-item.h | 5 -----
2 files changed, 42 deletions(-)
---
diff --git a/src/libide/tweaks/ide-tweaks-item.c b/src/libide/tweaks/ide-tweaks-item.c
index ba1d5b610..79f2209c9 100644
--- a/src/libide/tweaks/ide-tweaks-item.c
+++ b/src/libide/tweaks/ide-tweaks-item.c
@@ -32,14 +32,12 @@ typedef struct
IdeTweaksItem *parent;
GList link;
GQueue children;
- char *id;
char **keywords;
char *sort_key;
} IdeTweaksItemPrivate;
enum {
PROP_0,
- PROP_ID,
PROP_KEYWORDS,
PROP_SORT_KEY,
N_PROPS
@@ -74,7 +72,6 @@ ide_tweaks_item_dispose (GObject *object)
g_clear_pointer (&priv->keywords, g_strfreev);
g_clear_pointer (&priv->sort_key, g_free);
- g_clear_pointer (&priv->id, g_free);
G_OBJECT_CLASS (ide_tweaks_item_parent_class)->dispose (object);
}
@@ -97,10 +94,6 @@ ide_tweaks_item_get_property (GObject *object,
g_value_set_string (value, ide_tweaks_item_get_sort_key (self));
break;
- case PROP_ID:
- g_value_set_string (value, ide_tweaks_item_get_id (self));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -124,10 +117,6 @@ ide_tweaks_item_set_property (GObject *object,
ide_tweaks_item_set_sort_key (self, g_value_get_string (value));
break;
- case PROP_ID:
- ide_tweaks_item_set_id (self, g_value_get_string (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -142,10 +131,6 @@ ide_tweaks_item_class_init (IdeTweaksItemClass *klass)
object_class->get_property = ide_tweaks_item_get_property;
object_class->set_property = ide_tweaks_item_set_property;
- properties [PROP_ID] =
- g_param_spec_string ("id", NULL, NULL, NULL,
- (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
-
properties [PROP_KEYWORDS] =
g_param_spec_boxed ("keywords", NULL, NULL,
G_TYPE_STRV,
@@ -177,28 +162,6 @@ ide_tweaks_item_accepts (IdeTweaksItem *self,
return FALSE;
}
-const char *
-ide_tweaks_item_get_id (IdeTweaksItem *self)
-{
- IdeTweaksItemPrivate *priv = ide_tweaks_item_get_instance_private (self);
-
- g_return_val_if_fail (IDE_IS_TWEAKS_ITEM (self), NULL);
-
- return priv->id;
-}
-
-void
-ide_tweaks_item_set_id (IdeTweaksItem *self,
- const char *id)
-{
- IdeTweaksItemPrivate *priv = ide_tweaks_item_get_instance_private (self);
-
- g_return_if_fail (IDE_IS_TWEAKS_ITEM (self));
-
- if (ide_set_string (&priv->id, id))
- g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ID]);
-}
-
const char * const *
ide_tweaks_item_get_keywords (IdeTweaksItem *self)
{
diff --git a/src/libide/tweaks/ide-tweaks-item.h b/src/libide/tweaks/ide-tweaks-item.h
index eeccab0d6..0335d29ff 100644
--- a/src/libide/tweaks/ide-tweaks-item.h
+++ b/src/libide/tweaks/ide-tweaks-item.h
@@ -41,11 +41,6 @@ struct _IdeTweaksItemClass
IdeTweaksItem *child);
};
-IDE_AVAILABLE_IN_ALL
-const char *ide_tweaks_item_get_id (IdeTweaksItem *self);
-IDE_AVAILABLE_IN_ALL
-void ide_tweaks_item_set_id (IdeTweaksItem *self,
- const char *id);
IDE_AVAILABLE_IN_ALL
const char * const *ide_tweaks_item_get_keywords (IdeTweaksItem *self);
IDE_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]