[gnome-break-timer] Code formatting tweaks
- From: Dylan McCall <dylanmccall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-break-timer] Code formatting tweaks
- Date: Wed, 25 Nov 2020 00:36:08 +0000 (UTC)
commit 550120dd9b9049e0d1e3823780a61e26a72ac320
Author: Dylan McCall <dylan dylanmccall ca>
Date: Mon Nov 23 15:36:56 2020 -0800
Code formatting tweaks
src/common/IBreakTimer.vala | 13 ++++----
src/common/IBreakTimer_TimerBreak.vala | 13 ++++----
src/common/IFreedesktopApplication.vala | 13 ++++----
src/common/IGnomeScreenSaver.vala | 13 ++++----
src/common/IPortalBackground.vala | 13 ++++----
src/common/IPortalRequest.vala | 13 ++++----
src/common/ISessionStatus.vala | 13 ++++----
src/common/NaturalTime.vala | 21 +++++++------
src/common/TimeUnit.vala | 13 ++++----
src/daemon/Application.vala | 13 ++++----
src/daemon/BreakManager.vala | 19 +++++++-----
src/daemon/BreakManagerDBusObject.vala | 13 ++++----
src/daemon/SessionStatus.vala | 13 ++++----
src/daemon/UIFragment.vala | 13 ++++----
src/daemon/UIManager.vala | 13 ++++----
src/daemon/activity/ActivityMonitor.vala | 13 ++++----
src/daemon/activity/ActivityMonitorBackend.vala | 13 ++++----
.../activity/MutterActivityMonitorBackend.vala | 13 ++++----
src/daemon/activity/UserActivity.vala | 17 ++++++-----
src/daemon/break/BreakController.vala | 17 ++++++-----
src/daemon/break/BreakType.vala | 13 ++++----
src/daemon/break/BreakView.vala | 25 +++++++++-------
src/daemon/main.vala | 13 ++++----
src/daemon/microbreak/MicroBreakController.vala | 13 ++++----
src/daemon/microbreak/MicroBreakType.vala | 13 ++++----
src/daemon/microbreak/MicroBreakView.vala | 17 +++++++----
src/daemon/restbreak/RestBreakController.vala | 17 ++++++-----
src/daemon/restbreak/RestBreakType.vala | 13 ++++----
src/daemon/restbreak/RestBreakView.vala | 17 +++++++----
src/daemon/timerbreak/TimerBreakController.vala | 23 +++++++-------
src/daemon/timerbreak/TimerBreakDBusObject.vala | 13 ++++----
src/daemon/timerbreak/TimerBreakType.vala | 13 ++++----
src/daemon/timerbreak/TimerBreakView.vala | 17 +++++++----
src/daemon/util/Countdown.vala | 17 ++++++-----
src/daemon/util/PausableTimeout.vala | 13 ++++----
src/daemon/util/SimpleFocusManager.vala | 13 ++++----
src/daemon/util/StatefulTimer.vala | 17 ++++++-----
src/settings/Application.vala | 17 ++++++-----
src/settings/BreakManager.vala | 35 ++++++++++++----------
src/settings/BreakSettingsDialog.vala | 15 ++++++----
src/settings/MainWindow.vala | 25 +++++++++-------
src/settings/break/BreakInfoWidget.vala | 13 ++++----
src/settings/break/BreakSettingsWidget.vala | 13 ++++----
src/settings/break/BreakStatusWidget.vala | 13 ++++----
src/settings/break/BreakType.vala | 13 ++++----
src/settings/main.vala | 13 ++++----
src/settings/microbreak/MicroBreakInfoWidget.vala | 15 ++++++----
.../microbreak/MicroBreakSettingsWidget.vala | 13 ++++----
.../microbreak/MicroBreakStatusWidget.vala | 13 ++++----
src/settings/microbreak/MicroBreakType.vala | 13 ++++----
src/settings/panels/StatusPanel.vala | 13 ++++----
src/settings/panels/WelcomePanel.vala | 13 ++++----
src/settings/restbreak/RestBreakInfoWidget.vala | 15 ++++++----
.../restbreak/RestBreakSettingsWidget.vala | 13 ++++----
src/settings/restbreak/RestBreakStatusWidget.vala | 13 ++++----
src/settings/restbreak/RestBreakType.vala | 13 ++++----
.../timerbreak/TimerBreakSettingsWidget.vala | 17 ++++++-----
.../timerbreak/TimerBreakStatusWidget.vala | 17 ++++++-----
src/settings/timerbreak/TimerBreakType.vala | 13 ++++----
.../widgets/BreakConfigurationChooser.vala | 15 ++++++----
src/settings/widgets/CircleCounter.vala | 15 ++++++----
src/settings/widgets/FixedSizeGrid.vala | 13 ++++----
src/settings/widgets/OverlayArrow.vala | 13 ++++----
src/settings/widgets/TimeChooser.vala | 17 ++++++-----
src/settings/widgets/Transition.vala | 13 ++++----
tests/common/common_runner.vala | 13 ++++----
tests/common/test_NaturalTime.vala | 13 ++++----
tests/daemon-activity/daemon_activity_runner.vala | 13 ++++----
tests/daemon-activity/test_ActivityMonitor.vala | 14 +++++----
.../daemon_timerbreak_runner.vala | 13 ++++----
.../test_TimerBreakController.vala | 29 ++++++++++--------
tests/daemon-util/daemon_util_runner.vala | 13 ++++----
tests/daemon-util/test_Countdown.vala | 13 ++++----
tests/daemon-util/test_StatefulTimer.vala | 18 ++++++-----
tests/tests.vala | 23 +++++++-------
75 files changed, 682 insertions(+), 453 deletions(-)
---
diff --git a/src/common/IBreakTimer.vala b/src/common/IBreakTimer.vala
index 8f5a3a2..f78c8a9 100644
--- a/src/common/IBreakTimer.vala
+++ b/src/common/IBreakTimer.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* IBreakTimer.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/IBreakTimer_TimerBreak.vala b/src/common/IBreakTimer_TimerBreak.vala
index 688d69d..5a35a99 100644
--- a/src/common/IBreakTimer_TimerBreak.vala
+++ b/src/common/IBreakTimer_TimerBreak.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* IBreakTimer_TimerBreak.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/IFreedesktopApplication.vala b/src/common/IFreedesktopApplication.vala
index 704850c..84ddb98 100644
--- a/src/common/IFreedesktopApplication.vala
+++ b/src/common/IFreedesktopApplication.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* IFreedesktopApplication.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/IGnomeScreenSaver.vala b/src/common/IGnomeScreenSaver.vala
index a0b8025..7fca92d 100644
--- a/src/common/IGnomeScreenSaver.vala
+++ b/src/common/IGnomeScreenSaver.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* IGnomeScreenSaver.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/IPortalBackground.vala b/src/common/IPortalBackground.vala
index 049a18b..ab18ef4 100644
--- a/src/common/IPortalBackground.vala
+++ b/src/common/IPortalBackground.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* IPortalBackground.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/IPortalRequest.vala b/src/common/IPortalRequest.vala
index 1522514..54b222b 100644
--- a/src/common/IPortalRequest.vala
+++ b/src/common/IPortalRequest.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* IPortalRequest.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/ISessionStatus.vala b/src/common/ISessionStatus.vala
index 7c57915..8dcdb75 100644
--- a/src/common/ISessionStatus.vala
+++ b/src/common/ISessionStatus.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* ISessionStatus.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/common/NaturalTime.vala b/src/common/NaturalTime.vala
index b97006a..0cebff1 100644
--- a/src/common/NaturalTime.vala
+++ b/src/common/NaturalTime.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* NaturalTime.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
@@ -40,13 +43,13 @@ public class NaturalTime : GLib.Object {
private NaturalTime () {
this.units = {
TimeFormat (1, (time) => {
- return ngettext ("%d second", "%d seconds", time).printf(time);
+ return ngettext ("%d second", "%d seconds", time).printf (time);
}),
TimeFormat (60, (time) => {
- return ngettext ("%d minute", "%d minutes", time).printf(time);
+ return ngettext ("%d minute", "%d minutes", time).printf (time);
}),
TimeFormat (3600, (time) => {
- return ngettext ("%d hour", "%d hours", time).printf(time);
+ return ngettext ("%d hour", "%d hours", time).printf (time);
})
};
}
@@ -144,7 +147,7 @@ public class NaturalTime : GLib.Object {
} else {
interval = 60;
}
- int time_softened = ( (seconds-1) / interval) + 1;
+ int time_softened = ((seconds-1) / interval) + 1;
return time_softened * interval;
}
}
diff --git a/src/common/TimeUnit.vala b/src/common/TimeUnit.vala
index 95899ba..9fe953b 100644
--- a/src/common/TimeUnit.vala
+++ b/src/common/TimeUnit.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimeUnit.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Common {
diff --git a/src/daemon/Application.vala b/src/daemon/Application.vala
index f254319..1f5c460 100644
--- a/src/daemon/Application.vala
+++ b/src/daemon/Application.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* Application.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/BreakManager.vala b/src/daemon/BreakManager.vala
index 3d76803..ce64644 100644
--- a/src/daemon/BreakManager.vala
+++ b/src/daemon/BreakManager.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakManager.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
@@ -34,8 +37,8 @@ public class BreakManager : GLib.Object, GLib.Initable {
this.settings = new GLib.Settings ("org.gnome.BreakTimer");
this.breaks = new GLib.HashTable<string, BreakType> (str_hash, str_equal);
- this.breaks.set("microbreak", new MicroBreakType (activity_monitor, ui_manager));
- this.breaks.set("restbreak", new RestBreakType (activity_monitor, ui_manager));
+ this.breaks.set ("microbreak", new MicroBreakType (activity_monitor, ui_manager));
+ this.breaks.set ("restbreak", new RestBreakType (activity_monitor, ui_manager));
this.settings.bind ("enabled", this, "master-enabled", GLib.SettingsBindFlags.DEFAULT);
this.settings.bind ("selected-breaks", this, "selected-break-ids", GLib.SettingsBindFlags.DEFAULT);
@@ -46,7 +49,7 @@ public class BreakManager : GLib.Object, GLib.Initable {
}
public bool init (GLib.Cancellable? cancellable) throws GLib.Error {
- this.dbus_connection = GLib.Bus.get_sync(GLib.BusType.SESSION, cancellable);
+ this.dbus_connection = GLib.Bus.get_sync (GLib.BusType.SESSION, cancellable);
this.dbus_connection.register_object (
Config.DAEMON_OBJECT_PATH,
diff --git a/src/daemon/BreakManagerDBusObject.vala b/src/daemon/BreakManagerDBusObject.vala
index fa1f71b..8d2bb2f 100644
--- a/src/daemon/BreakManagerDBusObject.vala
+++ b/src/daemon/BreakManagerDBusObject.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakManagerDBusObject.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/SessionStatus.vala b/src/daemon/SessionStatus.vala
index a927384..b75b19b 100644
--- a/src/daemon/SessionStatus.vala
+++ b/src/daemon/SessionStatus.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* SessionStatus.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/UIFragment.vala b/src/daemon/UIFragment.vala
index bd5e0bc..1412b65 100644
--- a/src/daemon/UIFragment.vala
+++ b/src/daemon/UIFragment.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* UIFragment.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Util;
diff --git a/src/daemon/UIManager.vala b/src/daemon/UIManager.vala
index 543a529..9c10ece 100644
--- a/src/daemon/UIManager.vala
+++ b/src/daemon/UIManager.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* UIManager.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/activity/ActivityMonitor.vala b/src/daemon/activity/ActivityMonitor.vala
index b368f0b..f9b8933 100644
--- a/src/daemon/activity/ActivityMonitor.vala
+++ b/src/daemon/activity/ActivityMonitor.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* ActivityMonitor.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/activity/ActivityMonitorBackend.vala b/src/daemon/activity/ActivityMonitorBackend.vala
index 208965d..96e6e30 100644
--- a/src/daemon/activity/ActivityMonitorBackend.vala
+++ b/src/daemon/activity/ActivityMonitorBackend.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* ActivityMonitorBackend.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/activity/MutterActivityMonitorBackend.vala
b/src/daemon/activity/MutterActivityMonitorBackend.vala
index e4136c2..279e9b0 100644
--- a/src/daemon/activity/MutterActivityMonitorBackend.vala
+++ b/src/daemon/activity/MutterActivityMonitorBackend.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MutterActivityMonitorBackend.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/activity/UserActivity.vala b/src/daemon/activity/UserActivity.vala
index 0a7e37c..064263b 100644
--- a/src/daemon/activity/UserActivity.vala
+++ b/src/daemon/activity/UserActivity.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* UserActivity.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Daemon.Activity {
@@ -68,7 +71,7 @@ public enum ActivityType {
INPUT,
UNLOCK;
- public string to_string() {
+ public string to_string () {
switch (this) {
case SLEEP:
return "Sleep";
@@ -81,7 +84,7 @@ public enum ActivityType {
case UNLOCK:
return "Unlock";
default:
- assert_not_reached();
+ GLib.assert_not_reached ();
}
}
}
diff --git a/src/daemon/break/BreakController.vala b/src/daemon/break/BreakController.vala
index 46964f6..aec641e 100644
--- a/src/daemon/break/BreakController.vala
+++ b/src/daemon/break/BreakController.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakController.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -82,7 +85,7 @@ public abstract class BreakController : GLib.Object {
public virtual Json.Object serialize () {
Json.Object json_root = new Json.Object ();
- json_root.set_int_member ("state", (int)this.state);
+ json_root.set_int_member ("state", (int) this.state);
if (this.activate_timestamp == null) {
json_root.set_null_member ("activate_timestamp");
} else {
@@ -92,7 +95,7 @@ public abstract class BreakController : GLib.Object {
}
public virtual void deserialize (ref Json.Object json_root) {
- // State serialized_state = (State)json_root.get_int_member ("state");
+ // State serialized_state = (State) json_root.get_int_member ("state");
// We won't restore the original state directly. A BreakController
// implementation should decide whether to activate at this stage.
diff --git a/src/daemon/break/BreakType.vala b/src/daemon/break/BreakType.vala
index 8c3828b..52e8c61 100644
--- a/src/daemon/break/BreakType.vala
+++ b/src/daemon/break/BreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Daemon.Break {
diff --git a/src/daemon/break/BreakView.vala b/src/daemon/break/BreakView.vala
index e923f65..2d89a3b 100644
--- a/src/daemon/break/BreakView.vala
+++ b/src/daemon/break/BreakView.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakView.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -33,23 +36,23 @@ public abstract class BreakView : UIFragment {
this.ui_manager = ui_manager;
this.break_controller = break_controller;
- break_controller.enabled.connect ( () => {
+ break_controller.enabled.connect (() => {
this.ui_manager.add_break (this);
});
- break_controller.disabled.connect ( () => {
+ break_controller.disabled.connect (() => {
this.ui_manager.remove_break (this);
});
- break_controller.warned.connect ( () => {
+ break_controller.warned.connect (() => {
this.request_ui_focus ();
});
- break_controller.unwarned.connect ( () => {
+ break_controller.unwarned.connect (() => {
this.release_ui_focus ();
});
- break_controller.activated.connect ( () => {
+ break_controller.activated.connect (() => {
this.request_ui_focus ();
});
- break_controller.finished.connect_after ( () => {
+ break_controller.finished.connect_after (() => {
this.release_ui_focus ();
});
}
diff --git a/src/daemon/main.vala b/src/daemon/main.vala
index cf7f8ed..32d5762 100644
--- a/src/daemon/main.vala
+++ b/src/daemon/main.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* main.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Daemon {
diff --git a/src/daemon/microbreak/MicroBreakController.vala b/src/daemon/microbreak/MicroBreakController.vala
index c48ac8e..1919bdd 100644
--- a/src/daemon/microbreak/MicroBreakController.vala
+++ b/src/daemon/microbreak/MicroBreakController.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakController.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
diff --git a/src/daemon/microbreak/MicroBreakType.vala b/src/daemon/microbreak/MicroBreakType.vala
index e7c85fc..00aa735 100644
--- a/src/daemon/microbreak/MicroBreakType.vala
+++ b/src/daemon/microbreak/MicroBreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
diff --git a/src/daemon/microbreak/MicroBreakView.vala b/src/daemon/microbreak/MicroBreakView.vala
index 2f3c360..79e579a 100644
--- a/src/daemon/microbreak/MicroBreakView.vala
+++ b/src/daemon/microbreak/MicroBreakView.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakView.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -27,7 +30,9 @@ namespace BreakTimer.Daemon.MicroBreak {
public class MicroBreakView : TimerBreakView {
protected MicroBreakController micro_break {
- get { return (MicroBreakController)this.break_controller; }
+ get {
+ return (MicroBreakController) this.break_controller;
+ }
}
private int delay_time_notified = 0;
diff --git a/src/daemon/restbreak/RestBreakController.vala b/src/daemon/restbreak/RestBreakController.vala
index 905bec2..828903c 100644
--- a/src/daemon/restbreak/RestBreakController.vala
+++ b/src/daemon/restbreak/RestBreakController.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakController.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
@@ -38,10 +41,10 @@ public class RestBreakController : TimerBreakController {
// Countdown for an extra reminder that a break is ongoing, if the
// user is ignoring it
this.reminder_countdown = new Countdown (this.interval / 4);
- this.notify["interval"].connect ( (s, p) => {
+ this.notify["interval"].connect ((s, p) => {
this.reminder_countdown.set_base_duration (this.interval / 4);
});
- this.activated.connect ( () => {
+ this.activated.connect (() => {
this.reminder_countdown.reset ();
});
diff --git a/src/daemon/restbreak/RestBreakType.vala b/src/daemon/restbreak/RestBreakType.vala
index eb30091..e3e8e6b 100644
--- a/src/daemon/restbreak/RestBreakType.vala
+++ b/src/daemon/restbreak/RestBreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
diff --git a/src/daemon/restbreak/RestBreakView.vala b/src/daemon/restbreak/RestBreakView.vala
index 36f3ed9..bfbbd7f 100644
--- a/src/daemon/restbreak/RestBreakView.vala
+++ b/src/daemon/restbreak/RestBreakView.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakView.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -26,7 +29,9 @@ namespace BreakTimer.Daemon.RestBreak {
public class RestBreakView : TimerBreakView {
protected RestBreakController rest_break {
- get { return (RestBreakController)this.break_controller; }
+ get {
+ return (RestBreakController) this.break_controller;
+ }
}
private int64 original_start_time = 0;
diff --git a/src/daemon/timerbreak/TimerBreakController.vala b/src/daemon/timerbreak/TimerBreakController.vala
index f63c273..2d26bbb 100644
--- a/src/daemon/timerbreak/TimerBreakController.vala
+++ b/src/daemon/timerbreak/TimerBreakController.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakController.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
@@ -55,10 +58,10 @@ public abstract class TimerBreakController : BreakController {
this.duration_countdown = new Countdown (this.duration);
this.countdowns_timeout = new PausableTimeout (this.update_countdowns, 1);
- this.notify["interval"].connect ( (s, p) => {
+ this.notify["interval"].connect ((s, p) => {
this.interval_countdown.set_base_duration (this.interval);
});
- this.notify["duration"].connect ( (s, p) => {
+ this.notify["duration"].connect ((s, p) => {
this.duration_countdown.set_base_duration (this.duration);
// Unwarn (for now) in case the new duration is shorter than the old one
if (this.state == State.WAITING) this.unwarn ();
@@ -200,7 +203,7 @@ public abstract class TimerBreakController : BreakController {
this.counting (
lap_time,
- (int)this.counting_timer.elapsed ()
+ (int) this.counting_timer.elapsed ()
);
this.countdowns_timeout.run_once ();
}
@@ -215,7 +218,7 @@ public abstract class TimerBreakController : BreakController {
this.delayed_timer.start_lap ();
lap_time = 0;
} else {
- lap_time = (int)this.delayed_timer.lap_time ();
+ lap_time = (int) this.delayed_timer.lap_time ();
}
this.duration_countdown.pause ();
@@ -225,7 +228,7 @@ public abstract class TimerBreakController : BreakController {
this.delayed (
lap_time,
- (int)this.delayed_timer.elapsed ()
+ (int) this.delayed_timer.elapsed ()
);
this.countdowns_timeout.run_once ();
}
diff --git a/src/daemon/timerbreak/TimerBreakDBusObject.vala b/src/daemon/timerbreak/TimerBreakDBusObject.vala
index 3ea5318..38ff5b1 100644
--- a/src/daemon/timerbreak/TimerBreakDBusObject.vala
+++ b/src/daemon/timerbreak/TimerBreakDBusObject.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakDBusObject.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/timerbreak/TimerBreakType.vala b/src/daemon/timerbreak/TimerBreakType.vala
index b0f29b0..cc92474 100644
--- a/src/daemon/timerbreak/TimerBreakType.vala
+++ b/src/daemon/timerbreak/TimerBreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Break;
diff --git a/src/daemon/timerbreak/TimerBreakView.vala b/src/daemon/timerbreak/TimerBreakView.vala
index a045d12..0faf735 100644
--- a/src/daemon/timerbreak/TimerBreakView.vala
+++ b/src/daemon/timerbreak/TimerBreakView.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakView.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Break;
@@ -21,7 +24,9 @@ namespace BreakTimer.Daemon.TimerBreak {
public abstract class TimerBreakView : BreakView {
protected TimerBreakController timer_break {
- get { return (TimerBreakController)this.break_controller; }
+ get {
+ return (TimerBreakController) this.break_controller;
+ }
}
protected TimerBreakView (TimerBreakController timer_break, UIManager ui_manager) {
diff --git a/src/daemon/util/Countdown.vala b/src/daemon/util/Countdown.vala
index 03e0922..7dc5ea1 100644
--- a/src/daemon/util/Countdown.vala
+++ b/src/daemon/util/Countdown.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* Countdown.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -49,7 +52,7 @@ public class Countdown : GLib.Object {
serialized_time_counted = int.max (0, serialized_time_counted);
return string.joinv (",", {
- ( (int)this.state).to_string (),
+ ((int) this.state).to_string (),
this.start_time.to_string (),
this.stop_time_elapsed.to_string (),
this.penalty.to_string (),
@@ -60,7 +63,7 @@ public class Countdown : GLib.Object {
public void deserialize (string data, bool persistent = false) {
string[] data_parts = data.split (",");
- State serialized_state = (State)int.parse (data_parts[0]);
+ State serialized_state = (State) int.parse (data_parts[0]);
switch (serialized_state) {
case State.STOPPED:
diff --git a/src/daemon/util/PausableTimeout.vala b/src/daemon/util/PausableTimeout.vala
index 476f856..073054a 100644
--- a/src/daemon/util/PausableTimeout.vala
+++ b/src/daemon/util/PausableTimeout.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* PausableTimeout.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/daemon/util/SimpleFocusManager.vala b/src/daemon/util/SimpleFocusManager.vala
index 377022d..35ced9a 100644
--- a/src/daemon/util/SimpleFocusManager.vala
+++ b/src/daemon/util/SimpleFocusManager.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* SimpleFocusManager.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Daemon.Util {
diff --git a/src/daemon/util/StatefulTimer.vala b/src/daemon/util/StatefulTimer.vala
index a465556..0904e37 100644
--- a/src/daemon/util/StatefulTimer.vala
+++ b/src/daemon/util/StatefulTimer.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* StatefulTimer.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Daemon.Util {
@@ -42,7 +45,7 @@ public class StatefulTimer : GLib.Object {
public string serialize () {
return string.joinv (",", {
- ( (int)this.state).to_string (),
+ ((int) this.state).to_string (),
this.elapsed ().to_string (),
this.lap_start.to_string ()
});
@@ -50,7 +53,7 @@ public class StatefulTimer : GLib.Object {
public void deserialize (string data) {
string[] data_parts = data.split (",");
- State old_state = (State)int.parse (data_parts[0]);
+ State old_state = (State) int.parse (data_parts[0]);
double old_elapsed = double.parse (data_parts[1]);
double old_lap_start = double.parse (data_parts[2]);
diff --git a/src/settings/Application.vala b/src/settings/Application.vala
index 56c5512..d9bdfdc 100644
--- a/src/settings/Application.vala
+++ b/src/settings/Application.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* Application.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings {
@@ -109,14 +112,14 @@ public class Application : Gtk.Application {
try {
this.break_manager.init (null);
} catch (GLib.Error error) {
- GLib.error("Error initializing break_manager: %s", error.message);
+ GLib.error ("Error initializing break_manager: %s", error.message);
}
this.main_window = new MainWindow (this, this.break_manager);
try {
this.main_window.init (null);
} catch (GLib.Error error) {
- GLib.error("Error initializing main_window: %s", error.message);
+ GLib.error ("Error initializing main_window: %s", error.message);
}
this.main_window.window_state_event.connect (this.on_main_window_window_state_event);
diff --git a/src/settings/BreakManager.vala b/src/settings/BreakManager.vala
index 2ea406a..e09f958 100644
--- a/src/settings/BreakManager.vala
+++ b/src/settings/BreakManager.vala
@@ -1,22 +1,25 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakManager.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
-// TODO: This intentionally resembles BreakManager from the daemon
-// application. Ideally, it should be common code in the future.
+// TODO: This intentionally resembles BreakManager from the daemon application.
+// Ideally, it should be common code in the future.
using BreakTimer.Common;
using BreakTimer.Settings.Break;
@@ -61,15 +64,15 @@ public class BreakManager : GLib.Object {
this.settings = new GLib.Settings ("org.gnome.BreakTimer");
this.breaks = new GLib.List<BreakType> ();
- this.breaks.append(new MicroBreakType ());
- this.breaks.append(new RestBreakType ());
+ this.breaks.append (new MicroBreakType ());
+ this.breaks.append (new RestBreakType ());
this.permissions_error = PermissionsError.NONE;
this.settings.bind ("enabled", this, "master-enabled", SettingsBindFlags.DEFAULT);
this.settings.bind ("selected-breaks", this, "selected-break-ids", SettingsBindFlags.DEFAULT);
- this.notify["master-enabled"].connect ( this.on_master_enabled_changed );
+ this.notify["master-enabled"].connect (this.on_master_enabled_changed);
}
public bool init (GLib.Cancellable? cancellable) throws GLib.Error {
@@ -123,9 +126,9 @@ public class BreakManager : GLib.Object {
return false;
}
- string sender_name = this.dbus_connection.unique_name.replace(".", "_")[1:];
- string handle_token = "org_gnome_breaktimer%d".printf(
- GLib.Random.int_range(0, int.MAX)
+ string sender_name = this.dbus_connection.unique_name.replace (".", "_")[1:];
+ string handle_token = "org_gnome_breaktimer%d".printf (
+ GLib.Random.int_range (0, int.MAX)
);
var options = new HashTable<string, GLib.Variant> (str_hash, str_equal);
@@ -139,8 +142,8 @@ public class BreakManager : GLib.Object {
options.insert ("dbus-activatable", true);
GLib.ObjectPath request_path = null;
- GLib.ObjectPath expected_request_path = new GLib.ObjectPath(
- "/org/freedesktop/portal/desktop/request/%s/%s".printf(
+ GLib.ObjectPath expected_request_path = new GLib.ObjectPath (
+ "/org/freedesktop/portal/desktop/request/%s/%s".printf (
sender_name,
handle_token
)
@@ -153,7 +156,7 @@ public class BreakManager : GLib.Object {
// background portal can probably do without.
// TODO: Handle response, and display an error if the result
// includes `autostart == false || background == false`.
- request_path = this.background_portal.request_background("", options);
+ request_path = this.background_portal.request_background ("", options);
} catch (GLib.IOError error) {
GLib.warning ("Error connecting to desktop portal: %s", error.message);
return false;
diff --git a/src/settings/BreakSettingsDialog.vala b/src/settings/BreakSettingsDialog.vala
index 4a4f084..67a2431 100644
--- a/src/settings/BreakSettingsDialog.vala
+++ b/src/settings/BreakSettingsDialog.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakSettingsDialog.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.Break;
@@ -35,7 +38,7 @@ public class BreakSettingsDialog : Gtk.Dialog {
GLib.Settings settings = new GLib.Settings ("org.gnome.BreakTimer");
- this.set_title ( _("Choose Your Break Schedule"));
+ this.set_title (_("Choose Your Break Schedule"));
this.set_resizable (false);
this.delete_event.connect (this.hide_on_delete);
diff --git a/src/settings/MainWindow.vala b/src/settings/MainWindow.vala
index 8d9291e..cec3c72 100644
--- a/src/settings/MainWindow.vala
+++ b/src/settings/MainWindow.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MainWindow.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -104,7 +107,7 @@ public class MainWindow : Gtk.ApplicationWindow, GLib.Initable {
this.message_bars = new GLib.HashTable<string, MessageBar> (str_hash, str_equal);
- this.set_title ( _("Break Timer"));
+ this.set_title (_("Break Timer"));
this.set_default_size (850, 400);
Gtk.Builder builder = new Gtk.Builder ();
@@ -115,8 +118,8 @@ public class MainWindow : Gtk.ApplicationWindow, GLib.Initable {
}
this.app_menu = new GLib.Menu ();
- this.app_menu.append ( _("About"), "app.about");
- this.app_menu.append ( _("Quit"), "app.quit");
+ this.app_menu.append (_("About"), "app.about");
+ this.app_menu.append (_("Quit"), "app.quit");
this.break_settings_dialog = new BreakSettingsDialog (break_manager);
this.break_settings_dialog.set_modal (true);
@@ -216,7 +219,7 @@ public class MainWindow : Gtk.ApplicationWindow, GLib.Initable {
this.messages_box.pack_end (message_bar);
message_bar.show ();
message_bar.close_message_bar.connect (() => {
- this.hide_message_bar(message_id);
+ this.hide_message_bar (message_id);
});
}
@@ -253,13 +256,13 @@ public class MainWindow : Gtk.ApplicationWindow, GLib.Initable {
BreakType? foreground_break = this.break_manager.foreground_break;
if (this.welcome_panel.is_active ()) {
this.main_stack.set_visible_child_full ("welcome_panel", transition);
- this.header.set_title ( _("Welcome Tour"));
+ this.header.set_title (_("Welcome Tour"));
} else if (foreground_break != null) {
this.main_stack.set_visible_child_full (foreground_break.id, transition);
this.header.set_title (foreground_break.info_widget.title);
} else {
this.main_stack.set_visible_child_full ("status_panel", transition);
- this.header.set_title ( _("Break Timer"));
+ this.header.set_title (_("Break Timer"));
}
}
diff --git a/src/settings/break/BreakInfoWidget.vala b/src/settings/break/BreakInfoWidget.vala
index 44047f7..37cdadd 100644
--- a/src/settings/break/BreakInfoWidget.vala
+++ b/src/settings/break/BreakInfoWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakInfoWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Break {
diff --git a/src/settings/break/BreakSettingsWidget.vala b/src/settings/break/BreakSettingsWidget.vala
index 0000eda..25ca960 100644
--- a/src/settings/break/BreakSettingsWidget.vala
+++ b/src/settings/break/BreakSettingsWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakSettingsWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Break {
diff --git a/src/settings/break/BreakStatusWidget.vala b/src/settings/break/BreakStatusWidget.vala
index b9df81f..2336548 100644
--- a/src/settings/break/BreakStatusWidget.vala
+++ b/src/settings/break/BreakStatusWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakStatusWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Break {
diff --git a/src/settings/break/BreakType.vala b/src/settings/break/BreakType.vala
index a1db481..1678522 100644
--- a/src/settings/break/BreakType.vala
+++ b/src/settings/break/BreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/settings/main.vala b/src/settings/main.vala
index dbd9025..cf3de75 100644
--- a/src/settings/main.vala
+++ b/src/settings/main.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* main.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings {
diff --git a/src/settings/microbreak/MicroBreakInfoWidget.vala
b/src/settings/microbreak/MicroBreakInfoWidget.vala
index da0e8ee..e52f0e8 100644
--- a/src/settings/microbreak/MicroBreakInfoWidget.vala
+++ b/src/settings/microbreak/MicroBreakInfoWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakInfoWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -51,7 +54,7 @@ class MicroBreakInfoWidget : BreakInfoWidget {
time_remaining_value
).printf (time_remaining_text);
- this.set_heading ( _("It’s microbreak time"));
+ this.set_heading (_("It’s microbreak time"));
this.set_description (description_text);
this.set_detail (_("I'll chime when it’s time to use the computer again."));
}
diff --git a/src/settings/microbreak/MicroBreakSettingsWidget.vala
b/src/settings/microbreak/MicroBreakSettingsWidget.vala
index 2e52ed5..a528d10 100644
--- a/src/settings/microbreak/MicroBreakSettingsWidget.vala
+++ b/src/settings/microbreak/MicroBreakSettingsWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakSettingsWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.TimerBreak;
diff --git a/src/settings/microbreak/MicroBreakStatusWidget.vala
b/src/settings/microbreak/MicroBreakStatusWidget.vala
index e482122..d1ae314 100644
--- a/src/settings/microbreak/MicroBreakStatusWidget.vala
+++ b/src/settings/microbreak/MicroBreakStatusWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakStatusWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.TimerBreak;
diff --git a/src/settings/microbreak/MicroBreakType.vala b/src/settings/microbreak/MicroBreakType.vala
index c8461ad..133d6d1 100644
--- a/src/settings/microbreak/MicroBreakType.vala
+++ b/src/settings/microbreak/MicroBreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* MicroBreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.Break;
diff --git a/src/settings/panels/StatusPanel.vala b/src/settings/panels/StatusPanel.vala
index 46867c8..12784e0 100644
--- a/src/settings/panels/StatusPanel.vala
+++ b/src/settings/panels/StatusPanel.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* StatusPanel.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.Break;
diff --git a/src/settings/panels/WelcomePanel.vala b/src/settings/panels/WelcomePanel.vala
index 60ab750..9598a55 100644
--- a/src/settings/panels/WelcomePanel.vala
+++ b/src/settings/panels/WelcomePanel.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* WelcomePanel.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.Widgets;
diff --git a/src/settings/restbreak/RestBreakInfoWidget.vala b/src/settings/restbreak/RestBreakInfoWidget.vala
index b545b3d..68554dd 100644
--- a/src/settings/restbreak/RestBreakInfoWidget.vala
+++ b/src/settings/restbreak/RestBreakInfoWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakInfoWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -51,7 +54,7 @@ class RestBreakInfoWidget : BreakInfoWidget {
time_remaining_value
).printf (time_remaining_text);
- this.set_heading ( _("It’s break time"));
+ this.set_heading (_("It’s break time"));
this.set_description (_("Take some time away from the computer. Stretch and move around."));
this.set_detail (detail_text);
}
diff --git a/src/settings/restbreak/RestBreakSettingsWidget.vala
b/src/settings/restbreak/RestBreakSettingsWidget.vala
index 4651d78..df192b0 100644
--- a/src/settings/restbreak/RestBreakSettingsWidget.vala
+++ b/src/settings/restbreak/RestBreakSettingsWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakSettingsWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.TimerBreak;
diff --git a/src/settings/restbreak/RestBreakStatusWidget.vala
b/src/settings/restbreak/RestBreakStatusWidget.vala
index 69fb833..1e757c4 100644
--- a/src/settings/restbreak/RestBreakStatusWidget.vala
+++ b/src/settings/restbreak/RestBreakStatusWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakStatusWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.TimerBreak;
diff --git a/src/settings/restbreak/RestBreakType.vala b/src/settings/restbreak/RestBreakType.vala
index 51cae19..d4894af 100644
--- a/src/settings/restbreak/RestBreakType.vala
+++ b/src/settings/restbreak/RestBreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* RestBreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.Break;
diff --git a/src/settings/timerbreak/TimerBreakSettingsWidget.vala
b/src/settings/timerbreak/TimerBreakSettingsWidget.vala
index b7bf00b..47080e0 100644
--- a/src/settings/timerbreak/TimerBreakSettingsWidget.vala
+++ b/src/settings/timerbreak/TimerBreakSettingsWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakSettingsWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Settings.Break;
@@ -31,7 +34,7 @@ public abstract class TimerBreakSettingsWidget : BreakSettingsWidget {
details_grid.set_row_spacing (8);
/* Label for the widget to choose how frequently a break occurs. (Choices such as "6 minutes" or "45
minutes") */
- var interval_label = new Gtk.Label.with_mnemonic ( _("Every"));
+ var interval_label = new Gtk.Label.with_mnemonic (_("Every"));
interval_label.set_halign (Gtk.Align.END);
details_grid.attach (interval_label, 0, 1, 1, 1);
@@ -40,7 +43,7 @@ public abstract class TimerBreakSettingsWidget : BreakSettingsWidget {
break_type.settings.bind ("interval-seconds", interval_chooser, "time-seconds",
SettingsBindFlags.DEFAULT);
/* Label for the widget to choose how long a break lasts when it occurs. (Choices such as "30
seconds" or "5 minutes") */
- var duration_label = new Gtk.Label.with_mnemonic ( _("For"));
+ var duration_label = new Gtk.Label.with_mnemonic (_("For"));
duration_label.set_halign (Gtk.Align.END);
details_grid.attach (duration_label, 0, 2, 1, 1);
diff --git a/src/settings/timerbreak/TimerBreakStatusWidget.vala
b/src/settings/timerbreak/TimerBreakStatusWidget.vala
index 215e6c3..191f56d 100644
--- a/src/settings/timerbreak/TimerBreakStatusWidget.vala
+++ b/src/settings/timerbreak/TimerBreakStatusWidget.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakStatusWidget.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -73,13 +76,13 @@ public abstract class TimerBreakStatusWidget : BreakStatusWidget {
status.time_remaining, status.current_duration);
this.time_label.set_label (time_text);
this.circle_counter.direction = CircleCounter.Direction.COUNT_DOWN;
- this.circle_counter.progress = (status.current_duration - status.time_remaining) /
(double)status.current_duration;
+ this.circle_counter.progress = (status.current_duration - status.time_remaining) / (double)
status.current_duration;
} else {
this.status_label.set_label (this.upcoming_text);
string time_text = NaturalTime.instance.get_countdown_for_seconds (status.starts_in);
this.time_label.set_label (time_text);
this.circle_counter.direction = CircleCounter.Direction.COUNT_UP;
- this.circle_counter.progress = (timer_break.interval - status.starts_in) /
(double)timer_break.interval;
+ this.circle_counter.progress = (timer_break.interval - status.starts_in) / (double)
timer_break.interval;
}
}
}
diff --git a/src/settings/timerbreak/TimerBreakType.vala b/src/settings/timerbreak/TimerBreakType.vala
index 5462951..e13c244 100644
--- a/src/settings/timerbreak/TimerBreakType.vala
+++ b/src/settings/timerbreak/TimerBreakType.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimerBreakType.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/src/settings/widgets/BreakConfigurationChooser.vala
b/src/settings/widgets/BreakConfigurationChooser.vala
index 42477d2..45200b0 100644
--- a/src/settings/widgets/BreakConfigurationChooser.vala
+++ b/src/settings/widgets/BreakConfigurationChooser.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* BreakConfigurationChooser.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Widgets {
@@ -75,7 +78,7 @@ class BreakConfigurationChooser : Gtk.ComboBox {
if (this.get_active_iter (out iter)) {
Value value;
this.list_store.get_value (iter, 0, out value);
- Configuration configuration = (Configuration)value;
+ Configuration configuration = (Configuration) value;
this.selected_break_ids = configuration.break_ids;
}
}
diff --git a/src/settings/widgets/CircleCounter.vala b/src/settings/widgets/CircleCounter.vala
index b3a8389..a17dfa7 100644
--- a/src/settings/widgets/CircleCounter.vala
+++ b/src/settings/widgets/CircleCounter.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* CircleCounter.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -136,7 +139,7 @@ public class CircleCounter : Gtk.Widget {
int center_x = allocation.width / 2;
int center_y = allocation.height / 2;
- int radius = int.min(center_x, center_y);
+ int radius = int.min (center_x, center_y);
double arc_radius = radius - LINE_WIDTH / 2;
Gdk.RGBA foreground_color = style_context.get_color (state);
diff --git a/src/settings/widgets/FixedSizeGrid.vala b/src/settings/widgets/FixedSizeGrid.vala
index b77e8dd..3c195c3 100644
--- a/src/settings/widgets/FixedSizeGrid.vala
+++ b/src/settings/widgets/FixedSizeGrid.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* FixedSizeGrid.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Widgets {
diff --git a/src/settings/widgets/OverlayArrow.vala b/src/settings/widgets/OverlayArrow.vala
index 6402c94..81df367 100644
--- a/src/settings/widgets/OverlayArrow.vala
+++ b/src/settings/widgets/OverlayArrow.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* OverlayArrow.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Widgets {
diff --git a/src/settings/widgets/TimeChooser.vala b/src/settings/widgets/TimeChooser.vala
index ff05a07..4938323 100644
--- a/src/settings/widgets/TimeChooser.vala
+++ b/src/settings/widgets/TimeChooser.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* TimeChooser.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
@@ -50,7 +53,7 @@ public class TimeChooser : Gtk.ComboBox {
this.changed.connect (this.on_changed);
- this.notify["time-seconds"].connect ( (s, p) => {
+ this.notify["time-seconds"].connect ((s, p) => {
this.set_time (this.time_seconds);
});
}
@@ -120,7 +123,7 @@ public class TimeChooser : Gtk.ComboBox {
}
private void start_custom_input () {
- GLib.warning("Custom time input is not implemented");
+ GLib.warning ("Custom time input is not implemented");
}
}
diff --git a/src/settings/widgets/Transition.vala b/src/settings/widgets/Transition.vala
index 9f8c084..339479d 100644
--- a/src/settings/widgets/Transition.vala
+++ b/src/settings/widgets/Transition.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* Transition.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Settings.Widgets {
diff --git a/tests/common/common_runner.vala b/tests/common/common_runner.vala
index 8136498..187248b 100644
--- a/tests/common/common_runner.vala
+++ b/tests/common/common_runner.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* common_runner.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Tests.Common {
diff --git a/tests/common/test_NaturalTime.vala b/tests/common/test_NaturalTime.vala
index e22612b..3f60cfc 100644
--- a/tests/common/test_NaturalTime.vala
+++ b/tests/common/test_NaturalTime.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* test_NaturalTime.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Common;
diff --git a/tests/daemon-activity/daemon_activity_runner.vala
b/tests/daemon-activity/daemon_activity_runner.vala
index ba60fec..5bdbd27 100644
--- a/tests/daemon-activity/daemon_activity_runner.vala
+++ b/tests/daemon-activity/daemon_activity_runner.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* daemon_activity_runner.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Tests.Daemon.Activity {
diff --git a/tests/daemon-activity/test_ActivityMonitor.vala b/tests/daemon-activity/test_ActivityMonitor.vala
index caf4906..468b3f5 100644
--- a/tests/daemon-activity/test_ActivityMonitor.vala
+++ b/tests/daemon-activity/test_ActivityMonitor.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* test_ActivityMonitor.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
@@ -39,7 +42,6 @@ public class test_ActivityMonitor : TestSuiteWithActivityMonitor {
assert (context.activity_log.nth_data (0).type == ActivityType.NONE);
assert (context.activity_log.nth_data (0).is_active () == false);
- stdout.printf("IDLE TIME: %d\n", (int) context.activity_log.nth_data (0).idle_time);
assert (context.activity_log.nth_data (0).idle_time == 10);
assert (context.activity_log.nth_data (1).type == ActivityType.NONE);
diff --git a/tests/daemon-timerbreak/daemon_timerbreak_runner.vala
b/tests/daemon-timerbreak/daemon_timerbreak_runner.vala
index b45fa80..87d32bb 100644
--- a/tests/daemon-timerbreak/daemon_timerbreak_runner.vala
+++ b/tests/daemon-timerbreak/daemon_timerbreak_runner.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* daemon_timerbreak_runner.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Tests.Daemon.TimerBreak {
diff --git a/tests/daemon-timerbreak/test_TimerBreakController.vala
b/tests/daemon-timerbreak/test_TimerBreakController.vala
index 99f00ec..fa80e81 100644
--- a/tests/daemon-timerbreak/test_TimerBreakController.vala
+++ b/tests/daemon-timerbreak/test_TimerBreakController.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* test_TimerBreakController.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Activity;
@@ -83,15 +86,15 @@ public class test_TimerBreakController : TestSuiteWithActivityMonitor {
this.break_controller.duration = DEFAULT_DURATION;
this.break_controller.set_enabled (true);
- this.break_controller.enabled.connect ( () => { this.log_break_message ("enabled"); } );
- this.break_controller.disabled.connect ( () => { this.log_break_message ("disabled"); } );
- this.break_controller.warned.connect ( () => { this.log_break_message ("warned"); } );
- this.break_controller.unwarned.connect ( () => { this.log_break_message ("unwarned"); } );
- this.break_controller.activated.connect ( () => { this.log_break_message ("activated"); } );
- this.break_controller.finished.connect ( () => { this.log_break_message ("finished"); } );
+ this.break_controller.enabled.connect (() => { this.log_break_message ("enabled"); } );
+ this.break_controller.disabled.connect (() => { this.log_break_message ("disabled"); } );
+ this.break_controller.warned.connect (() => { this.log_break_message ("warned"); } );
+ this.break_controller.unwarned.connect (() => { this.log_break_message ("unwarned"); } );
+ this.break_controller.activated.connect (() => { this.log_break_message ("activated"); } );
+ this.break_controller.finished.connect (() => { this.log_break_message ("finished"); } );
- this.break_controller.counting.connect ( () => { this.log_break_message ("counting"); } );
- this.break_controller.delayed.connect ( () => { this.log_break_message ("delayed"); } );
+ this.break_controller.counting.connect (() => { this.log_break_message ("counting"); } );
+ this.break_controller.delayed.connect (() => { this.log_break_message ("delayed"); } );
}
public override void time_step (bool is_active, int real_seconds, int monotonic_seconds) {
diff --git a/tests/daemon-util/daemon_util_runner.vala b/tests/daemon-util/daemon_util_runner.vala
index 4cd53c6..6d92a23 100644
--- a/tests/daemon-util/daemon_util_runner.vala
+++ b/tests/daemon-util/daemon_util_runner.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* daemon_util_runner.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace BreakTimer.Tests.Daemon.Util {
diff --git a/tests/daemon-util/test_Countdown.vala b/tests/daemon-util/test_Countdown.vala
index 90de583..5de57f3 100644
--- a/tests/daemon-util/test_Countdown.vala
+++ b/tests/daemon-util/test_Countdown.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* test_Countdown.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Util;
diff --git a/tests/daemon-util/test_StatefulTimer.vala b/tests/daemon-util/test_StatefulTimer.vala
index 6632759..1957384 100644
--- a/tests/daemon-util/test_StatefulTimer.vala
+++ b/tests/daemon-util/test_StatefulTimer.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* test_StatefulTimer.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
using BreakTimer.Daemon.Util;
@@ -99,10 +102,9 @@ public class test_StatefulTimer : TestSuiteWithActivityMonitor {
timer.deserialize (data);
assert (timer.state == StatefulTimer.State.STOPPED);
- // FIXME: These asserts fail unpredictably on i386 with Launchpad's build service
// Convert time values to ints to deal with floating point errors
- // assert ((int)timer.elapsed () == 20);
- // assert ((int)timer.lap_time () == 5);
+ assert ((int)timer.elapsed () == 20);
+ assert ((int)timer.lap_time () == 5);
}
}
}
diff --git a/tests/tests.vala b/tests/tests.vala
index 1ec2d51..9e611cd 100644
--- a/tests/tests.vala
+++ b/tests/tests.vala
@@ -1,18 +1,21 @@
-/*
- * This file is part of GNOME Break Timer.
+/* tests.vala
*
- * GNOME Break Timer is free software: you can redistribute it and/or modify
+ * Copyright 2020 Dylan McCall <dylan dylanmccall ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * GNOME Break Timer is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with GNOME Break Timer. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
// GLib's TestSuite and TestCase are compact classes, so we wrap them in real GLib.Objects for convenience
@@ -34,7 +37,7 @@ public abstract class SimpleTestSuite : GLib.Object {
public Adaptor (SimpleTestSuite test_suite, owned SimpleTestCase<SimpleTestSuite> test) {
this.test_suite = test_suite;
- this.test = (owned)test;
+ this.test = (owned) test;
}
private string get_short_name () {
@@ -62,9 +65,9 @@ public abstract class SimpleTestSuite : GLib.Object {
public GLib.TestCase get_g_test_case () {
return new GLib.TestCase (
this.get_short_name (),
- (TestFixtureFunc)this.setup,
- (TestFixtureFunc)this.run,
- (TestFixtureFunc)this.teardown
+ (TestFixtureFunc) this.setup,
+ (TestFixtureFunc) this.run,
+ (TestFixtureFunc) this.teardown
);
}
}
@@ -87,7 +90,7 @@ public abstract class SimpleTestSuite : GLib.Object {
}
public void add_test (owned SimpleTestCase test) {
- var adaptor = new Adaptor (this, (owned)test);
+ var adaptor = new Adaptor (this, (owned) test);
this.adaptors += adaptor;
this.g_test_suite.add (adaptor.get_g_test_case ());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]