[gnome-break-timer] Move TimeUnit to src/common



commit a3e9736158de1497cea96b6621872ac7452fb9cb
Author: Dylan McCall <dylan dylanmccall ca>
Date:   Sun Nov 22 23:55:00 2020 -0800

    Move TimeUnit to src/common

 src/{daemon/util => common}/TimeUnit.vala | 4 ++--
 src/common/meson.build                    | 3 ++-
 src/daemon/break/BreakController.vala     | 2 +-
 src/daemon/break/BreakView.vala           | 2 +-
 src/daemon/meson.build                    | 3 +--
 src/daemon/util/Countdown.vala            | 2 ++
 src/daemon/util/PausableTimeout.vala      | 2 ++
 7 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/daemon/util/TimeUnit.vala b/src/common/TimeUnit.vala
similarity index 96%
rename from src/daemon/util/TimeUnit.vala
rename to src/common/TimeUnit.vala
index 31bdd0d..88a95f5 100644
--- a/src/daemon/util/TimeUnit.vala
+++ b/src/common/TimeUnit.vala
@@ -15,9 +15,9 @@
  * along with GNOME Break Timer.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-namespace BreakTimer.Daemon.Util {
+namespace BreakTimer.Common {
 
-public class TimeUnit {
+public abstract class TimeUnit {
     public const int MILLISECONDS_IN_SECONDS = 1000;
     public const int MICROSECONDS_IN_SECONDS = 1000 * 1000;
 
diff --git a/src/common/meson.build b/src/common/meson.build
index aa0eeea..ad251bd 100644
--- a/src/common/meson.build
+++ b/src/common/meson.build
@@ -7,7 +7,8 @@ common_lib_sources = files(
     'IPortalBackground.vala',
     'IPortalRequest.vala',
     'ISessionStatus.vala',
-    'NaturalTime.vala'
+    'NaturalTime.vala',
+    'TimeUnit.vala'
 )
 
 common_lib_dependencies = [
diff --git a/src/daemon/break/BreakController.vala b/src/daemon/break/BreakController.vala
index b730099..46964f6 100644
--- a/src/daemon/break/BreakController.vala
+++ b/src/daemon/break/BreakController.vala
@@ -15,7 +15,7 @@
  * along with GNOME Break Timer.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-using BreakTimer.Daemon.Util;
+using BreakTimer.Common;
 
 namespace BreakTimer.Daemon.Break {
 
diff --git a/src/daemon/break/BreakView.vala b/src/daemon/break/BreakView.vala
index 259beb4..e923f65 100644
--- a/src/daemon/break/BreakView.vala
+++ b/src/daemon/break/BreakView.vala
@@ -15,7 +15,7 @@
  * along with GNOME Break Timer.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-using BreakTimer.Daemon.Util;
+using BreakTimer.Common;
 
 namespace BreakTimer.Daemon.Break {
 
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
index 1dcaee9..220b65d 100644
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -25,8 +25,7 @@ daemon_lib_sources = files(
     'util/Countdown.vala',
     'util/PausableTimeout.vala',
     'util/SimpleFocusManager.vala',
-    'util/StatefulTimer.vala',
-    'util/TimeUnit.vala'
+    'util/StatefulTimer.vala'
 )
 
 daemon_lib_dependencies = [
diff --git a/src/daemon/util/Countdown.vala b/src/daemon/util/Countdown.vala
index bc728f6..03e0922 100644
--- a/src/daemon/util/Countdown.vala
+++ b/src/daemon/util/Countdown.vala
@@ -15,6 +15,8 @@
  * along with GNOME Break Timer.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+using BreakTimer.Common;
+
 namespace BreakTimer.Daemon.Util {
 
 /**
diff --git a/src/daemon/util/PausableTimeout.vala b/src/daemon/util/PausableTimeout.vala
index 2f75096..d05bb30 100644
--- a/src/daemon/util/PausableTimeout.vala
+++ b/src/daemon/util/PausableTimeout.vala
@@ -15,6 +15,8 @@
  * along with GNOME Break Timer.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+using BreakTimer.Common;
+
 namespace BreakTimer.Daemon.Util {
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]