summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-02-03 16:31:12 +0100
committerBastien Nocera <hadess@hadess.net>2022-02-03 17:12:54 +0100
commita5cd7d442cb9ba5d38091c849a51377fa6c1f243 (patch)
tree384eab4fc7587a0a24e32073312e70781c177d81
parent2dd9166e2f2a3f33a5740c04f9d7ce6a03ba0709 (diff)
downloadtotem-a5cd7d442cb9ba5d38091c849a51377fa6c1f243.tar.gz
main: Allow translation of development branch app name
Rather than using an icon, use a string that can be translated as the app name. "Preview" will the suffix for that app name until we agree on a common name in https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/155
-rw-r--r--data/meson.build1
-rw-r--r--data/org.gnome.Totem.desktop.in.in2
-rw-r--r--flatpak/org.gnome.Totem.Devel.json1
-rw-r--r--meson.build6
-rw-r--r--src/totem.c4
5 files changed, 10 insertions, 4 deletions
diff --git a/data/meson.build b/data/meson.build
index b5bad747c..3bd9ac254 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -62,6 +62,7 @@ r = run_command(desktop_sh, mime_type_list, uri_schemes_list, check: true)
desktop_conf = configuration_data()
desktop_conf.set('VERSION', totem_version)
desktop_conf.set('APPLICATION_ID', application_id)
+desktop_conf.set('APPLICATION_NAME', application_name)
desktop_conf.set('MIME_TYPE', r.stdout().strip())
source_desktop = 'org.gnome.Totem.desktop'
diff --git a/data/org.gnome.Totem.desktop.in.in b/data/org.gnome.Totem.desktop.in.in
index 0e3b6bdc2..d7b2ab678 100644
--- a/data/org.gnome.Totem.desktop.in.in
+++ b/data/org.gnome.Totem.desktop.in.in
@@ -1,5 +1,5 @@
[Desktop Entry]
-Name=Videos
+Name=@APPLICATION_NAME@
Comment=Play movies
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! Do NOT translate or remove the application name from the list! It is used for search.
Keywords=Video;Movie;Film;Clip;Series;Player;DVD;TV;Disc;Totem;
diff --git a/flatpak/org.gnome.Totem.Devel.json b/flatpak/org.gnome.Totem.Devel.json
index f0d528cae..b6231dccb 100644
--- a/flatpak/org.gnome.Totem.Devel.json
+++ b/flatpak/org.gnome.Totem.Devel.json
@@ -5,7 +5,6 @@
"sdk": "org.gnome.Sdk",
"command": "totem",
"tags": ["nightly"],
- "desktop-file-name-suffix": " ☢️",
"finish-args": [
/* X11 + XShm access */
"--share=ipc", "--socket=fallback-x11",
diff --git a/meson.build b/meson.build
index 802b51fd5..f6e7a3cfe 100644
--- a/meson.build
+++ b/meson.build
@@ -41,12 +41,13 @@ totem_debug = get_option('buildtype').contains('debug')
cc = meson.get_compiler('c')
+# The app_name needs to match src/totem.c
if get_option('profile') == 'development'
profile = '.Devel'
- name_suffix = ' ☢️'
+ application_name = 'Videos Preview'
else
profile = ''
- name_suffix = ''
+ application_name = 'Videos'
endif
application_id = 'org.gnome.Totem@0@'.format(profile)
@@ -70,6 +71,7 @@ set_defines = [
foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
+config_h.set10('DEVELOPMENT_VERSION', get_option('profile') == 'development')
# Compiler flags
common_flags = [
diff --git a/src/totem.c b/src/totem.c
index 3ea46b7c3..f98be837e 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -70,7 +70,11 @@ main (int argc, char **argv)
#endif
g_set_prgname ("totem");
+#if DEVELOPMENT_VERSION
+ g_set_application_name (_("Videos Preview"));
+#else
g_set_application_name (_("Videos"));
+#endif
gtk_window_set_default_icon_name (APPLICATION_ID);
g_setenv("PULSE_PROP_media.role", "video", TRUE);
g_setenv("PULSE_PROP_application.icon_name", APPLICATION_ID, TRUE);