summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-09-27 12:23:14 -0400
committerWill Thompson <will.thompson@collabora.co.uk>2012-09-27 12:23:14 -0400
commit47a6af11fde8599b09eb36ec003935e40661f55e (patch)
tree775b34b413db9d90b05f762f89544b7eff6c409d
parent42411a31bc114ddb3fa6834c124e71a86f1d50f9 (diff)
parent6d4d216f4a54b70a2cb986be436ed0ffaf90efc8 (diff)
downloadtelepathy-logger-47a6af11fde8599b09eb36ec003935e40661f55e.tar.gz
Merge branch 'cleanup'
https://bugs.freedesktop.org/show_bug.cgi?id=55338
-rw-r--r--.gitignore1
-rw-r--r--telepathy-logger/log-manager.c75
-rw-r--r--telepathy-logger/log-store-pidgin.c66
-rw-r--r--telepathy-logger/log-store-sqlite.c33
-rw-r--r--telepathy-logger/log-store-xml.c68
-rw-r--r--telepathy-logger/log-store.c50
-rw-r--r--tests/dbus/test-tpl-log-iter-pidgin.c1
-rw-r--r--tests/dbus/test-tpl-log-iter-xml.c1
-rw-r--r--tests/dbus/test-tpl-log-store-pidgin.c11
-rw-r--r--tests/dbus/test-tpl-log-store-xml.c1
10 files changed, 50 insertions, 257 deletions
diff --git a/.gitignore b/.gitignore
index e0f2d86..48a9667 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
Makefile
Makefile.in
tags
+cscope.out
# Autotools and other top-level cruft
/ChangeLog
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c
index 642e3f9..f3f1795 100644
--- a/telepathy-logger/log-manager.c
+++ b/telepathy-logger/log-manager.c
@@ -186,22 +186,11 @@ tpl_log_manager_class_init (TplLogManagerClass *klass)
}
-static TplLogStore *
+static void
add_log_store (TplLogManager *self,
- GType type,
- const char *name,
- gboolean readable,
- gboolean writable)
+ TplLogStore *store)
{
- TplLogStore *store;
-
- g_return_val_if_fail (g_type_is_a (type, TPL_TYPE_LOG_STORE), NULL);
-
- store = g_object_new (type,
- "name", name,
- "readable", readable,
- "writable", writable,
- NULL);
+ g_return_if_fail (TPL_IS_LOG_STORE (store));
/* set the log store in "testmode" if it supports it and the environment is
* currently in test mode */
@@ -210,16 +199,12 @@ add_log_store (TplLogManager *self,
"testmode", (g_getenv ("TPL_TEST_MODE") != NULL),
NULL);
- if (store == NULL)
- CRITICAL ("Error creating %s (name=%s)", g_type_name (type), name);
- else if (!_tpl_log_manager_register_log_store (self, store))
- CRITICAL ("Failed to register store name=%s", name);
-
- if (store != NULL)
- /* drop the initial ref */
- g_object_unref (store);
+ if (!_tpl_log_manager_register_log_store (self, store))
+ CRITICAL ("Failed to register store name=%s",
+ _tpl_log_store_get_name (store));
- return store;
+ /* drop the initial ref */
+ g_object_unref (store);
}
@@ -276,7 +261,6 @@ _list_of_date_free (gpointer data)
static void
tpl_log_manager_init (TplLogManager *self)
{
- TplLogStore *store;
TplLogManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
TPL_TYPE_LOG_MANAGER, TplLogManagerPriv);
@@ -290,17 +274,24 @@ tpl_log_manager_init (TplLogManager *self)
G_CALLBACK (_globally_enabled_changed), NULL);
/* The TPL's default read-write logstore */
- add_log_store (self, TPL_TYPE_LOG_STORE_XML, "TpLogger", TRUE, TRUE);
+ add_log_store (self,
+ g_object_new (TPL_TYPE_LOG_STORE_XML,
+ NULL));
/* Load by default the Empathy's legacy 'past coversations' LogStore */
- store = add_log_store (self, TPL_TYPE_LOG_STORE_XML, "Empathy", TRUE, FALSE);
- if (store != NULL)
- g_object_set (store, "empathy-legacy", TRUE, NULL);
+ add_log_store (self,
+ g_object_new (TPL_TYPE_LOG_STORE_XML,
+ "empathy-legacy", TRUE,
+ NULL));
- add_log_store (self, TPL_TYPE_LOG_STORE_PIDGIN, "Pidgin", TRUE, FALSE);
+ add_log_store (self,
+ g_object_new (TPL_TYPE_LOG_STORE_PIDGIN,
+ NULL));
/* Load the event counting cache */
- add_log_store (self, TPL_TYPE_LOG_STORE_SQLITE, "Sqlite", FALSE, TRUE);
+ add_log_store (self,
+ g_object_new (TPL_TYPE_LOG_STORE_SQLITE,
+ NULL));
DEBUG ("Log Manager initialised");
}
@@ -324,13 +315,8 @@ tpl_log_manager_dup_singleton (void)
* @event: a TplEvent subclass's instance
* @error: the memory location of GError, filled if an error occurs
*
- * It stores @event, sending it to all the registered TplLogStore which have
- * TplLogStore:writable set to %TRUE.
- * Every TplLogManager is guaranteed to have at least a readable
- * and a writable TplLogStore regitered.
- *
- * It applies for any registered TplLogStore with #TplLogstore:writable property
- * %TRUE
+ * It stores @event, sending it to all the writable registered #TplLogStore objects.
+ * (Every TplLogManager is guaranteed to have at least one writable log store.)
*
* Returns: %TRUE if the event has been successfully added, otherwise %FALSE.
*/
@@ -394,9 +380,6 @@ _tpl_log_manager_add_event (TplLogManager *manager,
* It registers @logstore into @manager, the log store has to be an
* implementation of the TplLogStore interface.
*
- * @logstore has to properly implement the add_event method if the
- * #TplLogStore:writable is set to %TRUE.
- *
* @logstore has to properly implement all the search/query methods if the
* TplLogStore:readable is set to %TRUE.
*/
@@ -405,8 +388,8 @@ _tpl_log_manager_register_log_store (TplLogManager *self,
TplLogStore *logstore)
{
TplLogManagerPriv *priv = self->priv;
+ const gchar *name = _tpl_log_store_get_name (logstore);
GList *l;
- gboolean found = FALSE;
g_return_val_if_fail (TPL_IS_LOG_MANAGER (self), FALSE);
g_return_val_if_fail (TPL_IS_LOG_STORE (logstore), FALSE);
@@ -415,19 +398,13 @@ _tpl_log_manager_register_log_store (TplLogManager *self,
for (l = priv->stores; l != NULL; l = g_list_next (l))
{
TplLogStore *store = l->data;
- const gchar *name = _tpl_log_store_get_name (logstore);
if (!tp_strdiff (name, _tpl_log_store_get_name (store)))
{
- found = TRUE;
- break;
+ DEBUG ("name=%s: already registered", name);
+ return FALSE;
}
}
- if (found)
- {
- DEBUG ("name=%s: already registered", _tpl_log_store_get_name (logstore));
- return FALSE;
- }
if (_tpl_log_store_is_readable (logstore))
priv->readable_stores = g_list_prepend (priv->readable_stores, logstore);
diff --git a/telepathy-logger/log-store-pidgin.c b/telepathy-logger/log-store-pidgin.c
index 169acd6..9c60a81 100644
--- a/telepathy-logger/log-store-pidgin.c
+++ b/telepathy-logger/log-store-pidgin.c
@@ -39,6 +39,8 @@
#define DEBUG_FLAG TPL_DEBUG_LOG_STORE
#include "debug-internal.h"
+#define TPL_LOG_STORE_PIDGIN_NAME "Pidgin"
+
#define TXT_LOG_FILENAME_SUFFIX ".txt"
#define HTML_LOG_FILENAME_SUFFIX ".html"
@@ -47,16 +49,11 @@ struct _TplLogStorePidginPriv
gboolean test_mode;
gchar *basedir;
- gchar *name;
- gboolean readable;
- gboolean writable;
};
enum {
PROP_0,
- PROP_NAME,
PROP_READABLE,
- PROP_WRITABLE,
PROP_BASEDIR,
PROP_TESTMODE,
};
@@ -69,12 +66,9 @@ static void tpl_log_store_pidgin_get_property (GObject *object, guint param_id,
static void tpl_log_store_pidgin_set_property (GObject *object, guint param_id, const GValue *value,
GParamSpec *pspec);
static const gchar *log_store_pidgin_get_name (TplLogStore *store);
-static void log_store_pidgin_set_name (TplLogStorePidgin *self, const gchar *data);
static const gchar *log_store_pidgin_get_basedir (TplLogStorePidgin *self);
static void log_store_pidgin_set_basedir (TplLogStorePidgin *self,
const gchar *data);
-static void log_store_pidgin_set_writable (TplLogStorePidgin *self, gboolean data);
-static void log_store_pidgin_set_readable (TplLogStorePidgin *self, gboolean data);
G_DEFINE_TYPE_WITH_CODE (TplLogStorePidgin, tpl_log_store_pidgin,
@@ -91,14 +85,8 @@ tpl_log_store_pidgin_get_property (GObject *object,
switch (param_id)
{
- case PROP_NAME:
- g_value_set_string (value, priv->name);
- break;
- case PROP_WRITABLE:
- g_value_set_boolean (value, priv->writable);
- break;
case PROP_READABLE:
- g_value_set_boolean (value, priv->readable);
+ g_value_set_boolean (value, TRUE);
break;
case PROP_BASEDIR:
g_value_set_string (value, priv->basedir);
@@ -123,15 +111,6 @@ tpl_log_store_pidgin_set_property (GObject *object,
switch (param_id)
{
- case PROP_NAME:
- log_store_pidgin_set_name (self, g_value_get_string (value));
- break;
- case PROP_READABLE:
- log_store_pidgin_set_readable (self, g_value_get_boolean (value));
- break;
- case PROP_WRITABLE:
- log_store_pidgin_set_writable (self, g_value_get_boolean (value));
- break;
case PROP_BASEDIR:
log_store_pidgin_set_basedir (self, g_value_get_string (value));
break;
@@ -153,9 +132,6 @@ tpl_log_store_pidgin_dispose (GObject *self)
g_free (priv->basedir);
priv->basedir = NULL;
- g_free (priv->name);
- priv->name = NULL;
-
G_OBJECT_CLASS (tpl_log_store_pidgin_parent_class)->dispose (self);
}
@@ -170,9 +146,7 @@ tpl_log_store_pidgin_class_init (TplLogStorePidginClass *klass)
object_class->set_property = tpl_log_store_pidgin_set_property;
object_class->dispose = tpl_log_store_pidgin_dispose;
- g_object_class_override_property (object_class, PROP_NAME, "name");
g_object_class_override_property (object_class, PROP_READABLE, "readable");
- g_object_class_override_property (object_class, PROP_WRITABLE, "writable");
/**
* TplLogStorePidgin:basedir:
@@ -213,7 +187,7 @@ log_store_pidgin_get_name (TplLogStore *store)
g_return_val_if_fail (TPL_IS_LOG_STORE_PIDGIN (self), NULL);
- return self->priv->name;
+ return TPL_LOG_STORE_PIDGIN_NAME;
}
@@ -245,18 +219,6 @@ log_store_pidgin_get_basedir (TplLogStorePidgin *self)
static void
-log_store_pidgin_set_name (TplLogStorePidgin *self,
- const gchar *data)
-{
- g_return_if_fail (TPL_IS_LOG_STORE_PIDGIN (self));
- g_return_if_fail (!TPL_STR_EMPTY (data));
- g_return_if_fail (self->priv->name == NULL);
-
- self->priv->name = g_strdup (data);
-}
-
-
-static void
log_store_pidgin_set_basedir (TplLogStorePidgin *self,
const gchar *data)
{
@@ -273,26 +235,6 @@ log_store_pidgin_set_basedir (TplLogStorePidgin *self,
}
-static void
-log_store_pidgin_set_readable (TplLogStorePidgin *self,
- gboolean data)
-{
- g_return_if_fail (TPL_IS_LOG_STORE_PIDGIN (self));
-
- self->priv->readable = data;
-}
-
-
-static void
-log_store_pidgin_set_writable (TplLogStorePidgin *self,
- gboolean data)
-{
- g_return_if_fail (TPL_IS_LOG_STORE_PIDGIN (self));
-
- self->priv->writable = data;
-}
-
-
/* internal: get the full name of the storing directory, including protocol
* and id */
static gchar *
diff --git a/telepathy-logger/log-store-sqlite.c b/telepathy-logger/log-store-sqlite.c
index 1c0f11f..0cb74e3 100644
--- a/telepathy-logger/log-store-sqlite.c
+++ b/telepathy-logger/log-store-sqlite.c
@@ -49,9 +49,7 @@ G_DEFINE_TYPE_WITH_CODE (TplLogStoreSqlite, _tpl_log_store_sqlite,
enum /* properties */
{
PROP_0,
- PROP_NAME,
PROP_READABLE,
- PROP_WRITABLE
};
struct _TplLogStoreSqlitePrivate
@@ -104,39 +102,11 @@ tpl_log_store_sqlite_get_property (GObject *self,
{
switch (id)
{
- case PROP_NAME:
- g_value_set_string (value, TPL_LOG_STORE_SQLITE_NAME);
- break;
-
case PROP_READABLE:
/* this store should never be queried by the LogManager */
g_value_set_boolean (value, FALSE);
break;
- case PROP_WRITABLE:
- g_value_set_boolean (value, TRUE);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (self, id, pspec);
- break;
- }
-}
-
-
-static void
-tpl_log_store_sqlite_set_property (GObject *self,
- guint id,
- const GValue *value,
- GParamSpec *pspec)
-{
- switch (id)
- {
- case PROP_NAME:
- case PROP_READABLE:
- case PROP_WRITABLE:
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (self, id, pspec);
break;
@@ -320,12 +290,9 @@ _tpl_log_store_sqlite_class_init (TplLogStoreSqliteClass *klass)
gobject_class->constructor = tpl_log_store_sqlite_constructor;
gobject_class->get_property = tpl_log_store_sqlite_get_property;
- gobject_class->set_property = tpl_log_store_sqlite_set_property;
gobject_class->dispose = tpl_log_store_sqlite_dispose;
- g_object_class_override_property (gobject_class, PROP_NAME, "name");
g_object_class_override_property (gobject_class, PROP_READABLE, "readable");
- g_object_class_override_property (gobject_class, PROP_WRITABLE, "writable");
g_type_class_add_private (gobject_class, sizeof (TplLogStoreSqlitePrivate));
}
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c
index 83a39a3..a723964 100644
--- a/telepathy-logger/log-store-xml.c
+++ b/telepathy-logger/log-store-xml.c
@@ -79,9 +79,6 @@
struct _TplLogStoreXmlPriv
{
gchar *basedir;
- gchar *name;
- gboolean readable;
- gboolean writable;
gboolean empathy_legacy;
gboolean test_mode;
TpAccountManager *account_manager;
@@ -89,9 +86,7 @@ struct _TplLogStoreXmlPriv
enum {
PROP_0,
- PROP_NAME,
PROP_READABLE,
- PROP_WRITABLE,
PROP_BASEDIR,
PROP_EMPATHY_LEGACY,
PROP_TESTMODE
@@ -103,12 +98,9 @@ static void tpl_log_store_xml_get_property (GObject *object, guint param_id, GVa
static void tpl_log_store_xml_set_property (GObject *object, guint param_id, const GValue *value,
GParamSpec *pspec);
static const gchar *log_store_xml_get_name (TplLogStore *store);
-static void log_store_xml_set_name (TplLogStoreXml *self, const gchar *data);
static const gchar *log_store_xml_get_basedir (TplLogStoreXml *self);
static void log_store_xml_set_basedir (TplLogStoreXml *self,
const gchar *data);
-static void log_store_xml_set_writable (TplLogStoreXml *self, gboolean data);
-static void log_store_xml_set_readable (TplLogStoreXml *self, gboolean data);
G_DEFINE_TYPE_WITH_CODE (TplLogStoreXml, _tpl_log_store_xml,
@@ -149,11 +141,6 @@ log_store_xml_finalize (GObject *object)
g_free (priv->basedir);
priv->basedir = NULL;
}
- if (priv->name != NULL)
- {
- g_free (priv->name);
- priv->name = NULL;
- }
}
@@ -167,14 +154,8 @@ tpl_log_store_xml_get_property (GObject *object,
switch (param_id)
{
- case PROP_NAME:
- g_value_set_string (value, priv->name);
- break;
- case PROP_WRITABLE:
- g_value_set_boolean (value, priv->writable);
- break;
case PROP_READABLE:
- g_value_set_boolean (value, priv->readable);
+ g_value_set_boolean (value, TRUE);
break;
case PROP_BASEDIR:
g_value_set_string (value, priv->basedir);
@@ -202,15 +183,6 @@ tpl_log_store_xml_set_property (GObject *object,
switch (param_id)
{
- case PROP_NAME:
- log_store_xml_set_name (self, g_value_get_string (value));
- break;
- case PROP_READABLE:
- log_store_xml_set_readable (self, g_value_get_boolean (value));
- break;
- case PROP_WRITABLE:
- log_store_xml_set_writable (self, g_value_get_boolean (value));
- break;
case PROP_EMPATHY_LEGACY:
self->priv->empathy_legacy = g_value_get_boolean (value);
break;
@@ -238,9 +210,7 @@ _tpl_log_store_xml_class_init (TplLogStoreXmlClass *klass)
object_class->get_property = tpl_log_store_xml_get_property;
object_class->set_property = tpl_log_store_xml_set_property;
- g_object_class_override_property (object_class, PROP_NAME, "name");
g_object_class_override_property (object_class, PROP_READABLE, "readable");
- g_object_class_override_property (object_class, PROP_WRITABLE, "writable");
/**
* TplLogStoreXml:basedir:
@@ -1776,7 +1746,10 @@ log_store_xml_get_name (TplLogStore *store)
g_return_val_if_fail (TPL_IS_LOG_STORE_XML (self), NULL);
- return self->priv->name;
+ if (self->priv->empathy_legacy)
+ return "Empathy";
+ else
+ return "TpLogger";
}
@@ -1816,17 +1789,6 @@ log_store_xml_get_basedir (TplLogStoreXml *self)
static void
-log_store_xml_set_name (TplLogStoreXml *self,
- const gchar *data)
-{
- g_return_if_fail (TPL_IS_LOG_STORE_XML (self));
- g_return_if_fail (!TPL_STR_EMPTY (data));
- g_return_if_fail (self->priv->name == NULL);
-
- self->priv->name = g_strdup (data);
-}
-
-static void
log_store_xml_set_basedir (TplLogStoreXml *self,
const gchar *data)
{
@@ -1843,26 +1805,6 @@ log_store_xml_set_basedir (TplLogStoreXml *self,
}
-static void
-log_store_xml_set_readable (TplLogStoreXml *self,
- gboolean data)
-{
- g_return_if_fail (TPL_IS_LOG_STORE_XML (self));
-
- self->priv->readable = data;
-}
-
-
-static void
-log_store_xml_set_writable (TplLogStoreXml *self,
- gboolean data)
-{
- g_return_if_fail (TPL_IS_LOG_STORE_XML (self));
-
- self->priv->writable = data;
-}
-
-
static GList *
log_store_xml_get_filtered_events (TplLogStore *store,
TpAccount *account,
diff --git a/telepathy-logger/log-store.c b/telepathy-logger/log-store.c
index f57645e..77a7fd6 100644
--- a/telepathy-logger/log-store.c
+++ b/telepathy-logger/log-store.c
@@ -30,7 +30,7 @@
* SECTION:log-store
* @title: TplLogStore
* @short_description: LogStore interface can register into #TplLogManager as
- * #TplLogStore:writable or #TplLogStore:readable log stores.
+ * readable and/or writable log stores.
* @see_also: #text-event:#TplTextEvent and other subclasses when they'll exist
*
* The #TplLogStore defines all the public methods that a TPL Log Store has to
@@ -66,45 +66,22 @@ _tpl_log_store_get_type (void)
static void
_tpl_log_store_init (gpointer g_iface)
{
- g_object_interface_install_property (g_iface,
- g_param_spec_string ("name",
- "Name",
- "The TplLogStore implementation's name",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
-
/**
- * TplLogStore:writable:
+ * TplLogStore:readable:
*
- * Defines wether the object is writable for a #TplLogManager.
+ * Defines whether the object is readable for a #TplLogManager.
*
- * If an TplLogStore implementation is writable, the #TplLogManager will call
- * it's tpl_log_store_add_event() method every time a loggable even occurs,
- * i.e., everytime _tpl_log_manager_add_event() is called.
+ * If an TplLogStore implementation is readable, the #TplLogManager will
+ * use the query methods against the instance (e.g. _tpl_log_store_get_dates())
+ * every time a #TplLogManager instance is queried (e.g.
+ * _tpl_log_manager_get_dates()).
*/
g_object_interface_install_property (g_iface,
g_param_spec_boolean ("readable",
"Readable",
"Whether this log store is readable",
TRUE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
-
- /**
- * TplLogStore:readable:
- *
- * Defines wether the object is readable for a #TplLogManager.
- *
- * If an TplLogStore implementation is readable, the #TplLogManager will
- * use the query methods against the instance (i.e. tpl_log_store_get_dates())
- * every time a #TplLogManager instance is queried (i.e.,
- * tpl_log_manager_get_date()).
- */
- g_object_interface_install_property (g_iface,
- g_param_spec_boolean ("writable",
- "Writable",
- "Whether this log store is writable",
- TRUE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
const gchar *
@@ -150,11 +127,12 @@ _tpl_log_store_add_event (TplLogStore *self,
{
g_return_val_if_fail (TPL_IS_LOG_STORE (self), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
if (TPL_LOG_STORE_GET_INTERFACE (self)->add_event == NULL)
{
g_set_error (error, TPL_LOG_STORE_ERROR,
TPL_LOG_STORE_ERROR_ADD_EVENT,
- "%s: add_event not implemented, but writable set to TRUE : %s",
+ "%s: %s is not writable",
G_STRFUNC, G_OBJECT_CLASS_NAME (self));
return FALSE;
}
@@ -380,15 +358,9 @@ _tpl_log_store_create_iter (TplLogStore *self,
gboolean
_tpl_log_store_is_writable (TplLogStore *self)
{
- gboolean writable;
-
g_return_val_if_fail (TPL_IS_LOG_STORE (self), FALSE);
- g_object_get (self,
- "writable", &writable,
- NULL);
-
- return writable;
+ return (TPL_LOG_STORE_GET_INTERFACE (self)->add_event != NULL);
}
diff --git a/tests/dbus/test-tpl-log-iter-pidgin.c b/tests/dbus/test-tpl-log-iter-pidgin.c
index c18a34b..e1a96dc 100644
--- a/tests/dbus/test-tpl-log-iter-pidgin.c
+++ b/tests/dbus/test-tpl-log-iter-pidgin.c
@@ -52,7 +52,6 @@ setup (PidginTestCaseFixture* fixture,
g_assert (fixture->main_loop != NULL);
fixture->store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN,
- "name", "testcase",
"testmode", TRUE,
NULL);
diff --git a/tests/dbus/test-tpl-log-iter-xml.c b/tests/dbus/test-tpl-log-iter-xml.c
index 1d64c15..7b966f6 100644
--- a/tests/dbus/test-tpl-log-iter-xml.c
+++ b/tests/dbus/test-tpl-log-iter-xml.c
@@ -28,7 +28,6 @@ setup (XmlTestCaseFixture* fixture,
GError *error = NULL;
fixture->store = g_object_new (TPL_TYPE_LOG_STORE_XML,
- "name", "testcase",
"testmode", TRUE,
NULL);
diff --git a/tests/dbus/test-tpl-log-store-pidgin.c b/tests/dbus/test-tpl-log-store-pidgin.c
index 7d54d5f..fea3daf 100644
--- a/tests/dbus/test-tpl-log-store-pidgin.c
+++ b/tests/dbus/test-tpl-log-store-pidgin.c
@@ -171,7 +171,6 @@ setup (PidginTestCaseFixture* fixture,
DEBUG ("basedir is %s", fixture->basedir);
fixture->store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN,
- "name", "testcase",
"testmode", TRUE,
NULL);
@@ -251,11 +250,7 @@ test_basedir (PidginTestCaseFixture *fixture,
/* try to instantiate the default store, without passing basedir, it has to
* match the real libpurple basedir */
- store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN,
- "name", "testcase",
- "readable", FALSE,
- "writable", FALSE,
- NULL);
+ store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, NULL);
dir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".purple",
"logs", NULL);
g_assert_cmpstr (log_store_pidgin_get_basedir (store), ==, dir);
@@ -347,9 +342,9 @@ test_get_name (PidginTestCaseFixture *fixture,
{
const gchar *name;
- name = log_store_pidgin_get_name (TPL_LOG_STORE (fixture->store));
+ name = _tpl_log_store_get_name (TPL_LOG_STORE (fixture->store));
- g_assert_cmpstr (name, ==, "testcase");
+ g_assert_cmpstr (name, ==, "Pidgin");
}
static void
diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c
index f35b4a7..6deceb9 100644
--- a/tests/dbus/test-tpl-log-store-xml.c
+++ b/tests/dbus/test-tpl-log-store-xml.c
@@ -48,7 +48,6 @@ setup (XmlTestCaseFixture* fixture,
gconstpointer user_data)
{
fixture->store = g_object_new (TPL_TYPE_LOG_STORE_XML,
- "name", "testcase",
"testmode", TRUE,
NULL);