Commit 427b6b57 authored by Evangelos Ribeiro Tzaras's avatar Evangelos Ribeiro Tzaras
Browse files

New upstream version 0.2.0

parent 5cee01a4
......@@ -11,6 +11,7 @@ variables:
DEPS: build-essential git
WANT_BUILD_DEPS: "true"
IMAGE: debian:bullseye
COMMON_BUILD_OPTS: --werror
before_script:
- export DEBIAN_FRONTEND=noninteractive
......@@ -26,6 +27,12 @@ before_script:
tags:
- librem5
.build_step: &build_step
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- ninja -C _build
build:native:
<<: *tags
image: $IMAGE
......@@ -33,9 +40,9 @@ build:native:
artifacts:
paths:
- _build
script:
- meson --werror . _build
- ninja -C _build
variables:
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
<<: *build_step
except:
variables:
- $PKG_ONLY == "1"
......@@ -53,6 +60,42 @@ test:native:
variables:
- $PKG_ONLY == "1"
build-gtkdoc:
<<: *tags
image: $IMAGE
stage: test
dependencies:
- build:native
<<: *build_step
script:
- ninja -C _build calls-doc
- mv _build/doc/html/ _reference/
artifacts:
paths:
- _reference
except:
variables:
- $PKG_ONLY == "1"
check-po:
<<: *tags
image: $IMAGE
stage: test
dependencies:
- build:native
before_script:
- apt-get -y update
- apt-get -y install intltool
script:
# barf on untranslated C files. Seems intltool
# can't be told to exit with non-zero exit status
# in this case
- cd po/
- intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0
except:
variables:
- $PKG_ONLY == "1"
package:deb-debian-buster:
extends: .l5-build-debian-package
......
......@@ -24,8 +24,9 @@
# What hardware are you running Calls on?
- [ ] Librem 5
- [ ] Librem 5 devkit
- [ ] amd64 qemu image
- [ ] Librem5 devkit
- [ ] other (please elaborate)
# What modem are you using?
......
......@@ -2,20 +2,32 @@ datadir = get_option('datadir')
sysconfdir = get_option('sysconfdir')
# Desktop file
install_data('sm.puri.Calls.desktop',
install_dir : join_paths(datadir, 'applications'))
install_data('sm.puri.Calls-daemon.desktop',
rename : 'sm.puri.Calls.desktop',
install_dir : join_paths(sysconfdir, 'xdg/autostart'))
desktop_file = i18n.merge_file(
input : 'sm.puri.Calls.desktop.in',
output : 'sm.puri.Calls.desktop',
type : 'desktop',
po_dir : '../po',
install : true,
install_dir : join_paths(datadir, 'applications')
)
desktop_file = i18n.merge_file(
input : 'sm.puri.Calls-daemon.desktop.in',
output : 'sm.puri.Calls-daemon.desktop',
type : 'desktop',
po_dir : '../po',
install : true,
install_dir : join_paths(sysconfdir, 'xdg/autostart')
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [join_paths(meson.current_source_dir(),
args: [join_paths(meson.current_build_dir(),
'sm.puri.Calls.desktop')
])
test('Validate daemon desktop file', desktop_utils,
args: [join_paths(meson.current_source_dir(),
args: [join_paths(meson.current_build_dir(),
'sm.puri.Calls-daemon.desktop')
])
endif
......
......@@ -3,7 +3,7 @@ Name=Calls (daemon)
GenericName=Phone
Comment=A phone dialer and call handler (daemon mode)
# Translators: These are desktop search terms. Do not translate semicolons, end line with a semicolon.
Keywords=Telephone;Call;Phone;Dial;Dialer;PTSN;
Keywords=Telephone;Call;Phone;Dial;Dialer;PSTN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
TryExec=calls
......
......@@ -3,7 +3,7 @@ Name=Calls
GenericName=Phone
Comment=A phone dialer and call handler
# Translators: These are desktop search terms. Do not translate semicolons, end line with a semicolon.
Keywords=Telephone;Call;Phone;Dial;Dialer;PTSN;
Keywords=Telephone;Call;Phone;Dial;Dialer;PSTN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
TryExec=calls
......
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<component type="desktop-application">
<id>sm.puri.Calls</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
......@@ -16,6 +16,12 @@
<project_group>GNOME</project_group>
<developer_name>Bob Ham</developer_name>
<recommends>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</recommends>
<kudos>
<kudo>ModernToolkit</kudo>
</kudos>
......
/usr/share/gtk-doc/html/calls
/etc
/usr/bin
/usr/lib
/usr/share/applications
/usr/share/icons
/usr/share/locale
/usr/share/metainfo
mv_conffile /etc/xdg/autostart/sm.puri.Calls.desktop /etc/xdg/autostart/sm.puri.Calls-daemon.desktop 0.2.0~
calls (0.2.0) amber-phone; urgency=medium
[ Adrien Plazas ]
* style: Fix the CSS path to the HdyKeypad buttons
[ Yuri Chornoivan ]
* po: Update Ukrainian translation
[ Evangelos Ribeiro Tzaras ]
* meson: bump calls to 0.1.9
* meson: allow internationalization of desktop files
* doc: meson: fix ofono path
* doc: meson: Use shared library for gtk-doc
* debian: Add dependencies and rules for building docs
* CI: build documentation
* debian: Move documentation to own package calls-doc
* data: Fix typo in desktop files
* call-window: inhibit idle during active call
[ Guido Günther ]
* po: Add calls-notifier.c
* gitlab-ci: Fail when C files are missing from POTFILES.in
* debian: Add desktop-file-utils
* data: Check desktop file in build dir
* d/control: Update description
* gitlab-template: Add Librem 5
[ Matthias Klumpp ]
* trivial: metainfo: style
* metainfo: Mark app as touch-input compatible
[ James Westman ]
* flatpak: Add callaudiod to flatpak
[ Daniel Abrecht ]
* Replace CallsOrigin getters with properties and add calls_origin_foreach_call method
* Don't localise property descriptions in calls-call and calls-origin properties
[ Andika Triwidada ]
* Added Indonesian translation
[ Sebastian Krzyszkowiak ]
* debian: Add maintscript to rename xdg autostart file
-- Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Wed, 06 Jan 2021 01:33:54 +0100
calls (0.1.9) amber-phone; urgency=medium
[ Juliano de Souza Camargo ]
......
......@@ -6,10 +6,13 @@ Uploaders:
Bob Ham <rah@settrans.net>,
Build-Depends:
debhelper (>= 11),
desktop-file-utils,
gtk-doc-tools <!nodoc>,
libcallaudio-dev,
libfeedback-dev,
libhandy-1-dev (>= 1.0.0),
libgtk-3-dev,
libgtk-3-doc <!nodoc>,
modemmanager-dev,
libmm-glib-dev (>= 1.12.0),
libpeas-dev,
......@@ -33,4 +36,24 @@ Depends:
callaudiod,
modemmanager,
Description: Make and receive PSTN phone calls
A GTK+ user interface for PSTN phone calls using oFono.
A GTK user interface for PSTN phone calls using ModemManager.
.
Besides phone calls it also handles USSD.
.
It works on desktops but also adjusts to small screen sizes like smart phones
and other mobile devices.
Package: calls-doc
Architecture: all
Build-Profiles: <!nodoc>
Depends:
${misc:Depends},
Description: Make and receive PSTN phone calls - development documentation
A GTK user interface for PSTN phone calls using ModemManager.
.
Besides phone calls it also handles USSD.
.
It works on desktops but also adjusts to small screen sizes like smart phones
and other mobile devices.
.
This package contains the development documentation.
......@@ -2,9 +2,25 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
CONFIGURE_OPTS+=-Dgtk_doc=true
else
CONFIGURE_OPTS+=-Dgtk_doc=false
endif
%:
dh $@ -- -B_build
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_OPTS)
override_dh_auto_build:
dh_auto_build
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
# https://github.com/mesonbuild/meson/pull/2862
ninja -C _build/ calls-doc
endif
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
xvfb-run ninja -C _build test
......
......@@ -6,14 +6,30 @@ glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
if get_option('gtk_doc')
# only build the shared library for gtk-doc
calls_vala_doc_lib = library('calls-vala-doc',
calls_vala_sources,
dependencies: calls_vala_deps)
calls_doc_lib = library('calls-doc',
[calls_sources, calls_enum_sources, wayland_sources, wl_proto_sources, gdbofono_src],
include_directories: calls_includes,
link_with: calls_vala_doc_lib,
dependencies: calls_deps)
calls_doc_deps = declare_dependency(sources: [calls_sources, calls_enum_sources, wayland_sources, wl_proto_sources, calls_vala_sources],
include_directories: calls_includes,
link_with: [calls_doc_lib, calls_vala_doc_lib],
dependencies: [calls_deps, calls_vala_deps])
endif
gnome.gtkdoc('calls',
main_xml: 'calls-docs.xml',
src_dir: [
join_paths(meson.source_root(), 'src'),
join_paths(meson.build_root(), 'src'),
join_paths(meson.build_root(), 'libgdbofono'),
join_paths(meson.build_root(), 'plugins/ofono/libgdbofono'),
],
dependencies: calls_deps,
dependencies: calls_doc_deps,
scan_args: [
'--rebuild-types',
],
......
......@@ -22,7 +22,7 @@
project(
'calls',
'c', 'vala',
version: '0.1.8',
version: '0.2.0',
license: 'GPLv3+',
meson_version: '>= 0.47.0',
default_options: [
......
......@@ -253,16 +253,16 @@ calls_dummy_call_class_init (CallsDummyCallClass *klass)
props[PROP_NUMBER_CONSTRUCTOR] =
g_param_spec_string ("number-constructor",
_("Number (constructor)"),
_("The dialed number (dummy class constructor)"),
"Number (constructor)",
"The dialed number (dummy class constructor)",
"+441234567890",
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_NUMBER_CONSTRUCTOR, props[PROP_NUMBER_CONSTRUCTOR]);
props[PROP_INBOUND_CONSTRUCTOR] =
g_param_spec_boolean ("inbound-constructor",
_("Inbound (constructor)"),
_("Whether the calls is inbound (dummy class constructor)"),
"Inbound (constructor)",
"Whether the calls is inbound (dummy class constructor)",
FALSE,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_INBOUND_CONSTRUCTOR, props[PROP_INBOUND_CONSTRUCTOR]);
......
......@@ -49,36 +49,20 @@ G_DEFINE_TYPE_WITH_CODE (CallsDummyOrigin, calls_dummy_origin, G_TYPE_OBJECT,
enum {
PROP_0,
/* Property for setting the origins name upon construction */
PROP_DUMMY_NAME_CONSTRUCTOR,
/* The origins name. The implements the name property from CallsOrigin.
* Readonly property, can't be set directly. */
PROP_NAME,
PROP_CALLS,
PROP_LAST_PROP,
};
static GParamSpec *props[PROP_LAST_PROP];
static const gchar *
get_name (CallsOrigin *origin)
{
CallsDummyOrigin *self;
g_return_val_if_fail (CALLS_IS_DUMMY_ORIGIN (origin), NULL);
self = CALLS_DUMMY_ORIGIN (origin);
return self->name->str;
}
static GList *
get_calls (CallsOrigin *origin)
{
CallsDummyOrigin *self;
g_return_val_if_fail (CALLS_IS_DUMMY_ORIGIN (origin), NULL);
self = CALLS_DUMMY_ORIGIN (origin);
return g_list_copy (self->calls);
}
static void
remove_call (CallsDummyOrigin *self,
CallsCall *call,
......@@ -172,7 +156,7 @@ CallsDummyOrigin *
calls_dummy_origin_new (const gchar *name)
{
return g_object_new (CALLS_TYPE_DUMMY_ORIGIN,
"name", name,
"dummy-name-constructor", name,
NULL);
}
......@@ -186,7 +170,7 @@ set_property (GObject *object,
CallsDummyOrigin *self = CALLS_DUMMY_ORIGIN (object);
switch (property_id) {
case PROP_NAME:
case PROP_DUMMY_NAME_CONSTRUCTOR:
g_string_assign (self->name, g_value_get_string (value));
break;
......@@ -197,6 +181,30 @@ set_property (GObject *object,
}
static void
get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
CallsDummyOrigin *self = CALLS_DUMMY_ORIGIN (object);
switch (property_id) {
case PROP_NAME:
g_value_set_string (value, self->name->str);
break;
case PROP_CALLS:
g_value_set_pointer (value, g_list_copy (self->calls));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
dispose (GObject *object)
{
......@@ -226,16 +234,26 @@ calls_dummy_origin_class_init (CallsDummyOriginClass *klass)
object_class->dispose = dispose;
object_class->finalize = finalize;
object_class->get_property = get_property;
object_class->set_property = set_property;
props[PROP_NAME] =
g_param_spec_string ("name",
_("Name"),
_("The name of the origin"),
props[PROP_DUMMY_NAME_CONSTRUCTOR] =
g_param_spec_string ("dummy-name-constructor",
"Name",
"The name of the origin",
"Dummy origin",
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_DUMMY_NAME_CONSTRUCTOR, props[PROP_DUMMY_NAME_CONSTRUCTOR]);
#define IMPLEMENTS(ID, NAME) \
g_object_class_override_property (object_class, ID, NAME); \
props[ID] = g_object_class_find_property(object_class, NAME);
IMPLEMENTS (PROP_NAME, "name");
IMPLEMENTS (PROP_CALLS, "calls");
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
#undef IMPLEMENTS
}
......@@ -248,8 +266,6 @@ calls_dummy_origin_message_source_interface_init (CallsOriginInterface *iface)
static void
calls_dummy_origin_origin_interface_init (CallsOriginInterface *iface)
{
iface->get_name = get_name;
iface->get_calls = get_calls;
iface->dial = dial;
}
......
......@@ -391,8 +391,8 @@ calls_mm_call_class_init (CallsMMCallClass *klass)
object_class->finalize = finalize;
props[PROP_MM_CALL] = g_param_spec_object ("mm-call",
_("MM call"),
_("A libmm-glib proxy object for the underlying call object"),
"MM call",
"A libmm-glib proxy object for the underlying call object",
MM_TYPE_CALL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_MM_CALL, props[PROP_MM_CALL]);
......
......@@ -63,6 +63,8 @@ G_DEFINE_TYPE_WITH_CODE (CallsMMOrigin, calls_mm_origin, G_TYPE_OBJECT,
enum {
PROP_0,
PROP_NAME,
PROP_CALLS,
PROP_MODEM,
PROP_LAST_PROP,
};
......@@ -294,21 +296,6 @@ calls_mm_ussd_cancel_finish (CallsUssd *ussd,
return g_task_propagate_boolean (G_TASK (result), error);
}
static const gchar *
get_name (CallsOrigin *origin)
{
CallsMMOrigin *self = CALLS_MM_ORIGIN (origin);
return self->name;
}
static GList *
get_calls (CallsOrigin * origin)
{
CallsMMOrigin *self = CALLS_MM_ORIGIN (origin);
return g_hash_table_get_values (self->calls);
}
static void
dial_cb (MMModemVoice *voice,
......@@ -641,6 +628,30 @@ set_property (GObject *object,
}
static void
get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
CallsMMOrigin *self = CALLS_MM_ORIGIN (object);
switch (property_id) {
case PROP_NAME:
g_value_set_string (value, self->name);
break;
case PROP_CALLS:
g_value_set_pointer(value, g_hash_table_get_values (self->calls));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static gchar *
modem_get_name (MMModem *modem)
{
......@@ -792,6 +803,7 @@ calls_mm_origin_class_init (CallsMMOriginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = get_property;
object_class->set_property = set_property;
object_class->constructed = constructed;
object_class->dispose = dispose;
......@@ -799,12 +811,21 @@ calls_mm_origin_class_init (CallsMMOriginClass *klass)
props[PROP_MODEM] =
g_param_spec_object ("mm-object",
_("Modem Object"),
_("A libmm-glib proxy object for the modem"),
"Modem Object",
"A libmm-glib proxy object for the modem",
MM_TYPE_OBJECT,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_MODEM, props[PROP_MODEM]);
#define IMPLEMENTS(ID, NAME) \
g_object_class_override_property (object_class, ID, NAME); \
props[ID] = g_object_class_find_property(object_class, NAME);
IMPLEMENTS (PROP_NAME, "name");
IMPLEMENTS (PROP_CALLS, "calls");
#undef IMPLEMENTS
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
}
......@@ -830,8 +851,6 @@ calls_mm_origin_ussd_interface_init (CallsUssdInterface *iface)
static void
calls_mm_origin_origin_interface_init (CallsOriginInterface *iface)
{
iface->get_name = get_name;
iface->get_calls = get_calls;
iface->dial = dial;
}
......
......@@ -357,16 +357,16 @@ calls_ofono_call_class_init (CallsOfonoCallClass *klass)
props[PROP_VOICE_CALL] =
g_param_spec_object ("voice-call",
_("Voice call"),
_("A GDBO proxy object for the underlying call object"),
"Voice call",
"A GDBO proxy object for the underlying call object",
GDBO_TYPE_VOICE_CALL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_VOICE_CALL, props[PROP_VOICE_CALL]);
props[PROP_PROPERTIES] =
g_param_spec_variant ("properties",
_("Properties"),
_("The a{sv} dictionary of properties for the voice call object"),
"Properties",
"The a{sv} dictionary of properties for the voice call object",
G_VARIANT_TYPE_ARRAY,
NULL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
......
......@@ -53,27 +53,14 @@ G_DEFINE_TYPE_WITH_CODE (CallsOfonoOrigin, calls_ofono_origin, G_TYPE_OBJECT,