[gnome-clocks/bilelmoussaoui/redesign-timer] TimerRow: fix build
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/bilelmoussaoui/redesign-timer] TimerRow: fix build
- Date: Tue, 28 Jan 2020 13:54:39 +0000 (UTC)
commit 7f3928b90ddd5d5ed0cfc44182021515e3b62618
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Tue Jan 28 14:51:07 2020 +0100
TimerRow: fix build
data/ui/timer_row.ui | 6 +++---
src/timer.vala | 20 +++-----------------
src/widgets.vala | 4 ----
3 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/data/ui/timer_row.ui b/data/ui/timer_row.ui
index 5fb1b8e..eb06842 100644
--- a/data/ui/timer_row.ui
+++ b/data/ui/timer_row.ui
@@ -32,7 +32,7 @@
</packing>
</child>
<child>
- <object class="GtkStack">
+ <object class="GtkStack" id="name_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -44,7 +44,7 @@
<property name="placeholder_text" translatable="yes">Title...</property>
</object>
<packing>
- <property name="name">page0</property>
+ <property name="name">edit</property>
</packing>
</child>
<child>
@@ -57,7 +57,7 @@
</style>
</object>
<packing>
- <property name="name">page1</property>
+ <property name="name">display</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/src/timer.vala b/src/timer.vala
index fde3aaa..fdc9123 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -246,9 +246,7 @@ public class Row : Gtk.ListBoxRow {
private Gtk.Stack start_stack;
[GtkChild]
- private Gtk.Label name_label;
- [GtkChild]
- private Gtk.Entry name_entry;
+ private Gtk.Label timer_name;
[GtkChild]
private Gtk.Stack name_stack;
@@ -391,9 +389,9 @@ public class Row : Gtk.ListBoxRow {
private void update_name_label () {
if (item.name != null && item.name != "") {
- name_label.label = item.name;
+ timer_name.label = item.name;
} else {
- name_label.label = _("%i minutes timer".printf(item.duration.minutes));
+ timer_name.label = _("%i minutes timer".printf(item.duration.minutes));
}
}
@@ -487,22 +485,10 @@ public class Face : Gtk.Stack, Clocks.Clock {
load ();
}
- private void update_timer (Item item) {
- /*
- var current_position = timers.get_index (item);
- if (current_position != -1) {
- Item? timer_item = (Item) timers.get_item (current_position);
-
- timer_item.name = item.name;
- save ();
- }*/
- }
-
private void remove_timer (Item item) {
timers.remove (item);
}
-
public void activate_new () {
var dialog = new NewTimerDialog ((Gtk.Window) get_toplevel ());
dialog.response.connect ((dialog, response) => {
diff --git a/src/widgets.vala b/src/widgets.vala
index d07ccb5..e7c62b9 100644
--- a/src/widgets.vala
+++ b/src/widgets.vala
@@ -85,10 +85,6 @@ public class ContentStore : GLib.Object, GLib.ListModel {
return position;
}
- public void insert (uint position, ContentItem item) {
- store.insert (position, item);
- }
-
public void remove (ContentItem item) {
var index = get_index (item);
if (index != -1) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]