diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2013-01-16 14:47:30 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2013-01-16 14:50:47 +0000 |
commit | 2332f4c6c6445616672617b587addc7211d3e99a (patch) | |
tree | 7717c69e6454c3b11d987ede75116562b5e88a2a /telepathy-logger/log-store-xml.c | |
parent | 586e2c4b847e8c39a01b648ab24e4cbd44dae67d (diff) | |
download | telepathy-logger-2332f4c6c6445616672617b587addc7211d3e99a.tar.gz |
Split legacy Empathy log reader into its own class
My commit eaefb26 introduced a regression: by assuming that any class
that implements add_event is writable, logs were being written to the
legacy Empathy location.
By splitting the legacy location handling into a subclass, we can
override add_event to un-implement it and make the subclass read-only,
as well as removing special cases from the XML store itself.
Thanks to Debarshi Ray for catching this!
Diffstat (limited to 'telepathy-logger/log-store-xml.c')
-rw-r--r-- | telepathy-logger/log-store-xml.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c index f9edc22..72d2c4b 100644 --- a/telepathy-logger/log-store-xml.c +++ b/telepathy-logger/log-store-xml.c @@ -79,7 +79,6 @@ struct _TplLogStoreXmlPriv { gchar *basedir; - gboolean empathy_legacy; gboolean test_mode; TpAccountManager *account_manager; }; @@ -88,7 +87,6 @@ enum { PROP_0, PROP_READABLE, PROP_BASEDIR, - PROP_EMPATHY_LEGACY, PROP_TESTMODE }; @@ -159,9 +157,6 @@ tpl_log_store_xml_get_property (GObject *object, case PROP_BASEDIR: g_value_set_string (value, priv->basedir); break; - case PROP_EMPATHY_LEGACY: - g_value_set_boolean (value, priv->empathy_legacy); - break; case PROP_TESTMODE: g_value_set_boolean (value, priv->test_mode); break; @@ -182,9 +177,6 @@ tpl_log_store_xml_set_property (GObject *object, switch (param_id) { - case PROP_EMPATHY_LEGACY: - self->priv->empathy_legacy = g_value_get_boolean (value); - break; case PROP_BASEDIR: log_store_xml_set_basedir (self, g_value_get_string (value)); break; @@ -223,20 +215,6 @@ _tpl_log_store_xml_class_init (TplLogStoreXmlClass *klass) G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_BASEDIR, param_spec); - /** - * TplLogStoreXml:empathy-legacy: - * - * If %TRUE, the logstore pointed by TplLogStoreXml::base-dir will be - * considered formatted as an Empathy's LogStore (pre telepathy-logger). - * Xml: %FALSE. - */ - param_spec = g_param_spec_boolean ("empathy-legacy", - "EmpathyLegacy", - "Enables compatibility with old Empathy's logs", - FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_EMPATHY_LEGACY, - param_spec); - param_spec = g_param_spec_boolean ("testmode", "TestMode", "Whether the logstore is in testmode, for testsuite use only", @@ -1745,10 +1723,7 @@ log_store_xml_get_name (TplLogStore *store) g_return_val_if_fail (TPL_IS_LOG_STORE_XML (self), NULL); - if (self->priv->empathy_legacy) - return "Empathy"; - else - return "TpLogger"; + return "TpLogger"; } |