aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-03-31 16:35:18 +0200
committerGuido Günther <agx@sigxcpu.org>2020-03-31 18:16:28 +0200
commit52b85f55adc750e84c584fcbd939d0cc38d9568b (patch)
tree18ae4dd4c230ec8e22a9924172cdc54f97f823d0
parentd481e04a2e3713d563037889b1dc5b1417e63ecd (diff)
Introduce and use app_id
-rw-r--r--meson.build1
-rw-r--r--src/ppm/__init__.py.in1
-rw-r--r--src/ppm/meson.build1
-rwxr-xr-xsrc/prepaid-manager-applet.py6
4 files changed, 6 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index a2a71ea..5f8fdfe 100644
--- a/meson.build
+++ b/meson.build
@@ -3,6 +3,7 @@ project('ppm',
meson_version: '>= 0.49.0',
)
+app_id = 'org.gnome.PrepaidManager'
package = 'prepaid-manager-applet'
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
diff --git a/src/ppm/__init__.py.in b/src/ppm/__init__.py.in
index a423777..aa674ea 100644
--- a/src/ppm/__init__.py.in
+++ b/src/ppm/__init__.py.in
@@ -1,5 +1,6 @@
# Paths for prepaid-manager-applet
+app_id = '@APP_ID@'
gettext_app = '@PACKAGE@'
gettext_dir = '@GETTEXTDIR@'
data_dir = '@PKGDATADIR@'
diff --git a/src/ppm/meson.build b/src/ppm/meson.build
index bda47c4..bbf049f 100644
--- a/src/ppm/meson.build
+++ b/src/ppm/meson.build
@@ -9,6 +9,7 @@ sources = [
install_data(sources, install_dir: pythondir)
conf = configuration_data()
+conf.set('APP_ID', app_id)
conf.set('VERSION', meson.project_version())
conf.set('PACKAGE', package)
conf.set('PYLIBDIR', pkgdatadir)
diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py
index 9f6278c..d751ca0 100755
--- a/src/prepaid-manager-applet.py
+++ b/src/prepaid-manager-applet.py
@@ -779,8 +779,8 @@ def setup_i18n():
def setup_prgname():
"""Set the prgname since gnome-shell is application based"""
- GLib.set_prgname(ppm.prgname)
- Gdk.set_program_class(ppm.prgname)
+ GLib.set_prgname(ppm.app_id)
+ Gdk.set_program_class(ppm.app_id)
GLib.set_application_name(_("Prepaid Manager"))
@@ -797,7 +797,7 @@ def main(args):
logging.basicConfig(level=log_level,
format='ppm: %(levelname)s: %(message)s')
- logging.debug("%s %s", ppm.prgname, ppm.version)
+ logging.debug("%s %s", ppm.app_id, ppm.version)
setup_i18n()
setup_prgname()