Skip to content

Commit a690350

Browse files
authored
Merge branch 'master' into danirabbit/locationpanel-rmdnd
2 parents a7bcf6b + 21f95c8 commit a690350

188 files changed

Lines changed: 12241 additions & 12131 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
uses: actions/checkout@v6
5858

5959
- name: Build
60-
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.6
60+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.7
6161
with:
6262
bundle: Calendar.flatpak
6363
manifest-path: io.elementary.calendar.yml

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: actions/checkout@v6
5353

5454
- name: Build
55-
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.6
55+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.7
5656
with:
5757
bundle: calendar.flatpak
5858
manifest-path: io.elementary.calendar.yml
@@ -64,7 +64,7 @@ jobs:
6464
arch: ${{ matrix.configuration.arch }}
6565

6666
- name: Deploy
67-
uses: flatpak/flatpak-github-actions/flat-manager@v6.6
67+
uses: flatpak/flatpak-github-actions/flat-manager@v6.7
6868
with:
6969
repository: appcenter
7070
flat-manager-url: https://flatpak-api.elementary.io

core/Services/Calendar/Util/ICalTime.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Calendar.Util {
2727
* For floating times, returns the local timezone.
2828
* Dates (with no time component) are considered floating.
2929
*/
30-
public GLib.TimeZone icaltime_get_timezone (ICal.Time date) {
30+
public GLib.TimeZone icaltime_get_timezone (ICal.Time date) throws Error {
3131
// Special case: dates are floating, so return local time zone
3232
if (date.is_date ()) {
3333
return new GLib.TimeZone.local ();
@@ -54,11 +54,11 @@ namespace Calendar.Util {
5454
if (tzid.has_prefix (LIBICAL_TZ_PREFIX)) {
5555
// TZID has prefix "/freeassociation.sourceforge.net/",
5656
// indicating a libical TZID.
57-
return new GLib.TimeZone (tzid.offset (LIBICAL_TZ_PREFIX.length));
57+
return new GLib.TimeZone.identifier (tzid.offset (LIBICAL_TZ_PREFIX.length));
5858
} else {
5959
// TZID does not have libical prefix, potentially indicating an Olson
6060
// standard city name.
61-
return new GLib.TimeZone (tzid);
61+
return new GLib.TimeZone.identifier (tzid);
6262
}
6363
}
6464

core/Tests/util-tests.vala

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@ void test_timezone_expected (DateTime time, ICal.Time ical,
4646
assert_true (ical.get_tzid () != null);
4747
}
4848

49-
var util_timezone = Calendar.Util.icaltime_get_timezone (ical);
50-
var abbreviation = get_glib_tzid (util_timezone, time);
51-
debug (@"Resulting GLib.TimeZone: $abbreviation");
52-
assert_true (abbreviation == asserted_abbreviation);
53-
assert_true (get_glib_offset (util_timezone, time) == get_glib_offset (asserted_zone, time));
49+
try {
50+
var util_timezone = Calendar.Util.icaltime_get_timezone (ical);
51+
var abbreviation = get_glib_tzid (util_timezone, time);
52+
debug (@"Resulting GLib.TimeZone: $abbreviation");
53+
assert_true (abbreviation == asserted_abbreviation);
54+
assert_true (get_glib_offset (util_timezone, time) == get_glib_offset (asserted_zone, time));
55+
} catch (Error e) {
56+
assert_no_error (e);
57+
}
5458
}
5559

5660
void test_floating () {
@@ -74,15 +78,20 @@ void test_sample_offsets (string tzid, string abbreviation) {
7478
// Setup basic time info
7579
var test_date = new GLib.DateTime.utc (2019, 11, 21, 9, 20, 0);
7680
var iso_string = test_date.format ("%FT%TZ");
77-
var asserted_zone = new GLib.TimeZone (tzid);
78-
unowned ICal.Timezone ical_tz = ICal.Timezone.get_builtin_timezone (tzid);
79-
assert_true (ical_tz != null);
8081

81-
// Convert to a timezone to test
82-
var ical = new ICal.Time.from_string (iso_string).convert_to_zone (ical_tz);
83-
var converted_gtime = test_date.to_timezone (asserted_zone);
82+
try {
83+
var asserted_zone = new GLib.TimeZone.identifier (tzid);
84+
unowned ICal.Timezone ical_tz = ICal.Timezone.get_builtin_timezone (tzid);
85+
assert_true (ical_tz != null);
86+
87+
// Convert to a timezone to test
88+
var ical = new ICal.Time.from_string (iso_string).convert_to_zone (ical_tz);
89+
var converted_gtime = test_date.to_timezone (asserted_zone);
8490

85-
test_timezone_expected (converted_gtime, ical, false, asserted_zone, abbreviation);
91+
test_timezone_expected (converted_gtime, ical, false, asserted_zone, abbreviation);
92+
} catch (Error e) {
93+
assert_no_error (e);
94+
}
8695
}
8796

8897
// Test identifying a standard hour timezone (UTC offset is a complete hour)
@@ -251,13 +260,17 @@ void test_get_datetimes_all_day () {
251260
assert_true (g_dtstart.format ("%FT%T%z") == "2019-11-21T00:00:00-0600");
252261
assert_true (g_dtend.format ("%FT%T%z") == "2019-11-22T00:00:00-0600");
253262

254-
// Check the timezone
255-
// Floating timezones (implicit in DATE-type) should get the local timezone
256-
// when converted to GLib.
257-
var util_timezone = Calendar.Util.icaltime_get_timezone (dtstart);
258-
var abbreviation = get_glib_tzid (util_timezone, g_dtstart);
259-
debug (@"Resulting timezone: $abbreviation");
260-
assert_true (abbreviation == "CST");
263+
try {
264+
// Check the timezone
265+
// Floating timezones (implicit in DATE-type) should get the local timezone
266+
// when converted to GLib.
267+
var util_timezone = Calendar.Util.icaltime_get_timezone (dtstart);
268+
var abbreviation = get_glib_tzid (util_timezone, g_dtstart);
269+
debug (@"Resulting timezone: $abbreviation");
270+
assert_true (abbreviation == "CST");
271+
} catch (Error e) {
272+
assert_no_error (e);
273+
}
261274

262275
// Floating timezone: converted to local should be same as not converted
263276
Calendar.Util.icalcomponent_get_datetimes (event, out g_dtstart, out g_dtend);
@@ -297,11 +310,15 @@ void test_get_datetimes_not_all_day_local () {
297310
assert_true (g_dtstart.format ("%FT%T%z") == "2019-11-21T04:20:00-0600");
298311
assert_true (g_dtend.format ("%FT%T%z") == "2019-11-22T04:20:00-0600");
299312

300-
// Check the timezone
301-
var util_timezone = Calendar.Util.icaltime_get_timezone (dtstart);
302-
var abbreviation = get_glib_tzid (util_timezone, g_dtstart);
303-
debug (@"Resulting timezone: $abbreviation");
304-
assert_true (abbreviation == "CST");
313+
try {
314+
// Check the timezone
315+
var util_timezone = Calendar.Util.icaltime_get_timezone (dtstart);
316+
var abbreviation = get_glib_tzid (util_timezone, g_dtstart);
317+
debug (@"Resulting timezone: $abbreviation");
318+
assert_true (abbreviation == "CST");
319+
} catch (Error e) {
320+
assert_no_error (e);
321+
}
305322

306323
Calendar.Util.icalcomponent_get_datetimes (event, out g_dtstart, out g_dtend);
307324
assert_true (g_dtstart.format ("%FT%T%z") == "2019-11-21T04:20:00-0600");
@@ -364,9 +381,13 @@ void test_get_datetimes_not_all_day_floating () {
364381
var dtstart = event.get_dtstart ();
365382
assert_true (!dtstart.is_date ());
366383

367-
var util_timezone = Calendar.Util.icaltime_get_timezone (dtstart);
368-
var abbreviation = util_timezone.get_abbreviation (0);
369-
debug (@"Resulting timezone: $abbreviation");
384+
try {
385+
var util_timezone = Calendar.Util.icaltime_get_timezone (dtstart);
386+
var abbreviation = util_timezone.get_abbreviation (0);
387+
debug (@"Resulting timezone: $abbreviation");
388+
} catch (Error e) {
389+
assert_no_error (e);
390+
}
370391

371392
DateTime g_dtstart,g_dtend;
372393
Calendar.Util.icalcomponent_get_local_datetimes (event, out g_dtstart, out g_dtend);

io.elementary.calendar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ modules:
7777
- -DENABLE_EXAMPLES=OFF
7878
sources:
7979
- type: archive
80-
url: https://download.gnome.org/sources/evolution-data-server/3.59/evolution-data-server-3.59.2.tar.xz
81-
sha256: 15bd798c85dee923462bebe880761b4668b6c5065584e840900988389add83bf
80+
url: https://download.gnome.org/sources/evolution-data-server/3.60/evolution-data-server-3.60.1.tar.xz
81+
sha256: 33f92d3b8822eba04c313796c0778cbb65a1a38472e857edc5f98854cca9b34c
8282
x-checker-data:
8383
type: gnome
8484
name: evolution-data-server

0 commit comments

Comments
 (0)