[libgsf] GsfInput: make container a property.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] GsfInput: make container a property.
- Date: Fri, 8 Mar 2013 15:31:39 +0000 (UTC)
commit 0acb38026fc7994073475fde767d0ad7e4cb9f4e
Author: Morten Welinder <terra gnome org>
Date: Fri Mar 8 08:56:24 2013 -0500
GsfInput: make container a property.
gsf/gsf-input.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/gsf/gsf-input.c b/gsf/gsf-input.c
index aeb1c4b..cca368c 100644
--- a/gsf/gsf-input.c
+++ b/gsf/gsf-input.c
@@ -48,7 +48,8 @@ enum {
PROP_EOF,
PROP_REMAINING,
PROP_POS,
- PROP_MODTIME
+ PROP_MODTIME,
+ PROP_CONTAINER
};
static void
@@ -80,6 +81,9 @@ gsf_input_get_property (GObject *object,
case PROP_MODTIME:
g_value_set_boxed (value, gsf_input_get_modtime (input));
break;
+ case PROP_CONTAINER:
+ g_value_set_object (value, input->container);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -204,6 +208,20 @@ gsf_input_class_init (GObjectClass *gobject_class)
G_TYPE_DATE_TIME,
GSF_PARAM_STATIC |
G_PARAM_READABLE));
+
+ /**
+ * GsfInput:container:
+ *
+ * The container, optionally %NULL, in which this input lives.
+ */
+ g_object_class_install_property
+ (gobject_class, PROP_CONTAINER,
+ g_param_spec_object ("container",
+ _("Container"),
+ _("The parent GsfInfile"),
+ GSF_INFILE_TYPE,
+ GSF_PARAM_STATIC |
+ G_PARAM_READABLE));
}
GSF_CLASS_ABSTRACT (GsfInput, gsf_input,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]