[gnome-clocks] Exclude existing alarms from the duplicate checks
- From: Evgeny Bobkin <ebobkin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Exclude existing alarms from the duplicate checks
- Date: Mon, 17 Feb 2014 17:29:02 +0000 (UTC)
commit de4a8ba5ec05e33a905185a9b1728a950b2d3ea7
Author: Evgeny Bobkin <evgen ibqn gmail com>
Date: Mon Feb 17 17:28:02 2014 +0100
Exclude existing alarms from the duplicate checks
src/alarm.vala | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/alarm.vala b/src/alarm.vala
index a957fe1..b8c7abf 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -302,12 +302,17 @@ private class SetupDialog : Gtk.Dialog {
private Gtk.Revealer label_revealer;
[GtkChild]
private Gtk.SizeGroup am_pm_sizegroup;
- private unowned List<Item> alarms_list;
+ private List<Item> alarms_list;
public SetupDialog (Gtk.Window parent, Item? alarm, List<Item> alarms) {
Object (transient_for: parent, title: alarm != null ? _("Edit Alarm") : _("New Alarm"));
- alarms_list = alarms;
+ alarms_list = new List<Item> ();
+ foreach (unowned Item i in alarms) {
+ if (i != alarm) {
+ alarms_list.prepend (i);
+ }
+ }
// Force LTR since we do not want to reverse [hh] : [mm]
time_grid.set_direction (Gtk.TextDirection.LTR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]