[california/wip/725783-time] Fix timezone, GTK 3.12 bugs
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/725783-time] Fix timezone, GTK 3.12 bugs
- Date: Tue, 5 Aug 2014 01:24:16 +0000 (UTC)
commit 65ad1163184f21aac972f48981d4a3574214a45d
Author: Jim Nelson <jim yorba org>
Date: Mon Aug 4 18:24:13 2014 -0700
Fix timezone, GTK 3.12 bugs
src/host/host-create-update-event.vala | 4 ++--
src/host/host-date-time-widget.vala | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/host/host-create-update-event.vala b/src/host/host-create-update-event.vala
index bcd2c3e..757efb9 100644
--- a/src/host/host-create-update-event.vala
+++ b/src/host/host-create-update-event.vala
@@ -176,8 +176,8 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
if (dt.date_span != null) {
time_summary_label.label = dt.date_span.to_pretty_string(Calendar.Date.PrettyFlag.NONE);
} else if (dt.exact_time_span != null) {
- time_summary_label.label = dt.exact_time_span.to_pretty_string(Calendar.Date.PrettyFlag.NONE,
- Calendar.ExactTimeSpan.PrettyFlag.NONE);
+ time_summary_label.label =
dt.exact_time_span.to_timezone(Calendar.Timezone.local).to_pretty_string(
+ Calendar.Date.PrettyFlag.NONE, Calendar.ExactTimeSpan.PrettyFlag.NONE);
} else {
time_summary_label.visible = false;
}
diff --git a/src/host/host-date-time-widget.vala b/src/host/host-date-time-widget.vala
index 4dd0c20..f8e247d 100644
--- a/src/host/host-date-time-widget.vala
+++ b/src/host/host-date-time-widget.vala
@@ -91,6 +91,12 @@ public class DateTimeWidget : Gtk.Box {
// honor 24-hour time
Calendar.System.instance.is_24hr_changed.connect(system_24hr_changed);
system_24hr_changed();
+
+ // GTK 3.12 requires this in order to constrain GtkEntry width, older versions were happy
+ // with width_chars alone
+#if GTK_312
+ hour_entry.max_width_chars = minutes_entry.max_width_chars = 2;
+#endif
}
~DateTimeWidget() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]