[gnome-clocks/zbrown/world-clocks] alarms: day buttons shouldn't be selectable



commit 830a93ae661d87e2387c44adf8bb1d99d64e4d75
Author: Zander Brown <zbrown gnome org>
Date:   Fri Feb 14 18:11:24 2020 +0000

    alarms: day buttons shouldn't be selectable

 data/ui/alarmdaypickerrow.ui | 4 ++++
 data/ui/alarmsetupdialog.ui  | 3 ++-
 src/alarm.vala               | 8 +++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/alarmdaypickerrow.ui b/data/ui/alarmdaypickerrow.ui
index de283ab..630bdf8 100644
--- a/data/ui/alarmdaypickerrow.ui
+++ b/data/ui/alarmdaypickerrow.ui
@@ -4,6 +4,8 @@
     <property name="visible">True</property>
     <property name="title" translatable="yes">_Repeat</property>
     <property name="use-underline">True</property>
+    <property name="activatable">False</property>
+    <property name="selectable">False</property>
     <child type="action">
      <object class="GtkFlowBox" id="flow">
         <property name="visible">True</property>
@@ -11,6 +13,8 @@
         <property name="halign">end</property>
         <property name="hexpand">True</property>
         <property name="homogeneous">True</property>
+        <property name="selection-mode">none</property>
+        <property name="activate-on-single-click">False</property>
       </object>
     </child>
     <style>
diff --git a/data/ui/alarmsetupdialog.ui b/data/ui/alarmsetupdialog.ui
index beffec9..7e20c89 100644
--- a/data/ui/alarmsetupdialog.ui
+++ b/data/ui/alarmsetupdialog.ui
@@ -139,7 +139,8 @@
                     <child>
                       <object class="HdyActionRow">
                         <property name="visible">True</property>
-                        <property name="activatable_widget">name_entry</property>
+                        <property name="activatable">False</property>
+                        <property name="selectable">False</property>
                         <property name="title" translatable="yes">Name</property>
                         <property name="subtitle" translatable="yes">Optional</property>
                         <child type="action">
diff --git a/src/alarm.vala b/src/alarm.vala
index d2656ec..c23283e 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -480,7 +480,13 @@ public class DayPickerRow : Hdy.ActionRow {
         var first_weekday = Utils.Weekdays.Day.get_first_weekday ();
         for (int i = 0; i < 7; i++) {
             var day_number = (first_weekday + i) % 7;
-            flow.add (buttons[day_number]);
+
+            var wrap = new Gtk.FlowBoxChild ();
+            wrap.can_focus = false;
+            wrap.add (buttons[day_number]);
+            wrap.show ();
+
+            flow.add (wrap);
         }
 
         update ();


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