[california/wip/732930-explain] Small clean up, include RRULE strings for xlat
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/732930-explain] Small clean up, include RRULE strings for xlat
- Date: Fri, 5 Sep 2014 22:40:23 +0000 (UTC)
commit 9689e9900f8fed5c32eb6f15b15387f694321e2b
Author: Jim Nelson <jim yorba org>
Date: Fri Sep 5 15:21:22 2014 -0700
Small clean up, include RRULE strings for xlat
po/POTFILES.in | 1 +
po/POTFILES.skip | 1 +
src/collection/collection-iterable.vala | 9 ---------
src/collection/collection.vala | 5 ++++-
src/component/component-recurrence-rule.vala | 2 +-
5 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ccc533e..0cb24e1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,6 +13,7 @@ src/calendar/calendar-date.vala
src/calendar/calendar-exact-time-span.vala
src/calendar/calendar.vala
src/component/component.vala
+src/component/component-recurrence-rule.vala
src/host/host-create-update-event.vala
src/host/host-create-update-recurring.vala
src/host/host-import-calendar.vala
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 79c10da..00e9fcb 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -11,6 +11,7 @@ src/calendar/calendar-date-span.c
src/calendar/calendar-exact-time-span.c
src/component/component.c
src/component/component-event.c
+src/component/component-recurrence-rule.c
src/host/host-create-update-event.c
src/host/host-import-calendar.c
src/host/host-main-window.c
diff --git a/src/collection/collection-iterable.vala b/src/collection/collection-iterable.vala
index 2e237a1..d51e82d 100644
--- a/src/collection/collection-iterable.vala
+++ b/src/collection/collection-iterable.vala
@@ -256,15 +256,6 @@ public class Iterable<G> : Object {
return true;
}
- public bool contains_all(Gee.Collection<G> c) {
- foreach (G g in this) {
- if (!c.contains(g))
- return false;
- }
-
- return true;
- }
-
public int count_matching(owned Gee.Predicate<G> f) {
int count = 0;
foreach (G g in this) {
diff --git a/src/collection/collection.vala b/src/collection/collection.vala
index 1bf5dcd..f352f6b 100644
--- a/src/collection/collection.vala
+++ b/src/collection/collection.vala
@@ -29,13 +29,16 @@ public inline bool is_empty(Gee.Collection? c) {
* Returns true if the two Collections contains all the same elements and the same number of elements.
*/
public bool equal<G>(Gee.Collection<G>? a, Gee.Collection<G>? b) {
+ if ((a == null || b == null) && a != b)
+ return false;
+
if (a == b)
return true;
if (size(a) != size(b))
return false;
- return traverse<G>(a).contains_all(b);
+ return a.contains_all(b);
}
/**
diff --git a/src/component/component-recurrence-rule.vala b/src/component/component-recurrence-rule.vala
index 4c86e24..5428ffb 100644
--- a/src/component/component-recurrence-rule.vala
+++ b/src/component/component-recurrence-rule.vala
@@ -675,7 +675,7 @@ public class RecurrenceRule : BaseObject {
Gee.Collection<Calendar.DayOfWeek> weekend_days =
from_array<Calendar.DayOfWeek>(Calendar.DayOfWeek.weekend_days).to_array_list();
if (Collection.equal<Calendar.DayOfWeek>(weekend_days, dows))
- return _("weekend days");
+ return _("the weekend");
Gee.Collection<Calendar.DayOfWeek> weekdays =
from_array<Calendar.DayOfWeek>(Calendar.DayOfWeek.weekdays).to_array_list();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]