[shotwell] Use %OB in date/time choose if available



commit 78d6b386c26f3e49bb7ee1e3efa806456531e6bd
Author: Jens Georg <mail jensge org>
Date:   Thu Dec 19 20:28:41 2019 +0100

    Use %OB in date/time choose if available
    
    Follow what Gtk does in the GtkDateTimeChoser

 src/dialogs/AdjustDateTimeDialog.vala | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/dialogs/AdjustDateTimeDialog.vala b/src/dialogs/AdjustDateTimeDialog.vala
index cf2685bb..3834f99f 100644
--- a/src/dialogs/AdjustDateTimeDialog.vala
+++ b/src/dialogs/AdjustDateTimeDialog.vala
@@ -121,7 +121,13 @@ public class AdjustDateTimeDialog : Gtk.Dialog {
         var picker = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 5);
         var combo = new Gtk.ComboBoxText();
         for (int i = 0; i < 12; i++){
-            combo.append_text(Time.gm((i * 2764800)).format("%B"));
+            var dt = new DateTime.from_unix_utc(i * 2764800);
+            var month_string = dt.format("%OB");
+            if (month_string.str("%OB") != null) {
+                month_string = dt.format("%B");
+            }
+
+            combo.append_text(month_string);
         }
         picker.pack_start(combo, false, false, 0);
         // Limits taken from GtkCalendar


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]