[gnome-clocks/bilelmoussaoui/fonts] consistent remove button in world/alarms panels
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/bilelmoussaoui/fonts] consistent remove button in world/alarms panels
- Date: Thu, 16 Jul 2020 11:37:39 +0000 (UTC)
commit b449f81f7edc96d777b84d83f3b52cf9873e9d51
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Thu Jul 16 13:27:15 2020 +0200
consistent remove button in world/alarms panels
fixes #82
data/ui/alarm-face.ui | 2 +-
data/ui/alarm-row.ui | 44 ++++----------------------------------------
src/alarm-face.vala | 5 +++++
src/alarm-row.vala | 5 -----
4 files changed, 10 insertions(+), 46 deletions(-)
---
diff --git a/data/ui/alarm-face.ui b/data/ui/alarm-face.ui
index 685c97e..cdf9c8e 100644
--- a/data/ui/alarm-face.ui
+++ b/data/ui/alarm-face.ui
@@ -49,7 +49,7 @@
<property name="visible">True</property>
<property name="valign">start</property>
<property name="selection-mode">none</property>
- <property name="activate-on-single-click">False</property>
+ <property name="activate-on-single-click">True</property>
<style>
<class name="preferences"/>
<class name="clocks-list"/>
diff --git a/data/ui/alarm-row.ui b/data/ui/alarm-row.ui
index dfa45b9..0adbe2c 100644
--- a/data/ui/alarm-row.ui
+++ b/data/ui/alarm-row.ui
@@ -5,7 +5,7 @@
<template class="ClocksAlarmRow" parent="GtkListBoxRow">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="activatable">False</property>
+ <property name="activatable">True</property>
<property name="selectable">False</property>
<child>
<object class="GtkGrid">
@@ -31,44 +31,6 @@
<property name="height">3</property>
</packing>
</child>
- <child>
- <object class="GtkSeparator">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- <property name="height">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Edit</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <signal name="clicked" handler="edit" swapped="no"/>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_bottom">1</property>
- <property name="icon_name">document-edit-symbolic</property>
- </object>
- </child>
- <style>
- <class name="circular"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
- <property name="height">3</property>
- </packing>
- </child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
@@ -77,6 +39,7 @@
<property name="tooltip_text" translatable="yes">Delete</property>
<property name="halign">end</property>
<property name="valign">center</property>
+ <property name="relief">none</property>
<signal name="clicked" handler="delete" swapped="no"/>
<child>
<object class="GtkImage">
@@ -86,7 +49,8 @@
</object>
</child>
<style>
- <class name="circular"/>
+ <class name="round-button"/>
+ <class name="small-button"/>
</style>
</object>
<packing>
diff --git a/src/alarm-face.vala b/src/alarm-face.vala
index 71719af..bf0d387 100644
--- a/src/alarm-face.vala
+++ b/src/alarm-face.vala
@@ -69,6 +69,11 @@ public class Face : Gtk.Stack, Clocks.Clock {
return new Row ((Item) item, this);
});
+ listbox.row_activated.connect ((row) => {
+ var alarm = ((Row) row).alarm;
+ this.edit (alarm);
+ });
+
load ();
alarms.items_changed.connect ((position, removed, added) => {
diff --git a/src/alarm-row.vala b/src/alarm-row.vala
index c82f81e..c30c6a5 100644
--- a/src/alarm-row.vala
+++ b/src/alarm-row.vala
@@ -97,11 +97,6 @@ private class Row : Gtk.ListBoxRow {
title.label = (string) label;
}
- [GtkCallback]
- private void edit () {
- face.edit (alarm);
- }
-
[GtkCallback]
private void delete () {
face.delete (alarm);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]