[geary] Fix compile error with vala git master. Fixes Bug 790567.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Fix compile error with vala git master. Fixes Bug 790567.
- Date: Mon, 20 Nov 2017 23:43:15 +0000 (UTC)
commit f42a5d4f12bca23f65a5fd5d5c0066e5c45d2b61
Author: Michael James Gratton <mike vee net>
Date: Tue Nov 21 10:42:00 2017 +1100
Fix compile error with vala git master. Fixes Bug 790567.
* src/engine/imap/response/imap-namespace-response.vala
(NamespaceResponse): Don't try to use arrays as properties. Fix call
sites.
.../imap/response/imap-namespace-response.vala | 16 ++++++++--------
src/engine/imap/transport/imap-client-session.vala | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/engine/imap/response/imap-namespace-response.vala
b/src/engine/imap/response/imap-namespace-response.vala
index 2520b82..f3f6b0a 100644
--- a/src/engine/imap/response/imap-namespace-response.vala
+++ b/src/engine/imap/response/imap-namespace-response.vala
@@ -13,9 +13,9 @@
public class Geary.Imap.NamespaceResponse : BaseObject {
- public Namespace[]? personal { get; private set; default = null; }
- public Namespace[]? user { get; private set; default = null; }
- public Namespace[]? shared { get; private set; default = null; }
+ public Gee.List<Namespace>? personal { get; private set; default = null; }
+ public Gee.List<Namespace>? user { get; private set; default = null; }
+ public Gee.List<Namespace>? shared { get; private set; default = null; }
/**
@@ -55,12 +55,12 @@ public class Geary.Imap.NamespaceResponse : BaseObject {
);
}
- private static Namespace[]? parse_namespaces(ListParameter? list) throws ImapError {
- Namespace[]? nss = null;
+ private static Gee.List<Namespace>? parse_namespaces(ListParameter? list) throws ImapError {
+ Gee.List<Namespace>? nss = null;
if (list != null) {
- nss = new Namespace[list.size];
+ nss = new Gee.ArrayList<Namespace>();
for (int i = 0; i < list.size; i++) {
- nss[i] = parse_namespace(list.get_as_list(i));
+ nss.add(parse_namespace(list.get_as_list(i)));
}
}
return nss;
@@ -77,7 +77,7 @@ public class Geary.Imap.NamespaceResponse : BaseObject {
return ns;
}
- public NamespaceResponse(Namespace[]? personal, Namespace[]? user, Namespace[]? shared) {
+ public NamespaceResponse(Gee.List<Namespace>? personal, Gee.List<Namespace>? user, Gee.List<Namespace>?
shared) {
this.personal = personal;
this.user = user;
this.shared = shared;
diff --git a/src/engine/imap/transport/imap-client-session.vala
b/src/engine/imap/transport/imap-client-session.vala
index ea4bc07..4954cbb 100644
--- a/src/engine/imap/transport/imap-client-session.vala
+++ b/src/engine/imap/transport/imap-client-session.vala
@@ -1007,7 +1007,7 @@ public class Geary.Imap.ClientSession : BaseObject {
}
}
- private inline void update_namespaces(Namespace[]? response, Gee.List<Namespace> list) {
+ private inline void update_namespaces(Gee.List<Namespace>? response, Gee.List<Namespace> list) {
if (response != null) {
foreach (Namespace ns in response) {
list.add(ns);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]