[folks] telepathy backend fixed to match last vala release.
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] telepathy backend fixed to match last vala release.
- Date: Thu, 9 Aug 2012 18:59:36 +0000 (UTC)
commit 887aab26f35f9ac2e9bf1baa92004b4c3ccafd3e
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Thu Aug 9 14:54:54 2012 -0400
telepathy backend fixed to match last vala release.
Vala change:
1. Warn when accessing static members with an instance reference.
2. Deprecate implicit .begin for async methods.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=681420
backends/telepathy/lib/tpf-logger.vala | 22 ++++++++++----------
.../telepathy/lib/tpf-persona-store-cache.vala | 4 +-
backends/telepathy/lib/tpf-persona-store.vala | 6 ++--
backends/telepathy/lib/tpf-persona.vala | 4 +-
4 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/backends/telepathy/lib/tpf-logger.vala b/backends/telepathy/lib/tpf-logger.vala
index 53d8ea1..9ee8a16 100644
--- a/backends/telepathy/lib/tpf-logger.vala
+++ b/backends/telepathy/lib/tpf-logger.vala
@@ -78,16 +78,16 @@ internal class Logger : GLib.Object
{
bool retval = false;
- if (this._logger == null)
+ if (Logger._logger == null)
{
/* Create a logger proxy for favourites support */
var dbus_conn = yield Bus.get (BusType.SESSION);
- this._logger = yield dbus_conn.get_proxy<LoggerIface> (
+ Logger._logger = yield dbus_conn.get_proxy<LoggerIface> (
"org.freedesktop.Telepathy.Logger",
"/org/freedesktop/Telepathy/Logger");
/* Failure? */
- if (this._logger == null)
+ if (Logger._logger == null)
{
this.invalidated ();
return retval;
@@ -100,7 +100,7 @@ internal class Logger : GLib.Object
retval = true;
}
- this._logger.favourite_contacts_changed.connect ((ap, a, r) =>
+ Logger._logger.favourite_contacts_changed.connect ((ap, a, r) =>
{
if (ap != this._account_path)
return;
@@ -114,19 +114,19 @@ internal class Logger : GLib.Object
private void _logger_vanished (DBusConnection conn, string name)
{
/* The logger has vanished on the bus, so it and we are no longer valid */
- this._logger = null;
+ Logger._logger = null;
this.invalidated ();
}
public async string[] get_favourite_contacts () throws GLib.Error
{
/* Invalidated */
- if (this._logger == null)
+ if (Logger._logger == null)
return {};
/* Use an intermediate, since this._logger could disappear before this
* async function finishes */
- var logger = this._logger;
+ var logger = Logger._logger;
AccountFavourites[] favs = yield logger.get_favourite_contacts ();
foreach (AccountFavourites account in favs)
@@ -142,12 +142,12 @@ internal class Logger : GLib.Object
public async void add_favourite_contact (string id) throws GLib.Error
{
/* Invalidated */
- if (this._logger == null)
+ if (Logger._logger == null)
return;
/* Use an intermediate, since this._logger could disappear before this
* async function finishes */
- var logger = this._logger;
+ var logger = Logger._logger;
yield logger.add_favourite_contact (
new ObjectPath (this._account_path), id);
}
@@ -155,12 +155,12 @@ internal class Logger : GLib.Object
public async void remove_favourite_contact (string id) throws GLib.Error
{
/* Invalidated */
- if (this._logger == null)
+ if (Logger._logger == null)
return;
/* Use an intermediate, since this._logger could disappear before this
* async function finishes */
- var logger = this._logger;
+ var logger = Logger._logger;
yield logger.remove_favourite_contact (
new ObjectPath (this._account_path), id);
}
diff --git a/backends/telepathy/lib/tpf-persona-store-cache.vala b/backends/telepathy/lib/tpf-persona-store-cache.vala
index bd3321b..a6352a0 100644
--- a/backends/telepathy/lib/tpf-persona-store-cache.vala
+++ b/backends/telepathy/lib/tpf-persona-store-cache.vala
@@ -71,7 +71,7 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona>
// Maximum version?
if (object_version == uint8.MAX)
{
- object_version = this._FILE_FORMAT_VERSION;
+ object_version = PersonaStoreCache._FILE_FORMAT_VERSION;
}
if (object_version == 1)
@@ -134,7 +134,7 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona>
protected override uint8 get_serialised_object_version ()
{
- return this._FILE_FORMAT_VERSION;
+ return PersonaStoreCache._FILE_FORMAT_VERSION;
}
private Variant[] serialise_abstract_field_details (
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index 0091547..f9121b3 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -433,7 +433,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
{
debug ("Removing store %s (%p)", this.id, this);
this._emit_personas_changed (null, this._persona_set);
- this._cache.clear_cache ();
+ this._cache.clear_cache.begin ();
this.removed ();
}
@@ -1126,7 +1126,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
new GLib.GenericArray<TelepathyGLib.Contact> ());
this._got_initial_members = true;
- this._populate_counters ();
+ this._populate_counters.begin ();
this._notify_if_is_quiescent ();
}
@@ -1444,7 +1444,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
_("Extended information may only be set on the user's Telepathy contact."));
}
- var info_list = this._contact_info_set_to_list (info_set);
+ var info_list = PersonaStore._contact_info_set_to_list (info_set);
if (this.account.connection != null)
{
GLib.Error? error = null;
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index 6390778..360263c 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -249,7 +249,7 @@ public class Tpf.Persona : Folks.Persona,
*/
public override string[] linkable_properties
{
- get { return this._linkable_properties; }
+ get { return Tpf.Persona._linkable_properties; }
}
/**
@@ -705,7 +705,7 @@ public class Tpf.Persona : Folks.Persona,
unowned string id = contact.get_identifier ();
var connection = contact.connection;
var account = connection.get_account ();
- var uid = this.build_uid (store.type_id, store.id, id);
+ var uid = Folks.Persona.build_uid (store.type_id, store.id, id);
Object (contact: contact,
display_id: id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]