Commit 6fb7a847 authored by Daniel Garcia Moreno's avatar Daniel Garcia Moreno

Initial commit

parents
Pipeline #52628 passed with stage
in 28 seconds
**/__pycache__
**/*.*~
data/#*#
.project
.pydevproject
_build
.buildconfig
.vscode
tags.rOfNyA
flatpak/.flatpak-builder/
stages:
- flatpak
variables:
BUNDLE: "org.gnome.timetrackDevel.flatpak"
flatpak:
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
stage: flatpak
variables:
MANIFEST_PATH: "flatpak/org.gnome.timetrack.json"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "timetrack"
MESON_ARGS: "-Dprofile=development"
script:
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
- flatpak build app meson --prefix=/app ${MESON_ARGS} _build
- flatpak build app ninja -C _build install
- flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
- flatpak build-export repo app
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} org.gnome.timetrackDevel
artifacts:
paths:
- ${BUNDLE}
- _build/meson-logs/meson-log.txt
expire_in: 30 days
cache:
paths:
- .flatpak-builder/cache
This diff is collapsed.
# Timetrack
Simple timetrack app for GNOME
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkAboutDialog" id="about_dialog">
<property name="can_focus">False</property>
<property name="type_hint">dialog</property>
<property name="program_name">Timetrack</property>
<property name="version">@VERSION@</property>
<property name="copyright">© 2019 Daniel García Moreno, et al.</property>
<property name="comments" translatable="yes">A timetrack for GNOME</property>
<property name="website">@PACKAGE_URL@</property>
<property name="website_label" translatable="yes">Learn more about timetrack</property>
<property name="authors">@CONTRIBUTORS@</property>
<property name="translator_credits" translatable="yes" comments="Add your name to the translator credits list">translator-credits</property>
<property name="logo_icon_name">@APPID@</property>
<property name="license_type">gpl-3-0</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="org.gnome.timetrack-symbolic.svg"
height="16"
id="svg7384"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
version="1.1"
width="16">
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer9"
inkscape:cx="26"
inkscape:cy="3.5"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#555753"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="true"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
inkscape:snap-to-guides="true"
inkscape:window-height="1136"
inkscape:window-maximized="1"
inkscape:window-width="1920"
inkscape:window-x="1600"
inkscape:window-y="27"
inkscape:zoom="6.4174757">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="117.99999"
originy="18"
snapvisiblegridlinesonly="true"
spacingx="1"
spacingy="1"
type="xygrid"
visible="true" />
<sodipodi:guide
position="-8.365,8"
orientation="0,1"
id="guide821"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,0,255)" />
<sodipodi:guide
position="8,18.874962"
orientation="1,0"
id="guide823"
inkscape:locked="false"
inkscape:label=""
inkscape:color="rgb(0,0,255)" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="apps"
style="display:inline"
transform="translate(-123.00021,-235)">
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 8 1 A 7 7 0 0 0 1 8 A 7 7 0 0 0 8 15 A 7 7 0 0 0 15 8 A 7 7 0 0 0 8 1 z M 9.96875 2.3398438 A 6 6 0 0 1 14 8 L 8.6074219 8 A 0.60691392 0.60691392 0 0 1 8 8.6074219 A 0.60691392 0.60691392 0 0 1 7.3925781 8 A 0.60691392 0.60691392 0 0 1 7.4785156 7.6914062 L 2.8457031 4.9414062 A 6 6 0 0 1 5.9980469 2.3515625 L 7.796875 7.4277344 A 0.60691392 0.60691392 0 0 1 8 7.3925781 A 0.60691392 0.60691392 0 0 1 8.1992188 7.4277344 L 9.96875 2.3398438 z "
transform="translate(123.00021,235)"
id="path819" />
</g>
</svg>
datadir = join_paths('share', 'icons')
icondir = join_paths('hicolor', 'scalable', 'apps')
if get_option('profile') == 'development'
install_data (
join_paths(icondir, 'org.gnome.timetrack.svg'),
install_dir: join_paths(datadir, icondir),
rename: 'org.gnome.timetrackDevel.svg'
)
else
install_data (
join_paths(icondir, 'org.gnome.timetrack.svg'),
install_dir: join_paths(datadir, icondir)
)
endif
icondir = join_paths('hicolor', 'symbolic', 'apps')
if get_option('profile') == 'development'
install_data (
join_paths(icondir, 'org.gnome.timetrack-symbolic.svg'),
install_dir: join_paths(datadir, icondir),
rename: 'org.gnome.timetrackDevel-symbolic.svg'
)
else
install_data (
join_paths(icondir, 'org.gnome.timetrack-symbolic.svg'),
install_dir: join_paths(datadir, icondir)
)
endif
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow">
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkListBox" id="timetrack-list">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
</object>
<object class="GtkPopover" id="menubutton_popover">
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="menubutton_popover_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">5</property>
<property name="margin_right">5</property>
<property name="margin_top">5</property>
<property name="margin_bottom">5</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkModelButton" id="menubutton_popover_settings_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">app.settings</property>
<property name="text" translatable="yes">Preferences</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkModelButton" id="menubutton_popover_shortcuts_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">app.shortcuts</property>
<property name="text" translatable="yes">Keyboard Shortcuts</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkModelButton" id="menubutton_popover_about_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">app.about</property>
<property name="text" translatable="yes" comments="&quot;timetrack&quot; is the application name">About timetrack</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkBox" id="headerbarbuttonbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="linkedbox_left">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="start_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">start</property>
<child>
<object class="GtkStack" id="new_button_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hhomogeneous">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="label" translatable="yes">start</property>
</object>
<packing>
<property name="name">desktop</property>
<property name="title">desktop</property>
</packing>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">list-add-symbolic</property>
</object>
<packing>
<property name="name">mobile</property>
<property name="title">mobile</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="stop_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">start</property>
<child>
<object class="GtkStack" id="open_button_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hhomogeneous">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="label" translatable="yes">stop</property>
</object>
<packing>
<property name="name">desktop</property>
<property name="title">desktop</property>
</packing>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">document-open-symbolic</property>
</object>
<packing>
<property name="name">mobile</property>
<property name="title">mobile</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<style>
<class name="destructive-action"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<child type="title">
<object class="GtkStack" id="activity-stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkEntry" id="activity-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">0.5</property>
<property name="placeholder_text" translatable="yes">Activity</property>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="activity-label">
<property name="name">track_label</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" comments="Application name in the headerbar title">timetrack</property>
<property name="ellipsize">end</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="menubuttonbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkMenuButton" id="menupopover_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">menubutton_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">open-menu-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>
gnome = import('gnome')
message('Compiling resources')
gnome.compile_resources(
meson.project_name(),
meson.project_name() + '.gresources.xml',
gresource_bundle: true,
source_dir: '.',
install_dir: DATA_DIR,
install: true,
dependencies: configure_file (
input: 'about_dialog.ui.in',
output: 'about_dialog.ui',
configuration: conf
)
)
desktop_conf = configuration_data()
application_id = 'org.gnome.timetrack'
if get_option('profile') == 'development'
application_id = 'org.gnome.timetrackDevel'
endif
desktop_conf.set('ICON', application_id)
desktop = i18n.merge_file(
'desktop',
input: configure_file(
input: files('org.gnome.timetrack.desktop.in.in'),
output: 'org.gnome.timetrack.desktop.in',
configuration: desktop_conf
),
output: '@0@.desktop'.format(application_id),
po_dir: join_paths(meson.source_root(), 'po'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
)
# Validating the desktop file
desktop_file_validate = find_program('desktop-file-validate', required:false)
if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: join_paths(meson.current_build_dir (), application_id + '.desktop')
)
endif
appdata_conf = configuration_data()
application_id = 'org.gnome.timetrack'
if get_option('profile') == 'development'
application_id = 'org.gnome.timetrackDevel'
endif
appdata_conf.set('APPID', application_id)
appdata = i18n.merge_file(
'appdata',
input: configure_file(
input: files('org.gnome.timetrack.appdata.xml.in.in'),
output: 'org.gnome.timetrack.appdata.xml.in',
configuration: appdata_conf
),
output: application_id + '.appdata.xml',
install: true,
install_dir: join_paths(join_paths('share'), 'metainfo'),
po_dir: join_paths(meson.source_root(), 'po')
)
# Validating the appdata file
appstreamcli = find_program('appstream-util', required: false)
if appstreamcli.found()
test (
'Validate appdata file',
appstreamcli,
args: ['validate-relax', join_paths(meson.current_build_dir (), application_id + '.appdata.xml')]
)
endif
subdir('icons')
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>@APPID@</id>
<name>Timetrack</name>
<launchable type="desktop-id">@APPID@.desktop</launchable>
<project_license>GPL-3.0</project_license>
<metadata_license>CC0-1.0</metadata_license>
<content_rating type="oars-1.1" />
<summary>A timetrack for GNOME</summary>
<description>
<p>Timetrack is a simple time track application for GNOME</p>
</description>
<categories>
<category>Utility</category>
</categories>
<url type="homepage">https://gitlab.gnome.org/danigm/timetrack</url>
<updatecontact>danigm@gnome.org</updatecontact>
<developer_name>Daniel García Moreno</developer_name>
</component>
[Desktop Entry]
Name=Timetrack
Comment=A timetrack for GNOME
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@ICON@
Exec=gnome-timetrack %U
Terminal=false
Type=Application
Categories=Utility;GTK;GNOME;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=timetrack;time;work;management;
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkShortcutsWindow" id="shortcuts_overview">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">True</property>
<property name="section-name">shortcuts</property>
<property name="max-height">10</property>
</object>
</child>
</object>
</interface>
/* Devel profile headerbar */
.devel headerbar {
background: transparent -gtk-icontheme("system-run-symbolic") 80% 0/128px 128px no-repeat,
linear-gradient(to left,
mix(@theme_fg_color, @theme_bg_color, 0.5) 0%,
@theme_bg_color 25%);
color: alpha(@theme_fg_color, 0.2);
}
.devel headerbar label {
color: @theme_fg_color;
}
/* Devel profile headerbar in selection mode */
.devel headerbar.selection-mode {
background: transparent -gtk-icontheme("system-run-symbolic") 80% 0/128px 128px no-repeat,
linear-gradient(to left,
@theme_selected_bg_color 0%,
@theme_selected_bg_color 25%);
color: alpha(@theme_fg_color, 0.2);
}
.devel headerbar.selection-mode label {
color: @theme_selected_fg_color;
}
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/timetrack">
<file compressed="true">timetrack.css</file>
<file compressed="true" preprocess="xml-stripblanks">about_dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">main_window.ui</file>
<file compressed="true" preprocess="xml-stripblanks">shortcuts_overview.ui</file>
</gresource>
</gresources>
{
"app-id": "org.gnome.timetrackDevel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"tags" : [
"devel",
"development",
"nightly"
],
"desktop-file-name-prefix": "(Development) ",
"command" : "gnome-timetrack",
"finish-args" : [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
"--filesystem=xdg-run/gvfs",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--talk-name=ca.desrt.dconf",
"--talk-name=org.gtk.vfs",
"--talk-name=org.gtk.vfs.*",
"--talk-name=org.freedesktop.Notifications"
],
"modules" : [
{
"name" : "timetrack",
"buildsystem" : "meson",
"builddir" : true,
"config-opts": [
"-Dprofile=development"
],
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/danigm/timetrack.git"
}
]
}
]
}
project('timetrack', 'c',
version: '3.31.1',
meson_version: '>= 0.46.0'
)
i18n = import('i18n')
python = import('python3')
project_id = 'org.gnome.timetrack'
contributors = 'Daniel García Moreno &lt;danigm@gnome.org&gt;'
message('Looking for dependencies')
python_bin = python.find_python()
if not python_bin.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
endif
dependency('glib-2.0')
dependency('gobject-introspection-1.0', version: '>=1.35.9')
dependency('gtk+-3.0', version :'>=3.20')
env = environment()
python_dir = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
LIBEXEC_DIR = join_paths(get_option('prefix'), get_option('libexecdir'))
EXTENSION_DIR = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
bindir = join_paths(get_option('prefix'), get_option('bindir'))