forked from pool/gnome-clocks
Accepting request 695626 from GNOME:Next
Scripted push of project GNOME:Next OBS-URL: https://build.opensuse.org/request/show/695626 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-clocks?expand=0&rev=84
This commit is contained in:
parent
6cd202fff2
commit
5346ff5992
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ec9a86855d5ab29428329a47fa865dedf67b22895e0306a2cffc8ccdbfc92e01
|
|
||||||
size 798904
|
|
3
gnome-clocks-3.32.0.tar.xz
Normal file
3
gnome-clocks-3.32.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6c8d90b0044f535f239bd94a7d0e46d0c9da32a6a141ff1233a78fa99a7cd4f0
|
||||||
|
size 505368
|
@ -1,68 +0,0 @@
|
|||||||
From 89bf3cfe16ac343dc61718fdf1abe0468cb25032 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yanko Kaneti <yaneti@declera.com>
|
|
||||||
Date: Tue, 18 Sep 2018 16:26:52 +0300
|
|
||||||
Subject: [PATCH] timer: Set width-chars=2 property on the spinbuttons
|
|
||||||
|
|
||||||
Set width-chars to help gtk pre-allocate the spin buttons
|
|
||||||
drawing area regardless of font
|
|
||||||
|
|
||||||
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1630248
|
|
||||||
---
|
|
||||||
data/ui/timer.ui | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/data/ui/timer.ui b/data/ui/timer.ui
|
|
||||||
index 40ff931..7c37afe 100644
|
|
||||||
--- a/data/ui/timer.ui
|
|
||||||
+++ b/data/ui/timer.ui
|
|
||||||
@@ -67,6 +67,7 @@
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="adjustment">adjustment_hours</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
+ <property name="width_chars">2</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<signal name="output" handler="show_leading_zeros" swapped="no"/>
|
|
||||||
<signal name="changed" handler="update_start_button" swapped="no"/>
|
|
||||||
@@ -109,6 +110,7 @@
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="adjustment">adjustment_minutes</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
+ <property name="width_chars">2</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<signal name="output" handler="show_leading_zeros" swapped="no"/>
|
|
||||||
<signal name="changed" handler="update_start_button" swapped="no"/>
|
|
||||||
@@ -152,6 +154,7 @@
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="adjustment">adjustment_seconds</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
+ <property name="width_chars">2</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<signal name="output" handler="show_leading_zeros" swapped="no"/>
|
|
||||||
<signal name="changed" handler="update_start_button" swapped="no"/>
|
|
||||||
@@ -263,6 +266,7 @@
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="adjustment">adjustment_hours</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
+ <property name="width_chars">2</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<signal name="output" handler="show_leading_zeros" swapped="no"/>
|
|
||||||
<signal name="changed" handler="update_start_button" swapped="no"/>
|
|
||||||
@@ -306,6 +310,7 @@
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="adjustment">adjustment_minutes</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
+ <property name="width_chars">2</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<signal name="output" handler="show_leading_zeros" swapped="no"/>
|
|
||||||
<signal name="changed" handler="update_start_button" swapped="no"/>
|
|
||||||
@@ -349,6 +354,7 @@
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="adjustment">adjustment_seconds</property>
|
|
||||||
<property name="numeric">True</property>
|
|
||||||
+ <property name="width_chars">2</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<signal name="output" handler="show_leading_zeros" swapped="no"/>
|
|
||||||
<signal name="changed" handler="update_start_button" swapped="no"/>
|
|
||||||
--
|
|
||||||
2.18.1
|
|
||||||
|
|
@ -1,175 +0,0 @@
|
|||||||
From 14005c78289239b7fd78ce8c9694ccd92a15f0cd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yanko Kaneti <yaneti@declera.com>
|
|
||||||
Date: Sat, 27 Oct 2018 02:03:50 +0300
|
|
||||||
Subject: [PATCH 1/2] timer: Decouple timer logic from the widget tick
|
|
||||||
|
|
||||||
Moving the timer logic in a separate processing timeout
|
|
||||||
outside the widget frame update tick.
|
|
||||||
|
|
||||||
- fixes timer firing when the window is not being repainted
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1525025
|
|
||||||
|
|
||||||
- the countdown frame is updated at most 25 times a second
|
|
||||||
which should slightly reduce CPU usage
|
|
||||||
---
|
|
||||||
src/timer.vala | 48 ++++++++++++++----------------------------------
|
|
||||||
1 file changed, 14 insertions(+), 34 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/timer.vala b/src/timer.vala
|
|
||||||
index 7121b54..73ea374 100644
|
|
||||||
--- a/src/timer.vala
|
|
||||||
+++ b/src/timer.vala
|
|
||||||
@@ -78,7 +78,6 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
public State state { get; private set; default = State.STOPPED; }
|
|
||||||
|
|
||||||
private GLib.Settings settings;
|
|
||||||
- private uint tick_id;
|
|
||||||
private double span;
|
|
||||||
private GLib.Timer timer;
|
|
||||||
private Utils.Bell bell;
|
|
||||||
@@ -119,7 +118,6 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
|
|
||||||
settings = new GLib.Settings ("org.gnome.clocks");
|
|
||||||
|
|
||||||
- tick_id = 0;
|
|
||||||
span = 0;
|
|
||||||
timer = new GLib.Timer ();
|
|
||||||
|
|
||||||
@@ -227,7 +225,6 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
private void reset () {
|
|
||||||
state = State.STOPPED;
|
|
||||||
timer.reset ();
|
|
||||||
- stop_ticking ();
|
|
||||||
span = settings.get_uint ("timer");
|
|
||||||
h_spinbutton.value = (int) span / 3600;
|
|
||||||
m_spinbutton.value = (int) span % 3600 / 60;
|
|
||||||
@@ -242,7 +239,7 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
private void start () {
|
|
||||||
countdown_frame.get_style_context ().remove_class ("clocks-paused");
|
|
||||||
|
|
||||||
- if (state == State.STOPPED && tick_id == 0) {
|
|
||||||
+ if (state == State.STOPPED) {
|
|
||||||
var h = h_spinbutton.get_value_as_int ();
|
|
||||||
var m = m_spinbutton.get_value_as_int ();
|
|
||||||
var s = s_spinbutton.get_value_as_int ();
|
|
||||||
@@ -257,46 +254,29 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
|
|
||||||
state = State.RUNNING;
|
|
||||||
timer.start ();
|
|
||||||
- start_ticking ();
|
|
||||||
+ GLib.Timeout.add(40, () => {
|
|
||||||
+ if (state != State.RUNNING) {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ var e = timer.elapsed ();
|
|
||||||
+ if (e >= span) {
|
|
||||||
+ reset ();
|
|
||||||
+ ring ();
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ update_countdown (e);
|
|
||||||
+ return true;
|
|
||||||
+ });
|
|
||||||
}
|
|
||||||
|
|
||||||
private void pause () {
|
|
||||||
state = State.PAUSED;
|
|
||||||
timer.stop ();
|
|
||||||
- stop_ticking ();
|
|
||||||
span -= timer.elapsed ();
|
|
||||||
countdown_frame.get_style_context ().add_class ("clocks-paused");
|
|
||||||
countdown_frame.pause ();
|
|
||||||
}
|
|
||||||
|
|
||||||
- private void start_ticking () {
|
|
||||||
- if (tick_id == 0) {
|
|
||||||
- tick_id = add_tick_callback ((c) => {
|
|
||||||
- return count ();
|
|
||||||
- });
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private void stop_ticking () {
|
|
||||||
- if (tick_id != 0) {
|
|
||||||
- remove_tick_callback (tick_id);
|
|
||||||
- tick_id = 0;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- private bool count () {
|
|
||||||
- var e = timer.elapsed ();
|
|
||||||
- if (e >= span) {
|
|
||||||
- update_countdown_label (0, 0, 0);
|
|
||||||
- ring ();
|
|
||||||
- reset ();
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- update_countdown (e);
|
|
||||||
- return true;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
private void update_countdown (double elapsed) {
|
|
||||||
if (h_label.get_mapped ()) {
|
|
||||||
// Math.ceil() because we count backwards:
|
|
||||||
--
|
|
||||||
2.18.1
|
|
||||||
|
|
||||||
|
|
||||||
From 00ea80dcf5ec0bf34a2bafde850bea3955a1d059 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yanko Kaneti <yaneti@declera.com>
|
|
||||||
Date: Sun, 28 Oct 2018 15:17:56 +0200
|
|
||||||
Subject: [PATCH 2/2] timer: remove timeout on widget disposal
|
|
||||||
|
|
||||||
---
|
|
||||||
src/timer.vala | 13 ++++++++++++-
|
|
||||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/timer.vala b/src/timer.vala
|
|
||||||
index 73ea374..5846479 100644
|
|
||||||
--- a/src/timer.vala
|
|
||||||
+++ b/src/timer.vala
|
|
||||||
@@ -80,6 +80,7 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
private GLib.Settings settings;
|
|
||||||
private double span;
|
|
||||||
private GLib.Timer timer;
|
|
||||||
+ private uint timeout_id;
|
|
||||||
private Utils.Bell bell;
|
|
||||||
private GLib.Notification notification;
|
|
||||||
[GtkChild]
|
|
||||||
@@ -121,6 +122,14 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
span = 0;
|
|
||||||
timer = new GLib.Timer ();
|
|
||||||
|
|
||||||
+ timeout_id = 0;
|
|
||||||
+ destroy.connect(() => {
|
|
||||||
+ if (timeout_id != 0) {
|
|
||||||
+ GLib.Source.remove(timeout_id);
|
|
||||||
+ timeout_id = 0;
|
|
||||||
+ }
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
bell = new Utils.Bell ("complete");
|
|
||||||
notification = new GLib.Notification (_("Time is up!"));
|
|
||||||
notification.set_body (_("Timer countdown finished"));
|
|
||||||
@@ -254,14 +263,16 @@ public class Face : Gtk.Stack, Clocks.Clock {
|
|
||||||
|
|
||||||
state = State.RUNNING;
|
|
||||||
timer.start ();
|
|
||||||
- GLib.Timeout.add(40, () => {
|
|
||||||
+ timeout_id = GLib.Timeout.add(40, () => {
|
|
||||||
if (state != State.RUNNING) {
|
|
||||||
+ timeout_id = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var e = timer.elapsed ();
|
|
||||||
if (e >= span) {
|
|
||||||
reset ();
|
|
||||||
ring ();
|
|
||||||
+ timeout_id = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
update_countdown (e);
|
|
||||||
--
|
|
||||||
2.18.1
|
|
||||||
|
|
@ -1,3 +1,28 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Mar 10 09:37:53 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 3.32.0:
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 6 17:58:16 UTC 2019 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
- Update to version 3.31.2:
|
||||||
|
+ Update icon.
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jan 5 19:32:43 UTC 2019 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
- Update to version 3.31.1:
|
||||||
|
+ Replace Appmenu with a menu button.
|
||||||
|
+ Update icon.
|
||||||
|
+ Various bug fixes.
|
||||||
|
+ Updated translations.
|
||||||
|
- Drop upstream fixed patches:
|
||||||
|
+ gnome-clocks-timer-Set-width-chars2.patch.
|
||||||
|
+ gnome-clocks-timer-fixes.patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 28 01:08:34 UTC 2018 - bjorn.lie@gmail.com
|
Fri Dec 28 01:08:34 UTC 2018 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package gnome-clocks
|
# spec file for package gnome-clocks
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2012 Dominique Leuenberger, Amsterdam, The Netherlands.
|
# Copyright (c) 2012 Dominique Leuenberger, Amsterdam, The Netherlands.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -18,17 +18,13 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: gnome-clocks
|
Name: gnome-clocks
|
||||||
Version: 3.30.1
|
Version: 3.32.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Clock application designed for GNOME 3
|
Summary: Clock application designed for GNOME 3
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Productivity/Office/Other
|
Group: Productivity/Office/Other
|
||||||
URL: https://live.gnome.org/Design/Apps/Clock
|
URL: https://live.gnome.org/Design/Apps/Clock
|
||||||
Source0: https://download.gnome.org/sources/gnome-clocks/3.30/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/gnome-clocks/3.32/%{name}-%{version}.tar.xz
|
||||||
# PATCH-FIX-UPSTREAM gnome-clocks-timer-Set-width-chars2.patch -- timer: Set width-chars=2 property on the spinbuttons
|
|
||||||
Patch0: gnome-clocks-timer-Set-width-chars2.patch
|
|
||||||
# PATCH-FIX-UPSTREAM gnome-clocks-timer-fixes.patch -- Various backported timer fixes
|
|
||||||
Patch1: gnome-clocks-timer-fixes.patch
|
|
||||||
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: meson >= 0.41.0
|
BuildRequires: meson >= 0.41.0
|
||||||
|
Loading…
Reference in New Issue
Block a user