[gnome-contacts/wip/nielsdg/devel-app-id: 1/2] Adjust application id based on profile
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/devel-app-id: 1/2] Adjust application id based on profile
- Date: Sun, 5 Jan 2020 21:53:12 +0000 (UTC)
commit 21a14406f949ef857097502d97913d03a4a4306c
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Jan 5 22:28:56 2020 +0100
Adjust application id based on profile
data/meson.build | 10 ++++++++--
...me.Contacts.desktop.in => org.gnome.Contacts.desktop.in.in} | 2 +-
meson.build | 9 +++++++--
po/POTFILES.in | 2 +-
src/contacts-settings.vala | 2 +-
5 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 3ef7d24..f075b62 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -12,8 +12,14 @@ endforeach
# The desktop file
desktop_file = i18n.merge_file(
- input: 'org.gnome.Contacts.desktop.in',
- output: '@BASENAME@',
+ input: configure_file(
+ input: 'org.gnome.Contacts.desktop.in.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'icon': contacts_app_id,
+ },
+ ),
+ output: '@0@.desktop'.format(contacts_app_id),
type: 'desktop',
po_dir: po_dir,
install: true,
diff --git a/data/org.gnome.Contacts.desktop.in b/data/org.gnome.Contacts.desktop.in.in
similarity index 95%
rename from data/org.gnome.Contacts.desktop.in
rename to data/org.gnome.Contacts.desktop.in.in
index 63945b4..81238eb 100644
--- a/data/org.gnome.Contacts.desktop.in
+++ b/data/org.gnome.Contacts.desktop.in.in
@@ -4,7 +4,7 @@ Comment=A contacts manager for GNOME
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list
MUST also end with a semicolon!
Keywords=friends;address book;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=org.gnome.Contacts
+Icon=@icon@
Exec=gnome-contacts
Terminal=false
Type=Application
diff --git a/meson.build b/meson.build
index c6a92a7..73fd52f 100644
--- a/meson.build
+++ b/meson.build
@@ -13,9 +13,14 @@ add_project_arguments(
language: 'vala'
)
-# Common variables
-contacts_app_id = 'org.gnome.Contacts'
+# Application ID
+if get_option('profile') == 'default'
+ contacts_app_id = 'org.gnome.Contacts'
+else
+ contacts_app_id = 'org.gnome.Contacts.Devel'
+endif
+# Common variables
config_h_dir = include_directories('.')
contacts_prefix = get_option('prefix')
locale_dir = contacts_prefix / get_option('localedir')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 10d2744..f42cb90 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
data/org.gnome.Contacts.appdata.xml.in
-data/org.gnome.Contacts.desktop.in
+data/org.gnome.Contacts.desktop.in.in
data/gtk/help-overlay.ui
data/ui/contacts-accounts-list.ui
data/ui/contacts-avatar-selector.ui
diff --git a/src/contacts-settings.vala b/src/contacts-settings.vala
index b2517f8..db4333b 100644
--- a/src/contacts-settings.vala
+++ b/src/contacts-settings.vala
@@ -37,7 +37,7 @@ public class Contacts.Settings : GLib.Settings {
}
public Settings (App app) {
- Object (schema_id: app.application_id);
+ Object (schema_id: "org.gnome.Contacts");
}
public void bind_default (string key, Object object, string property) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]