Bug 28602 - Should be ported to GSettings
Summary: Should be ported to GSettings
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: logger (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/da...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 09:24 UTC by Guillaume Desmottes
Modified: 2010-08-06 02:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2010-06-18 09:24:26 UTC
I just realised that Empathy now depends on tp-logger which uses gconf. A bit silly has we just kicked gconf out of Empathy :)
Comment 1 Danielle Madeley 2010-07-15 21:37:58 UTC
The original TplConfIface branch has bitrotten quite badly, so I've ignored it for now. This is a direct port of the TplConf class. With the existance of GSettings in GLib, I wonder if we require an abstract interface.

I've removed the GErrors from the API, they're meaningless in GSettings.

I haven't bothered to write a migration file for the schema. I'm not sure it's really required. I also didn't port two of the methods, and just ifdefed them out, because I wonder if we want to rethink the API for them first.

I thought about also adding an ignored-identifiers key of type a(os) that can be used to take conversations with individual users off the record.

We need to recover and unrot the code to handle asynchronous settings changes, to take conversations or accounts off the record for existing channels. Will work on this next.
Comment 2 Guillaume Desmottes 2010-07-16 01:28:18 UTC
Looks good. Actually I'm wondering if we shouldn't remove the ignore-accounts option for now. My plan is just to add a "Log chats" options in Empathy for now so I don't need it.
Adding more API later to fit the use cases we want to solve sounds wiser to me.
Comment 3 Danielle Madeley 2010-07-16 04:45:37 UTC
(In reply to comment #2)
> Looks good. Actually I'm wondering if we shouldn't remove the ignore-accounts
> option for now. My plan is just to add a "Log chats" options in Empathy for now
> so I don't need it.
> Adding more API later to fit the use cases we want to solve sounds wiser to me.

To readd it later, or replace with a more generic ignore-targets:a(os) ? [I do wonder what the specific use case for ignore-accounts is, do some people have always-secret accounts?]
Comment 4 Guillaume Desmottes 2010-07-16 04:56:53 UTC
I'm not sure either. I'd jsut remove/comment it for now and keep only the global setting.
Comment 5 Danielle Madeley 2010-07-19 10:14:05 UTC
I've removed ignore-accounts as a single commit we can revert if required.

I've started working on asynchronously supporting changes to globally-enable. The old method relied on the previous find-open-channels/Observer-recovery support before the Observer was replaced by TpSimpleObserver. There are two ways I can see to now implement global-enable:

(1) Add support for checking global-enable to TplLogManager, so it only writes when global-enable is true; or
(2) Some clone of the original method, but launching a new temporary handler to Recover all of the channels.

The former sounds preferable, does anyone else have an opinion?
Comment 6 Danielle Madeley 2010-07-20 03:18:54 UTC
Ok, I've done this in the TplLogManager.

Looking for review please.
Comment 7 Guillaume Desmottes 2010-08-02 01:24:07 UTC
+  if (priv->gsettings != NULL)
     {
-      g_object_unref (priv->client);
-      priv->client = NULL;
+      g_object_unref (priv->gsettings);
+      priv->gsettings = NULL;

tp_clear_object() ftw!


http://git.collabora.co.uk/?p=user/danni/telepathy-logger.git;a=commitdiff;h=30b0ce878d6cb3837b9cd207eb98f873ed553dbf
Why not use the extra magic generating the list file?

If you add it, I won't revert it, it's always something useful to have.

TplConf seems to have turned to an extra useless layer on top of the GSettings object. Shouldn't we get rid of it?
Comment 8 Danielle Madeley 2010-08-06 02:17:04 UTC
Merged. With marshaller generation back in.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.