[gnome-break-timer] Add a "development" build profile
- From: Dylan McCall <dylanmccall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-break-timer] Add a "development" build profile
- Date: Wed, 25 Nov 2020 00:36:08 +0000 (UTC)
commit 4aa83b91818637c5cd85830547ef3ec7a85ff747
Author: Dylan McCall <dylan dylanmccall ca>
Date: Mon Nov 23 17:19:45 2020 -0800
Add a "development" build profile
.gitlab-ci.yml | 4 +-
...kTimer.json => org.gnome.BreakTimer.Devel.json} | 9 +-
data/applications/meson.build | 16 ++-
...=> org.gnome.BreakTimer.Settings.desktop.in.in} | 2 +-
...sktop.in => org.gnome.BreakTimer.desktop.in.in} | 2 +-
data/autostart/meson.build | 10 +-
...sktop.in => org.gnome.BreakTimer.desktop.in.in} | 2 +-
data/dbus/meson.build | 4 +-
data/dbus/org.gnome.BreakTimer.Settings.service.in | 2 +-
data/dbus/org.gnome.BreakTimer.service.in | 2 +-
data/gschema/meson.build | 20 +++-
...l.in => org.gnome.BreakTimer.gschema.xml.in.in} | 10 +-
.../scalable/apps/org.gnome.BreakTimer.Devel.svg | 113 +++++++++++++++++++++
data/meson.build | 1 +
data/metainfo/meson.build | 12 ++-
....in => org.gnome.BreakTimer.metainfo.xml.in.in} | 5 +-
meson.build | 61 ++++++++---
meson_options.txt | 9 ++
src/config.vapi | 6 +-
src/daemon/BreakManager.vala | 2 +-
src/daemon/microbreak/MicroBreakType.vala | 2 +-
src/daemon/restbreak/RestBreakType.vala | 2 +-
src/daemon/timerbreak/TimerBreakType.vala | 2 +-
src/meson.build | 2 +-
src/settings/Application.vala | 4 +
src/settings/BreakManager.vala | 4 +-
src/settings/BreakSettingsDialog.vala | 2 +-
src/settings/microbreak/MicroBreakType.vala | 2 +-
src/settings/restbreak/RestBreakType.vala | 2 +-
src/settings/timerbreak/TimerBreakType.vala | 2 +-
30 files changed, 253 insertions(+), 63 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a93d926..27947c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,8 +8,8 @@ flatpak:
extends: ['.flatpak']
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.38
variables:
- APP_ID: "org.gnome.BreakTimer"
- MANIFEST_PATH: "build-aux/flatpak/org.gnome.BreakTimer.json"
+ APP_ID: "org.gnome.BreakTimer.Devel"
+ MANIFEST_PATH: "build-aux/flatpak/org.gnome.BreakTimer.Devel.json"
RUNTIME_REPO: "https://sdk.gnome.org/gnome.flatpakrepo"
FLATPAK_MODULE: "gnome-break-timer"
MESON_ARGS: "-Dtests=all"
diff --git a/build-aux/flatpak/org.gnome.BreakTimer.json b/build-aux/flatpak/org.gnome.BreakTimer.Devel.json
similarity index 92%
rename from build-aux/flatpak/org.gnome.BreakTimer.json
rename to build-aux/flatpak/org.gnome.BreakTimer.Devel.json
index 74d6334..f0c5b6a 100644
--- a/build-aux/flatpak/org.gnome.BreakTimer.json
+++ b/build-aux/flatpak/org.gnome.BreakTimer.Devel.json
@@ -1,9 +1,11 @@
{
- "id" : "org.gnome.BreakTimer",
+ "id" : "org.gnome.BreakTimer.Devel",
"runtime" : "org.gnome.Platform",
- "runtime-version" : "3.38",
+ "runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"command" : "gnome-break-timer-settings",
+ "tags": ["devel", "development", "nightly"],
+ "desktop-file-name-suffix": " ☢️",
"finish-args" : [
"--share=ipc",
"--socket=x11",
@@ -88,6 +90,9 @@
"buildsystem" : "meson",
"builddir" : true,
"run-tests" : true,
+ "config-opts" : [
+ "-Dprofile=development"
+ ],
"sources" : [
{
"type" : "git",
diff --git a/data/applications/meson.build b/data/applications/meson.build
index a4cc24a..30a5552 100644
--- a/data/applications/meson.build
+++ b/data/applications/meson.build
@@ -3,8 +3,12 @@ applications_dir = join_paths(datadir, 'applications')
desktop_file_validate = find_program('desktop-file-validate', required: false)
settings_desktop_file = i18n.merge_file(
- input: 'org.gnome.BreakTimer.Settings.desktop.in',
- output: 'org.gnome.BreakTimer.Settings.desktop',
+ input: configure_file(
+ input: 'org.gnome.BreakTimer.Settings.desktop.in.in',
+ output: 'org.gnome.BreakTimer.Settings.desktop.in',
+ configuration: build_conf,
+ ),
+ output: settings_application_id + '.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
@@ -20,8 +24,12 @@ if desktop_file_validate.found()
endif
daemon_desktop_file = i18n.merge_file(
- input: 'org.gnome.BreakTimer.desktop.in',
- output: 'org.gnome.BreakTimer.desktop',
+ input: configure_file(
+ input: 'org.gnome.BreakTimer.desktop.in.in',
+ output: 'org.gnome.BreakTimer.desktop.in',
+ configuration: build_conf,
+ ),
+ output: daemon_application_id + '.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
diff --git a/data/applications/org.gnome.BreakTimer.Settings.desktop.in
b/data/applications/org.gnome.BreakTimer.Settings.desktop.in.in
similarity index 90%
rename from data/applications/org.gnome.BreakTimer.Settings.desktop.in
rename to data/applications/org.gnome.BreakTimer.Settings.desktop.in.in
index d704e50..0cb46ae 100644
--- a/data/applications/org.gnome.BreakTimer.Settings.desktop.in
+++ b/data/applications/org.gnome.BreakTimer.Settings.desktop.in.in
@@ -4,7 +4,7 @@ Name=Break Timer
Comment=Computer break reminders for GNOME
Keywords=break;micro;rest;timer;
Categories=GNOME;GTK;Utility;Settings;
-Icon=org.gnome.BreakTimer
+Icon=@APPLICATION_ID@
Exec=gnome-break-timer-settings
StartupNotify=true
DBusActivatable=true
diff --git a/data/applications/org.gnome.BreakTimer.desktop.in
b/data/applications/org.gnome.BreakTimer.desktop.in.in
similarity index 87%
rename from data/applications/org.gnome.BreakTimer.desktop.in
rename to data/applications/org.gnome.BreakTimer.desktop.in.in
index 0819c46..bf7b3a0 100644
--- a/data/applications/org.gnome.BreakTimer.desktop.in
+++ b/data/applications/org.gnome.BreakTimer.desktop.in.in
@@ -2,7 +2,7 @@
Type=Application
Name=Break Timer
Comment=Computer break reminders for GNOME
-Icon=org.gnome.BreakTimer
+Icon=@APPLICATION_ID@
NoDisplay=true
Exec=gnome-break-timer-daemon
DBusActivatable=true
diff --git a/data/autostart/meson.build b/data/autostart/meson.build
index 443e848..aed627b 100644
--- a/data/autostart/meson.build
+++ b/data/autostart/meson.build
@@ -3,8 +3,12 @@ autostart_dir = join_paths(sysconf_dir, 'xdg', 'autostart')
desktop_file_validate = find_program('desktop-file-validate', required: false)
daemon_autostart_desktop_file = i18n.merge_file(
- input: 'org.gnome.BreakTimer.desktop.in',
- output: 'org.gnome.BreakTimer.desktop',
+ input: configure_file(
+ input: 'org.gnome.BreakTimer.desktop.in.in',
+ output: 'org.gnome.BreakTimer.desktop.in',
+ configuration: build_conf,
+ ),
+ output: daemon_application_id + '.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
@@ -13,7 +17,7 @@ daemon_autostart_desktop_file = i18n.merge_file(
if desktop_file_validate.found()
test(
- 'Validate desktop file',
+ 'Validate org.gnome.BreakTimer.desktop (autostart)',
desktop_file_validate,
args: [daemon_autostart_desktop_file]
)
diff --git a/data/autostart/org.gnome.BreakTimer.desktop.in
b/data/autostart/org.gnome.BreakTimer.desktop.in.in
similarity index 91%
rename from data/autostart/org.gnome.BreakTimer.desktop.in
rename to data/autostart/org.gnome.BreakTimer.desktop.in.in
index 7628b1a..c07d8c9 100644
--- a/data/autostart/org.gnome.BreakTimer.desktop.in
+++ b/data/autostart/org.gnome.BreakTimer.desktop.in.in
@@ -2,7 +2,7 @@
Type=Application
Name=Break Timer
Comment=Computer break reminders for GNOME
-Icon=org.gnome.BreakTimer
+Icon=@APPLICATION_ID@
NoDisplay=true
Exec=gnome-break-timer-daemon
AutostartCondition=GSettings org.gnome.BreakTimer enabled
diff --git a/data/dbus/meson.build b/data/dbus/meson.build
index c703630..14b1b69 100644
--- a/data/dbus/meson.build
+++ b/data/dbus/meson.build
@@ -2,14 +2,14 @@ dbus_session_bus_services_dir = join_paths(datadir, 'dbus-1', 'services')
configure_file(
input: 'org.gnome.BreakTimer.Settings.service.in',
- output: 'org.gnome.BreakTimer.Settings.service',
+ output: settings_application_id + '.service',
configuration: build_conf,
install_dir: dbus_session_bus_services_dir
)
configure_file(
input: 'org.gnome.BreakTimer.service.in',
- output: 'org.gnome.BreakTimer.service',
+ output: daemon_application_id + '.service',
configuration: build_conf,
install_dir: dbus_session_bus_services_dir
)
diff --git a/data/dbus/org.gnome.BreakTimer.Settings.service.in
b/data/dbus/org.gnome.BreakTimer.Settings.service.in
index 1392eba..317eb2b 100644
--- a/data/dbus/org.gnome.BreakTimer.Settings.service.in
+++ b/data/dbus/org.gnome.BreakTimer.Settings.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.gnome.BreakTimer.Settings
+Name=@SETTINGS_APPLICATION_ID@
Exec=gnome-break-timer-settings
diff --git a/data/dbus/org.gnome.BreakTimer.service.in b/data/dbus/org.gnome.BreakTimer.service.in
index c120283..7996987 100644
--- a/data/dbus/org.gnome.BreakTimer.service.in
+++ b/data/dbus/org.gnome.BreakTimer.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.gnome.BreakTimer
+Name=@DAEMON_APPLICATION_ID@
Exec=gnome-break-timer-daemon
diff --git a/data/gschema/meson.build b/data/gschema/meson.build
index 7c5e73e..4daa4a1 100644
--- a/data/gschema/meson.build
+++ b/data/gschema/meson.build
@@ -1,9 +1,23 @@
-i18n.merge_file(
- input: 'org.gnome.BreakTimer.gschema.xml.in',
- output: 'org.gnome.BreakTimer.gschema.xml',
+glib_compile_schemas = find_program('glib-compile-schemas', required: false)
+
+gschema_file = i18n.merge_file(
+ input: configure_file(
+ input: 'org.gnome.BreakTimer.gschema.xml.in.in',
+ output: 'org.gnome.BreakTimer.gschema.xml.in',
+ configuration: build_conf,
+ ),
+ output: daemon_application_id + '.gschema.xml',
po_dir: po_dir,
install: true,
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
)
gnome.compile_schemas()
+
+if glib_compile_schemas.found()
+ test(
+ 'Validate org.gnome.BreakTimer.gschema.xml',
+ glib_compile_schemas,
+ args: ['--dry-run', join_paths(datadir, 'glib-2.0', 'schemas')]
+ )
+endif
diff --git a/data/gschema/org.gnome.BreakTimer.gschema.xml.in
b/data/gschema/org.gnome.BreakTimer.gschema.xml.in.in
similarity index 81%
rename from data/gschema/org.gnome.BreakTimer.gschema.xml.in
rename to data/gschema/org.gnome.BreakTimer.gschema.xml.in.in
index 3da50e4..1c674b4 100644
--- a/data/gschema/org.gnome.BreakTimer.gschema.xml.in
+++ b/data/gschema/org.gnome.BreakTimer.gschema.xml.in.in
@@ -1,5 +1,5 @@
<schemalist>
- <schema id="org.gnome.BreakTimer" path="/org/gnome/BreakTimer/">
+ <schema id="@APPLICATION_ID@" path="/org/gnome/BreakTimer/">
<key name="enabled" type="b">
<summary>True to enable GNOME Break Timer</summary>
<default>false</default>
@@ -22,11 +22,11 @@
<default>0</default>
</key>
- <child schema="org.gnome.BreakTimer.restbreak" name="restbreak"/>
- <child schema="org.gnome.BreakTimer.microbreak" name="microbreak"/>
+ <child schema="@APPLICATION_ID@.restbreak" name="restbreak"/>
+ <child schema="@APPLICATION_ID@.microbreak" name="microbreak"/>
</schema>
- <schema id="org.gnome.BreakTimer.restbreak" path="/org/gnome/BreakTimer/restbreak/">
+ <schema id="@APPLICATION_ID@.restbreak" path="/org/gnome/BreakTimer/restbreak/">
<key name="interval-seconds" type="i">
<summary>Time between breaks</summary>
<description>The time between rest breaks, in seconds.</description>
@@ -40,7 +40,7 @@
</key>
</schema>
- <schema id="org.gnome.BreakTimer.microbreak" path="/org/gnome/BreakTimer/microbreak/">
+ <schema id="@APPLICATION_ID@.microbreak" path="/org/gnome/BreakTimer/microbreak/">
<key name="interval-seconds" type="i">
<summary>Time between breaks</summary>
<description>The preferred time between micro breaks, in seconds.</description>
diff --git a/data/icons/hicolor/scalable/apps/org.gnome.BreakTimer.Devel.svg
b/data/icons/hicolor/scalable/apps/org.gnome.BreakTimer.Devel.svg
new file mode 100644
index 0000000..8eda3d6
--- /dev/null
+++ b/data/icons/hicolor/scalable/apps/org.gnome.BreakTimer.Devel.svg
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <filter id="a" height="100%" width="100%" x="0%" y="0%">
+ <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1
0"/>
+ </filter>
+ <mask id="b">
+ <g filter="url(#a)">
+ <rect fill-opacity="0.1" height="128" width="128"/>
+ </g>
+ </mask>
+ <mask id="c">
+ <g filter="url(#a)">
+ <rect fill-opacity="0.3" height="128" width="128"/>
+ </g>
+ </mask>
+ <linearGradient id="d" gradientTransform="matrix(0.38975 0.449607 -0.449607 0.38975 82.540353
-68.229486)" gradientUnits="userSpaceOnUse" x1="143.607788" x2="141.011398" y1="139.418365" y2="95.803307">
+ <stop offset="0" stop-color="#b3b3b3"/>
+ <stop offset="1" stop-color="#e6e6e6"/>
+ </linearGradient>
+ <linearGradient id="e" gradientTransform="matrix(0.38975 0.449607 -0.449607 0.38975 82.540353
-68.229486)" gradientUnits="userSpaceOnUse" x1="102.540459" x2="144.827225" y1="86.852005" y2="185.409195">
+ <stop offset="0" stop-color="#ffffff" stop-opacity="0.7251"/>
+ <stop offset="1" stop-color="#ffffff" stop-opacity="0"/>
+ </linearGradient>
+ <mask id="f">
+ <g filter="url(#a)">
+ <rect fill-opacity="0.1" height="128" width="128"/>
+ </g>
+ </mask>
+ <clipPath id="g">
+ <rect height="39" width="41"/>
+ </clipPath>
+ <g id="h" clip-path="url(#g)">
+ <path d="m 8.40625 -21.710938 c -28.535156 0 -51.667969 23.132813 -51.667969 51.667969 c
0.007813 0.375 0.023438 0.75 0.039063 1.121094 c 0.433594 -28.210937 23.417968 -50.855469 51.628906 -50.875 c
28.089844 0.015625 51.019531 22.464844 51.628906 50.546875 c 0.015625 -0.261719 0.03125 -0.527344 0.039063
-0.792969 c 0 -28.535156 -23.132813 -51.667969 -51.667969 -51.667969 z m 0 0"/>
+ </g>
+ <mask id="i">
+ <g filter="url(#a)">
+ <rect fill-opacity="0.3" height="128" width="128"/>
+ </g>
+ </mask>
+ <clipPath id="j">
+ <rect height="39" width="41"/>
+ </clipPath>
+ <g id="k" clip-path="url(#j)">
+ <path d="m 38.878906 2.082031 c 0.796875 0.808594 1.058594 1.960938 0.074219 2.953125 l
-33.195313 33.480469 c -0.984374 0.992187 -2.589843 0.964844 -3.570312 -0.03125 s -0.972656 -2.589844
0.027344 -3.570313 l 33.710937 -32.957031 c 1 -0.976562 2.191407 -0.652343 2.953125 0.125 z m 0 0"/>
+ </g>
+ <clipPath id="l">
+ <rect height="128" width="128"/>
+ </clipPath>
+ <clipPath id="m">
+ <rect height="128" width="128"/>
+ </clipPath>
+ <mask id="n">
+ <g clip-path="url(#m)" filter="url(#a)">
+ <g clip-path="url(#l)">
+ <path d="m 41.402344 114.628906 h 45.308594 c 0.84375 0 1.523437 0.90625 1.523437
2.035156 v 6.476563 c 0 1.125 -0.679687 2.054687 -1.523437 2.03125 l -23.046876 -0.574219 l -22.261718
0.574219 c -0.84375 0.023437 -1.523438 -0.90625 -1.523438 -2.03125 v -6.476563 c 0 -1.128906 0.679688
-2.035156 1.523438 -2.035156 z m 0 0"/>
+ <path d="m 41.453125 115 h 45.207031 c 0.84375 0 1.519532 0.808594 1.519532 1.816406 v
5.792969 c 0 1.007813 -0.675782 1.835937 -1.519532 1.816406 l -22.996094 -0.511719 l -22.210937 0.511719 c
-0.839844 0.019531 -1.519531 -0.808593 -1.519531 -1.816406 v -5.792969 c 0 -1.007812 0.679687 -1.816406
1.519531 -1.816406 z m 0 0" fill="#3d3846"/>
+ <path d="m 121.746094 64.121094 c 0 31.707031 -25.703125 57.410156 -57.410156 57.410156
c -31.707032 0 -57.410157 -25.703125 -57.410157 -57.410156 c 0 -31.707032 25.703125 -57.410156 57.410157
-57.410156 c 31.707031 0 57.410156 25.703124 57.410156 57.410156 z m 0 0" fill="#d5d3cf"/>
+ <path d="m 64.335938 8.625 c 29.59375 0 53.582031 23.992188 53.582031 53.582031 v
1.914063 c 0 29.59375 -23.988281 53.582031 -53.582031 53.582031 s -53.582032 -23.988281 -53.582032 -53.582031
v -1.914063 c 0 -29.589843 23.988282 -53.582031 53.582032 -53.582031 z m 0 0" fill="#d5d3cf"/>
+ <path d="m 121.746094 62.207031 c 0 31.707031 -25.703125 57.410157 -57.410156 57.410157
c -31.707032 0 -57.410157 -25.703126 -57.410157 -57.410157 s 25.703125 -57.410156 57.410157 -57.410156 c
31.707031 0 57.410156 25.703125 57.410156 57.410156 z m 0 0" fill="#f6f5f4"/>
+ <path d="m 116.003906 62.207031 c 0 28.539063 -23.132812 51.671875 -51.667968 51.671875
c -28.535157 0 -51.667969 -23.132812 -51.667969 -51.671875 c 0 -28.535156 23.132812 -51.667969 51.667969
-51.667969 c 28.535156 0 51.667968 23.132813 51.667968 51.667969 z m 0 0" fill="#342f3d"/>
+ <path d="m 100.21875 62.207031 c 0 19.820313 -16.0625 35.886719 -35.882812 35.886719 c
-19.816407 0 -35.882813 -16.066406 -35.882813 -35.886719 c 0 -19.816406 16.066406 -35.882812 35.882813
-35.882812 c 19.820312 0 35.882812 16.066406 35.882812 35.882812 z m 0 0" fill="#312b3b"/>
+ <path d="m 99.347656 62.207031 c 0 19.335938 -15.675781 35.011719 -35.011718 35.011719 c
-19.335938 0 -35.007813 -15.675781 -35.007813 -35.011719 c 0 -19.332031 15.671875 -35.007812 35.007813
-35.007812 c 19.335937 0 35.011718 15.675781 35.011718 35.007812 z m 0 0" fill="#241f31"/>
+ <use mask="url(#f)" transform="matrix(1 0 0 1 55.929688 32.25)" xlink:href="#h"/>
+ <path d="m 112.15625 61.996094 v 0.214844 c 0 0.574218 -0.464844 1.042968 -1.042969
1.042968 h -6.589843 c -0.578126 0 -1.042969 -0.46875 -1.042969 -1.042968 v -0.214844 c 0 -0.574219 0.464843
-1.042969 1.042969 -1.042969 h 6.589843 c 0.578125 0 1.042969 0.46875 1.042969 1.042969 z m 0 0"
fill="#e1e0de"/>
+ <path d="m 25.328125 61.996094 v 0.214844 c 0 0.574218 -0.46875 1.042968 -1.042969
1.042968 h -6.589844 c -0.578124 0 -1.046874 -0.46875 -1.046874 -1.042968 v -0.214844 c 0 -0.574219 0.46875
-1.042969 1.046874 -1.042969 h 6.589844 c 0.574219 0 1.042969 0.46875 1.042969 1.042969 z m 0 0"
fill="#e1e0de"/>
+ <path d="m 64.742188 24.425781 h -0.601563 c -0.746094 0 -1.355469 -0.609375 -1.355469
-1.355469 v -8.570312 c 0 -0.75 0.609375 -1.355469 1.355469 -1.355469 h 0.601563 c 0.75 0 1.355468 0.605469
1.355468 1.355469 v 8.570312 c 0 0.746094 -0.605468 1.355469 -1.355468 1.355469 z m 0 0" fill="#f66151"/>
+ <path d="m 64.546875 109.875 h -0.210937 c -0.578126 0 -1.042969 -0.46875 -1.042969
-1.042969 v -6.59375 c 0 -0.574219 0.464843 -1.042969 1.042969 -1.042969 h 0.210937 c 0.578125 0 1.046875
0.46875 1.046875 1.042969 v 6.59375 c 0 0.574219 -0.46875 1.042969 -1.046875 1.042969 z m 0 0"
fill="#e1e0de"/>
+ <use mask="url(#i)" transform="matrix(1 0 0 1 55.929688 32.25)" xlink:href="#k"/>
+ <path d="m 95.0625 31.984375 c 0.796875 0.808594 1.0625 1.964844 0.074219 2.953125 l
-34.804688 34.75 c -0.988281 0.988281 -2.589843 0.96875 -3.570312 -0.027344 s -0.972657 -2.597656 0.03125
-3.570312 l 35.316406 -34.226563 c 1.003906 -0.976562 2.1875 -0.65625 2.953125 0.121094 z m 0 0"
fill="url(#d)"/>
+ <path d="m 95.0625 31.984375 l -38.300781 37.675781 c -0.980469 -0.996094 -0.972657
-2.597656 0.03125 -3.570312 l 35.316406 -34.226563 c 1.003906 -0.976562 2.1875 -0.65625 2.953125 0.121094 z m
0 0" fill="url(#e)"/>
+ </g>
+ </g>
+ </mask>
+ <mask id="o">
+ <g filter="url(#a)">
+ <rect fill-opacity="0.8" height="128" width="128"/>
+ </g>
+ </mask>
+ <linearGradient id="p" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)"
gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
+ <stop offset="0" stop-color="#f9f06b"/>
+ <stop offset="1" stop-color="#f5c211"/>
+ </linearGradient>
+ <clipPath id="q">
+ <rect height="128" width="128"/>
+ </clipPath>
+ <clipPath id="r">
+ <rect height="128" width="128"/>
+ </clipPath>
+ </defs>
+ <path d="m 41.402344 114.628906 h 45.308594 c 0.84375 0 1.523437 0.90625 1.523437 2.035156 v 6.476563 c
0 1.125 -0.679687 2.054687 -1.523437 2.03125 l -23.046876 -0.574219 l -22.261718 0.574219 c -0.84375 0.023437
-1.523438 -0.90625 -1.523438 -2.03125 v -6.476563 c 0 -1.128906 0.679688 -2.035156 1.523438 -2.035156 z m 0
0"/>
+ <path d="m 41.453125 115 h 45.207031 c 0.84375 0 1.519532 0.808594 1.519532 1.816406 v 5.792969 c 0
1.007813 -0.675782 1.835937 -1.519532 1.816406 l -22.996094 -0.511719 l -22.210937 0.511719 c -0.839844
0.019531 -1.519531 -0.808593 -1.519531 -1.816406 v -5.792969 c 0 -1.007812 0.679687 -1.816406 1.519531
-1.816406 z m 0 0" fill="#3d3846"/>
+ <path d="m 121.746094 64.121094 c 0 31.707031 -25.703125 57.410156 -57.410156 57.410156 c -31.707032 0
-57.410157 -25.703125 -57.410157 -57.410156 c 0 -31.707032 25.703125 -57.410156 57.410157 -57.410156 c
31.707031 0 57.410156 25.703124 57.410156 57.410156 z m 0 0" fill="#d5d3cf"/>
+ <path d="m 64.335938 8.625 c 29.59375 0 53.582031 23.992188 53.582031 53.582031 v 1.914063 c 0 29.59375
-23.988281 53.582031 -53.582031 53.582031 s -53.582032 -23.988281 -53.582032 -53.582031 v -1.914063 c 0
-29.589843 23.988282 -53.582031 53.582032 -53.582031 z m 0 0" fill="#d5d3cf"/>
+ <path d="m 121.746094 62.207031 c 0 31.707031 -25.703125 57.410157 -57.410156 57.410157 c -31.707032 0
-57.410157 -25.703126 -57.410157 -57.410157 s 25.703125 -57.410156 57.410157 -57.410156 c 31.707031 0
57.410156 25.703125 57.410156 57.410156 z m 0 0" fill="#f6f5f4"/>
+ <path d="m 116.003906 62.207031 c 0 28.539063 -23.132812 51.671875 -51.667968 51.671875 c -28.535157 0
-51.667969 -23.132812 -51.667969 -51.671875 c 0 -28.535156 23.132812 -51.667969 51.667969 -51.667969 c
28.535156 0 51.667968 23.132813 51.667968 51.667969 z m 0 0" fill="#342f3d"/>
+ <path d="m 100.21875 62.207031 c 0 19.820313 -16.0625 35.886719 -35.882812 35.886719 c -19.816407 0
-35.882813 -16.066406 -35.882813 -35.886719 c 0 -19.816406 16.066406 -35.882812 35.882813 -35.882812 c
19.820312 0 35.882812 16.066406 35.882812 35.882812 z m 0 0" fill="#312b3b"/>
+ <path d="m 99.347656 62.207031 c 0 19.335938 -15.675781 35.011719 -35.011718 35.011719 c -19.335938 0
-35.007813 -15.675781 -35.007813 -35.011719 c 0 -19.332031 15.671875 -35.007812 35.007813 -35.007812 c
19.335937 0 35.011718 15.675781 35.011718 35.007812 z m 0 0" fill="#241f31"/>
+ <use mask="url(#b)" transform="matrix(1 0 0 1 55.929688 32.25)" xlink:href="#h"/>
+ <path d="m 112.15625 61.996094 v 0.214844 c 0 0.574218 -0.464844 1.042968 -1.042969 1.042968 h -6.589843
c -0.578126 0 -1.042969 -0.46875 -1.042969 -1.042968 v -0.214844 c 0 -0.574219 0.464843 -1.042969 1.042969
-1.042969 h 6.589843 c 0.578125 0 1.042969 0.46875 1.042969 1.042969 z m 0 0" fill="#e1e0de"/>
+ <path d="m 25.328125 61.996094 v 0.214844 c 0 0.574218 -0.46875 1.042968 -1.042969 1.042968 h -6.589844
c -0.578124 0 -1.046874 -0.46875 -1.046874 -1.042968 v -0.214844 c 0 -0.574219 0.46875 -1.042969 1.046874
-1.042969 h 6.589844 c 0.574219 0 1.042969 0.46875 1.042969 1.042969 z m 0 0" fill="#e1e0de"/>
+ <path d="m 64.742188 24.425781 h -0.601563 c -0.746094 0 -1.355469 -0.609375 -1.355469 -1.355469 v
-8.570312 c 0 -0.75 0.609375 -1.355469 1.355469 -1.355469 h 0.601563 c 0.75 0 1.355468 0.605469 1.355468
1.355469 v 8.570312 c 0 0.746094 -0.605468 1.355469 -1.355468 1.355469 z m 0 0" fill="#f66151"/>
+ <path d="m 64.546875 109.875 h -0.210937 c -0.578126 0 -1.042969 -0.46875 -1.042969 -1.042969 v -6.59375
c 0 -0.574219 0.464843 -1.042969 1.042969 -1.042969 h 0.210937 c 0.578125 0 1.046875 0.46875 1.046875
1.042969 v 6.59375 c 0 0.574219 -0.46875 1.042969 -1.046875 1.042969 z m 0 0" fill="#e1e0de"/>
+ <use mask="url(#c)" transform="matrix(1 0 0 1 55.929688 32.25)" xlink:href="#k"/>
+ <path d="m 95.0625 31.984375 c 0.796875 0.808594 1.0625 1.964844 0.074219 2.953125 l -34.804688 34.75 c
-0.988281 0.988281 -2.589843 0.96875 -3.570312 -0.027344 s -0.972657 -2.597656 0.03125 -3.570312 l 35.316406
-34.226563 c 1.003906 -0.976562 2.1875 -0.65625 2.953125 0.121094 z m 0 0" fill="url(#d)"/>
+ <path d="m 95.0625 31.984375 l -38.300781 37.675781 c -0.980469 -0.996094 -0.972657 -2.597656 0.03125
-3.570312 l 35.316406 -34.226563 c 1.003906 -0.976562 2.1875 -0.65625 2.953125 0.121094 z m 0 0"
fill="url(#e)"/>
+ <g clip-path="url(#r)" mask="url(#n)">
+ <g clip-path="url(#q)" mask="url(#o)">
+ <path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#p)"/>
+ <path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m
42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v
-21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0
0"/>
+ </g>
+ </g>
+</svg>
diff --git a/data/meson.build b/data/meson.build
index 71401ae..7d36494 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,4 +1,5 @@
subdir('applications')
+subdir('autostart')
subdir('dbus')
subdir('gresource')
subdir('gschema')
diff --git a/data/metainfo/meson.build b/data/metainfo/meson.build
index 87479da..ba26719 100644
--- a/data/metainfo/meson.build
+++ b/data/metainfo/meson.build
@@ -1,16 +1,20 @@
metainfo_dir = join_paths(datadir, 'metainfo')
+appstream_util = find_program('appstream-util', required: false)
+
metainfo_file = i18n.merge_file(
- input: 'org.gnome.BreakTimer.metainfo.xml.in',
- output: 'org.gnome.BreakTimer.metainfo.xml',
+ input: configure_file(
+ input: 'org.gnome.BreakTimer.metainfo.xml.in.in',
+ output: 'org.gnome.BreakTimer.metainfo.xml.in',
+ configuration: build_conf,
+ ),
+ output: application_id + '.metainfo.xml',
type: 'xml',
po_dir: po_dir,
install: true,
install_dir: metainfo_dir
)
-appstream_util = find_program('appstream-util', required: false)
-
if appstream_util.found()
test(
'Validate org.gnome.BreakTimer.metainfo.xml',
diff --git a/data/metainfo/org.gnome.BreakTimer.metainfo.xml.in
b/data/metainfo/org.gnome.BreakTimer.metainfo.xml.in.in
similarity index 91%
rename from data/metainfo/org.gnome.BreakTimer.metainfo.xml.in
rename to data/metainfo/org.gnome.BreakTimer.metainfo.xml.in.in
index 8521f2d..7f4fb39 100644
--- a/data/metainfo/org.gnome.BreakTimer.metainfo.xml.in
+++ b/data/metainfo/org.gnome.BreakTimer.metainfo.xml.in.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
- <id>org.gnome.BreakTimer</id>
+ <id>@APPLICATION_ID@</id>
<name>Break Timer</name>
<summary>Computer break reminders for GNOME</summary>
@@ -31,11 +31,12 @@
</screenshot>
</screenshots>
- <launchable type="desktop-id">org.gnome.BreakTimer.Settings.desktop</launchable>
+ <launchable type="desktop-id">@SETTINGS_APPLICATION_ID@.desktop</launchable>
<content_rating type="oars-1.1" />
<releases>
+ <release version="2.0" date="2020-11-18" />
<release version="1.2" date="2014-03-28" />
<release version="1.1" date="2013-09-22" />
<release version="1.0" date="2013-09-22" />
diff --git a/meson.build b/meson.build
index d7209f0..935c94a 100644
--- a/meson.build
+++ b/meson.build
@@ -36,26 +36,55 @@ libexecdir = join_paths(prefix, get_option('libexecdir'))
locale_dir = join_paths(prefix, get_option('localedir'))
sysconf_dir = get_option('sysconfdir')
-application_icon = 'org.gnome.BreakTimer'
+build_profile = get_option('profile')
+
+if build_profile == 'default'
+ application_id = 'org.gnome.BreakTimer'
+ version_suffix = ''
+elif build_profile == 'development'
+ application_id = 'org.gnome.BreakTimer.Devel'
+ git = find_program('git', required : false)
+ if git.found()
+ git_commit = run_command('git', 'describe', '--match=""', '--always', '--dirty').stdout().strip()
+ version_suffix = '-@0@'.format(git_commit)
+ else
+ version_suffix = '-devel'
+ endif
+endif
+
+daemon_application_id = application_id
+settings_application_id = application_id + '.Settings'
+
application_url = 'https://wiki.gnome.org/Apps/BreakTimer'
-settings_application_id = 'org.gnome.BreakTimer.Settings'
-daemon_application_id = 'org.gnome.BreakTimer'
daemon_object_path = '/org/gnome/BreakTimer'
-daemon_break_object_base_path = '/org/gnome/BreakTimer/'
+
+# We need a quoted version of build_conf to generate config.h in `src`, and an
+# unquoted version to use configure_file with arbitrary files in `data`.
build_conf = configuration_data()
-build_conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
-build_conf.set_quoted('LOCALE_DIR', locale_dir)
-build_conf.set_quoted('PROJECT_NAME', meson.project_name())
-build_conf.set_quoted('PROJECT_VERSION', meson.project_version())
-build_conf.set_quoted('APPLICATION_ICON', application_icon)
-build_conf.set_quoted('APPLICATION_URL', application_url)
-build_conf.set_quoted('SETTINGS_APPLICATION_ID', settings_application_id)
-build_conf.set_quoted('SETTINGS_DESKTOP_FILE_ID', settings_application_id + '.desktop')
-build_conf.set_quoted('DAEMON_APPLICATION_ID', daemon_application_id)
-build_conf.set_quoted('DAEMON_DESKTOP_FILE_ID', daemon_application_id + '.desktop')
-build_conf.set_quoted('DAEMON_OBJECT_PATH', daemon_object_path)
-build_conf.set_quoted('DAEMON_BREAK_OBJECT_BASE_PATH', daemon_break_object_base_path)
+
+build_conf.set('GETTEXT_PACKAGE', gettext_package)
+build_conf.set('LOCALE_DIR', locale_dir)
+build_conf.set('BUILD_PROFILE', build_profile)
+build_conf.set('PROJECT_NAME', meson.project_name())
+build_conf.set('PROJECT_VERSION', meson.project_version() + version_suffix)
+build_conf.set('APPLICATION_ID', application_id)
+build_conf.set('APPLICATION_URL', application_url)
+build_conf.set('SETTINGS_APPLICATION_ID', settings_application_id)
+build_conf.set('DAEMON_APPLICATION_ID', daemon_application_id)
+build_conf.set('DAEMON_OBJECT_PATH', daemon_object_path)
+
+build_conf_quoted = configuration_data()
+build_conf_quoted.set_quoted('GETTEXT_PACKAGE', gettext_package)
+build_conf_quoted.set_quoted('LOCALE_DIR', locale_dir)
+build_conf_quoted.set_quoted('BUILD_PROFILE', build_profile)
+build_conf_quoted.set_quoted('PROJECT_NAME', meson.project_name())
+build_conf_quoted.set_quoted('PROJECT_VERSION', meson.project_version() + version_suffix)
+build_conf_quoted.set_quoted('APPLICATION_ID', application_id)
+build_conf_quoted.set_quoted('APPLICATION_URL', application_url)
+build_conf_quoted.set_quoted('SETTINGS_APPLICATION_ID', settings_application_id)
+build_conf_quoted.set_quoted('DAEMON_APPLICATION_ID', daemon_application_id)
+build_conf_quoted.set_quoted('DAEMON_OBJECT_PATH', daemon_object_path)
add_project_arguments(['-DGETTEXT_PACKAGE="' + gettext_package + '"'], language: 'c')
add_project_arguments(['-DGNOME_DESKTOP_USE_UNSTABLE_API=1'], language: 'c')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..a9e396d
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,9 @@
+option(
+ 'profile',
+ type: 'combo',
+ choices: [
+ 'default',
+ 'development'
+ ],
+ value: 'default'
+)
diff --git a/src/config.vapi b/src/config.vapi
index 465f3b2..ac98d12 100644
--- a/src/config.vapi
+++ b/src/config.vapi
@@ -1,16 +1,14 @@
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace BreakTimer.Config {
- public const string APPLICATION_ICON;
+ public const string APPLICATION_ID;
public const string APPLICATION_URL;
+ public const string BUILD_PROFILE;
public const string DAEMON_APPLICATION_ID;
- public const string DAEMON_BREAK_OBJECT_BASE_PATH;
- public const string DAEMON_DESKTOP_FILE_ID;
public const string DAEMON_OBJECT_PATH;
public const string GETTEXT_PACKAGE;
public const string LOCALE_DIR;
public const string PROJECT_NAME;
public const string PROJECT_VERSION;
public const string SETTINGS_APPLICATION_ID;
- public const string SETTINGS_DESKTOP_FILE_ID;
}
diff --git a/src/daemon/BreakManager.vala b/src/daemon/BreakManager.vala
index ce64644..abf6107 100644
--- a/src/daemon/BreakManager.vala
+++ b/src/daemon/BreakManager.vala
@@ -34,7 +34,7 @@ public class BreakManager : GLib.Object, GLib.Initable {
private GLib.HashTable<string, BreakType> breaks;
public BreakManager (UIManager ui_manager, ActivityMonitor activity_monitor) {
- this.settings = new GLib.Settings ("org.gnome.BreakTimer");
+ this.settings = new GLib.Settings (Config.APPLICATION_ID);
this.breaks = new GLib.HashTable<string, BreakType> (str_hash, str_equal);
this.breaks.set ("microbreak", new MicroBreakType (activity_monitor, ui_manager));
diff --git a/src/daemon/microbreak/MicroBreakType.vala b/src/daemon/microbreak/MicroBreakType.vala
index 00aa735..9d11024 100644
--- a/src/daemon/microbreak/MicroBreakType.vala
+++ b/src/daemon/microbreak/MicroBreakType.vala
@@ -29,7 +29,7 @@ public class MicroBreakType : TimerBreakType {
var break_controller = new MicroBreakController (activity_monitor);
var break_view = new MicroBreakView (break_controller, ui_manager);
- var settings = new GLib.Settings ("org.gnome.BreakTimer.microbreak");
+ var settings = new GLib.Settings (Config.APPLICATION_ID + ".microbreak");
settings.bind ("interval-seconds", break_controller, "interval", GLib.SettingsBindFlags.GET);
settings.bind ("duration-seconds", break_controller, "duration", GLib.SettingsBindFlags.GET);
diff --git a/src/daemon/restbreak/RestBreakType.vala b/src/daemon/restbreak/RestBreakType.vala
index e3e8e6b..eb003c9 100644
--- a/src/daemon/restbreak/RestBreakType.vala
+++ b/src/daemon/restbreak/RestBreakType.vala
@@ -29,7 +29,7 @@ public class RestBreakType : TimerBreakType {
var break_controller = new RestBreakController (activity_monitor);
var break_view = new RestBreakView (break_controller, ui_manager);
- var settings = new GLib.Settings ("org.gnome.BreakTimer.restbreak");
+ var settings = new GLib.Settings (Config.APPLICATION_ID + ".restbreak");
settings.bind ("interval-seconds", break_controller, "interval", GLib.SettingsBindFlags.GET);
settings.bind ("duration-seconds", break_controller, "duration", GLib.SettingsBindFlags.GET);
diff --git a/src/daemon/timerbreak/TimerBreakType.vala b/src/daemon/timerbreak/TimerBreakType.vala
index cc92474..46a31c1 100644
--- a/src/daemon/timerbreak/TimerBreakType.vala
+++ b/src/daemon/timerbreak/TimerBreakType.vala
@@ -33,7 +33,7 @@ public abstract class TimerBreakType : BreakType {
this.dbus_connection = GLib.Bus.get_sync (GLib.BusType.SESSION, cancellable);
this.dbus_connection.register_object (
- Config.DAEMON_BREAK_OBJECT_BASE_PATH+this.id,
+ Config.DAEMON_OBJECT_PATH + "/" + this.id,
new TimerBreakDBusObject (
(TimerBreakController) this.break_controller,
(TimerBreakView) this.break_view
diff --git a/src/meson.build b/src/meson.build
index c04b944..eae1670 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,6 @@
config_file = configure_file(
output: 'config.h',
- configuration: build_conf
+ configuration: build_conf_quoted
)
config_lib = valac.find_library(
diff --git a/src/settings/Application.vala b/src/settings/Application.vala
index d9bdfdc..cc78c42 100644
--- a/src/settings/Application.vala
+++ b/src/settings/Application.vala
@@ -122,6 +122,10 @@ public class Application : Gtk.Application {
GLib.error ("Error initializing main_window: %s", error.message);
}
+ if (Config.BUILD_PROFILE == "development") {
+ this.main_window.get_style_context ().add_class ("devel");
+ }
+
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 e09f958..7404838 100644
--- a/src/settings/BreakManager.vala
+++ b/src/settings/BreakManager.vala
@@ -61,7 +61,7 @@ public class BreakManager : GLib.Object {
public BreakManager (Application application) {
this.application = application;
- this.settings = new GLib.Settings ("org.gnome.BreakTimer");
+ this.settings = new GLib.Settings (Config.APPLICATION_ID);
this.breaks = new GLib.List<BreakType> ();
this.breaks.append (new MicroBreakType ());
@@ -271,7 +271,7 @@ public class BreakManager : GLib.Object {
}
private void launch_break_timer_service () {
- GLib.AppInfo daemon_app_info = new GLib.DesktopAppInfo (Config.DAEMON_DESKTOP_FILE_ID);
+ GLib.AppInfo daemon_app_info = new GLib.DesktopAppInfo (Config.DAEMON_APPLICATION_ID + ".desktop");
GLib.AppLaunchContext app_launch_context = new GLib.AppLaunchContext ();
try {
daemon_app_info.launch (null, app_launch_context);
diff --git a/src/settings/BreakSettingsDialog.vala b/src/settings/BreakSettingsDialog.vala
index 05f72f0..e43a0f7 100644
--- a/src/settings/BreakSettingsDialog.vala
+++ b/src/settings/BreakSettingsDialog.vala
@@ -36,7 +36,7 @@ public class BreakSettingsDialog : Gtk.Dialog {
this.break_manager = break_manager;
- GLib.Settings settings = new GLib.Settings ("org.gnome.BreakTimer");
+ GLib.Settings settings = new GLib.Settings (Config.APPLICATION_ID);
this.set_title (_("Choose Your Break Schedule"));
this.set_deletable (true);
diff --git a/src/settings/microbreak/MicroBreakType.vala b/src/settings/microbreak/MicroBreakType.vala
index 133d6d1..a26d1bd 100644
--- a/src/settings/microbreak/MicroBreakType.vala
+++ b/src/settings/microbreak/MicroBreakType.vala
@@ -25,7 +25,7 @@ namespace BreakTimer.Settings.MicroBreak {
public class MicroBreakType : TimerBreakType {
public MicroBreakType () {
- GLib.Settings settings = new GLib.Settings ("org.gnome.BreakTimer.microbreak");
+ GLib.Settings settings = new GLib.Settings (Config.APPLICATION_ID + ".microbreak");
base ("microbreak", settings);
this.interval_options = { 240, 300, 360, 480, 600 };
diff --git a/src/settings/restbreak/RestBreakType.vala b/src/settings/restbreak/RestBreakType.vala
index d4894af..cd6dd8f 100644
--- a/src/settings/restbreak/RestBreakType.vala
+++ b/src/settings/restbreak/RestBreakType.vala
@@ -25,7 +25,7 @@ namespace BreakTimer.Settings.RestBreak {
public class RestBreakType : TimerBreakType {
public RestBreakType () {
- GLib.Settings settings = new GLib.Settings ("org.gnome.BreakTimer.restbreak");
+ GLib.Settings settings = new GLib.Settings (Config.APPLICATION_ID + ".restbreak");
base ("restbreak", settings);
this.interval_options = { 1800, 2400, 3000, 3600 };
diff --git a/src/settings/timerbreak/TimerBreakType.vala b/src/settings/timerbreak/TimerBreakType.vala
index e13c244..8fb1322 100644
--- a/src/settings/timerbreak/TimerBreakType.vala
+++ b/src/settings/timerbreak/TimerBreakType.vala
@@ -99,7 +99,7 @@ public abstract class TimerBreakType : BreakType {
try {
this.break_server = this.dbus_connection.get_proxy_sync (
Config.DAEMON_APPLICATION_ID,
- Config.DAEMON_BREAK_OBJECT_BASE_PATH+this.id,
+ Config.DAEMON_OBJECT_PATH + "/" + this.id,
GLib.DBusProxyFlags.DO_NOT_AUTO_START
);
// We can only poll the break daemon application for updates, so
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]