From 5bce04815f6909c20e78888324b7df2cc11cc6d3 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Sun, 4 Aug 2024 08:44:50 +0900 Subject: [PATCH] MainView: Correct initial timezone value TimeZoneGrid expects untranslated timezone is set in the time_zone property but we're passing translated timezone, resulting no selected timezone when initialized in non-English envivonment. --- src/MainView.vala | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/MainView.vala b/src/MainView.vala index 56129f94..7f4febc7 100644 --- a/src/MainView.vala +++ b/src/MainView.vala @@ -329,14 +329,11 @@ public class DateTime.MainView : Switchboard.SettingsPage { } private void change_tz (string _tz) { - var tz = _(_tz); - var english_tz = _tz; + time_zone_picker.time_zone = _tz; - time_zone_picker.time_zone = tz; - - if (datetime1.Timezone != english_tz) { + if (datetime1.Timezone != _tz) { try { - datetime1.set_timezone (english_tz, true); + datetime1.set_timezone (_tz, true); } catch (Error e) { critical (e.message); }