[gnome-contacts] Fix valac warnings
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Fix valac warnings
- Date: Mon, 3 Sep 2012 11:41:21 +0000 (UTC)
commit 4f4186e2968e15116089fe0f9e84db53d255091d
Author: Alexander Larsson <alexl redhat com>
Date: Mon Sep 3 13:36:05 2012 +0200
Fix valac warnings
src/contacts-app.vala | 4 ++--
src/contacts-contact-pane.vala | 20 +++-----------------
src/contacts-contact.vala | 6 +++---
src/contacts-link-dialog.vala | 2 +-
src/contacts-store.vala | 4 ++--
5 files changed, 11 insertions(+), 25 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 4e78b53..cd7d3cf 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -431,7 +431,7 @@ public class Contacts.App : Gtk.Application {
notification.show_all ();
b.clicked.connect ( () => {
notification.dismiss ();
- operation.undo ();
+ operation.undo.begin ();
});
overlay.add_overlay (notification);
}
@@ -478,7 +478,7 @@ public class Contacts.App : Gtk.Application {
public App () {
Object (application_id: "org.gnome.Contacts", flags: ApplicationFlags.HANDLES_COMMAND_LINE);
- this.app = this;
+ app = this;
settings = new GLib.Settings ("org.gnome.Contacts");
}
}
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 930c113..511d8a5 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -411,12 +411,11 @@ public abstract class Contacts.FieldSet : Grid {
warning ("Unimplemented get_value()");
else {
saving = true;
- sheet.pane.contact.set_persona_property.begin (sheet.persona, property_name, value,
- (obj, result) => {
+ Contact.set_persona_property.begin (sheet.persona, property_name, value,
+ (obj, result) => {
try {
- var contact = obj as Contact;
saving = false;
- contact.set_persona_property.end (result);
+ Contact.set_persona_property.end (result);
} catch (Error e2) {
App.app.show_message (e2.message);
refresh_from_persona ();
@@ -1467,19 +1466,6 @@ public class Contacts.ContactPane : ScrolledWindow {
const int PROFILE_SIZE = 128;
- private async Persona? set_persona_property (Persona persona,
- string property_name,
- Value value) throws GLib.Error, PropertyError {
- if (persona is FakePersona) {
- var fake = persona as FakePersona;
- return yield fake.make_real_and_set (property_name, value);
- } else {
- persona.set_data ("contacts-unedited", true);
- yield Contact.set_persona_property (persona, property_name, value);
- return null;
- }
- }
-
/* Tries to set the property on all persons that have it writeable, and
* if none, creates a new persona and writes to it, returning the new
* persona.
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 1271f6b..c2e0dd9 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -1378,7 +1378,7 @@ public class Contacts.Contact : GLib.Object {
foreach (var p in individual.personas) {
var tp = p as Tpf.Persona;
if (tp != null) {
- tp.contact.request_contact_info_async(null);
+ tp.contact.request_contact_info_async.begin (null);
}
}
}
@@ -1455,12 +1455,12 @@ public class Contacts.FakePersona : Persona {
private const string[] _writeable_properties = {};
public override string[] linkable_properties
{
- get { return this._linkable_properties; }
+ get { return _linkable_properties; }
}
public override string[] writeable_properties
{
- get { return this._writeable_properties; }
+ get { return _writeable_properties; }
}
public async Persona? make_real_and_set (string property,
diff --git a/src/contacts-link-dialog.vala b/src/contacts-link-dialog.vala
index 19d45ad..e3a28d9 100644
--- a/src/contacts-link-dialog.vala
+++ b/src/contacts-link-dialog.vala
@@ -90,7 +90,7 @@ public class Contacts.LinkDialog : Dialog {
container.add (message_label);
undo_bar.response.connect ( (response_id) => {
if (response_id == ResponseType.APPLY) {
- operation.undo ();
+ operation.undo.begin ();
undo_bar.destroy ();
}
});
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index f66ae3b..6f51913 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -224,9 +224,9 @@ public class Contacts.Store : GLib.Object {
}
}
});
- aggregator.prepare ();
+ aggregator.prepare.begin ();
- check_call_capabilities ();
+ check_call_capabilities.begin ();
}
private void contact_changed_cb (Contact c) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]