[telepathy-gabble/master] Some small fixes to props
Danielle Madeley
danielle.madeley at collabora.co.uk
Fri Jan 15 08:30:45 PST 2010
---
src/muc-channel.c | 14 +++++++++-----
src/muc-factory.c | 8 ++------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/muc-channel.c b/src/muc-channel.c
index f03afe1..0642f7b 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -940,6 +940,10 @@ gabble_muc_channel_get_property (GObject *object,
break;
case PROP_TUBE:
g_value_set_object (value, priv->tube);
+ break;
+ case PROP_INVITATION_MESSAGE:
+ g_value_set_string (value, "");
+ break;
case PROP_INITIAL_CHANNELS:
g_value_set_boxed (value, priv->initial_channels);
break;
@@ -1151,7 +1155,7 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
"The message we were sent when invited; NULL if not invited or if "
"already processed",
NULL,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_INVITATION_MESSAGE,
param_spec);
@@ -1175,7 +1179,7 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
param_spec = g_param_spec_boxed ("initial-channels", "Initial Channels",
"The initial channels offered with this Conference",
TP_ARRAY_TYPE_OBJECT_PATH_LIST,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_INITIAL_CHANNELS,
param_spec);
@@ -1183,7 +1187,7 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
"Initial Invitee Handles",
"The handles of the Conference's initial invitees",
DBUS_TYPE_G_UINT_ARRAY,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_INITIAL_INVITEE_HANDLES,
param_spec);
@@ -1191,14 +1195,14 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
"Initial Invitee IDs",
"The identifiers of the Conference's initial invitees",
G_TYPE_STRV,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_INITIAL_INVITEE_IDS,
param_spec);
param_spec = g_param_spec_boolean ("supports-non-merges",
"Supports Non Merges",
"If true, this Conference can be created from less than two Channels",
- TRUE, G_PARAM_READABLE);
+ TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_SUPPORTS_NON_MERGES,
param_spec);
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 8f6eb8d..4c0b671 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -435,13 +435,12 @@ new_muc_channel (GabbleMucFactory *fac,
object_path = g_strdup_printf ("%s/MucChannel%u",
conn->object_path, handle);
+ initial_channels_array = g_ptr_array_new ();
if (initial_channels != NULL)
{
GHashTableIter iter;
gpointer key;
- initial_channels_array = g_ptr_array_sized_new (
- g_hash_table_size (initial_channels));
g_hash_table_iter_init (&iter, initial_channels);
while (g_hash_table_iter_next (&iter, &key, NULL))
{
@@ -470,10 +469,7 @@ new_muc_channel (GabbleMucFactory *fac,
g_hash_table_insert (priv->text_channels, GUINT_TO_POINTER (handle), chan);
g_free (object_path);
- if (initial_channels_array != NULL)
- {
- g_ptr_array_free (initial_channels_array, TRUE);
- }
+ g_ptr_array_free (initial_channels_array, TRUE);
if (_gabble_muc_channel_is_ready (chan))
muc_ready_cb (chan, fac);
--
1.5.6.5
More information about the telepathy-commits
mailing list