[gnome-clocks/zbrown/list-alarms: 20/24] alarms: Open dialog instead of toggling
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/zbrown/list-alarms: 20/24] alarms: Open dialog instead of toggling
- Date: Thu, 16 Jan 2020 00:44:21 +0000 (UTC)
commit 759159f21aacca08ad29ac54d85d641ac026b01a
Author: Zander Brown <zbrown gnome org>
Date: Tue Aug 6 20:22:51 2019 +0100
alarms: Open dialog instead of toggling
data/ui/alarmtile.ui | 18 +-----------------
src/alarm.vala | 9 ++++-----
2 files changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/data/ui/alarmtile.ui b/data/ui/alarmtile.ui
index 9e6578a..4b0192b 100644
--- a/data/ui/alarmtile.ui
+++ b/data/ui/alarmtile.ui
@@ -3,20 +3,11 @@
<template class="ClocksAlarmRow" parent="HdyActionRow">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="activatable-widget">toggle</property>
<child type="action">
- <object class="GtkButton">
+ <object class="GtkSwitch" id="toggle">
<property name="visible">True</property>
<property name="valign">center</property>
<property name="halign">center</property>
- <signal name="clicked" handler="edit" swapped="no" object="ClocksAlarmRow"/>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="icon-name">applications-system-symbolic</property>
- <property name="icon-size">4</property>
- </object>
- </child>
</object>
</child>
<child type="action">
@@ -28,12 +19,5 @@
<property name="margin-bottom">8</property>
</object>
</child>
- <child type="action">
- <object class="GtkSwitch" id="toggle">
- <property name="visible">True</property>
- <property name="valign">center</property>
- <property name="halign">center</property>
- </object>
- </child>
</template>
</interface>
diff --git a/src/alarm.vala b/src/alarm.vala
index 41e9a59..0acf5d5 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -296,6 +296,10 @@ private class Row : Hdy.ActionRow {
update ();
}
+ public override void activate () {
+ face.edit(alarm);
+ }
+
private void update () {
string text, sub_text;
@@ -321,11 +325,6 @@ private class Row : Hdy.ActionRow {
title = text;
}
}
-
- [GtkCallback]
- private void edit () requires (face != null && alarm != null) {
- face.edit(alarm);
- }
}
[GtkTemplate (ui = "/org/gnome/clocks/ui/alarmsetupdialog.ui")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]