[evince/wip/gpoo/devel-icon: 1/3] build: Use devel icon for unstable version installed
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/gpoo/devel-icon: 1/3] build: Use devel icon for unstable version installed
- Date: Wed, 23 Jun 2021 19:29:14 +0000 (UTC)
commit c5a9ae3b46bff845758ee41f01d5d5a1b57f11f4
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Tue Jun 22 21:40:30 2021 -0400
build: Use devel icon for unstable version installed
* Help visually distinguish the development version from the
stable one.
data/icons/meson.build | 2 +-
data/org.gnome.Evince.desktop.in.in | 2 +-
meson.build | 9 +++++++++
meson_options.txt | 1 +
previewer/ev-previewer.c | 2 +-
shell/ev-window.c | 2 +-
shell/main.c | 2 +-
7 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/data/icons/meson.build b/data/icons/meson.build
index a38ef0c3..8fdf70ba 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -91,7 +91,7 @@ foreach icon: icons
endforeach
install_data(
- join_paths('scalable', 'apps', '@0@.svg'.format(ev_namespace)),
+ join_paths('scalable', 'apps', '@0@.svg'.format(app_id)),
install_dir: join_paths(ev_datadir, 'icons', 'hicolor', 'scalable', 'apps'),
)
diff --git a/data/org.gnome.Evince.desktop.in.in b/data/org.gnome.Evince.desktop.in.in
index d4f5d013..66c7d490 100644
--- a/data/org.gnome.Evince.desktop.in.in
+++ b/data/org.gnome.Evince.desktop.in.in
@@ -9,6 +9,6 @@ StartupNotify=true
Terminal=false
Type=Application
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=org.gnome.Evince
+Icon=@PACKAGE_ICON_NAME@
Categories=GNOME;GTK;Office;Viewer;Graphics;2DGraphics;VectorGraphics;
MimeType=@EVINCE_MIME_TYPES@;
diff --git a/meson.build b/meson.build
index 7c1e25e4..ed628182 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,12 @@ project(
meson_version: '>= 0.50.0',
)
+if get_option('development')
+ app_id = 'org.gnome.Evince.Devel'
+else
+ app_id = 'org.gnome.Evince'
+endif
+
ev_name = meson.project_name().to_lower()
ev_version = meson.project_version()
@@ -69,7 +75,9 @@ cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
config_h = configuration_data()
+
# package
+config_h.set_quoted('PACKAGE_ICON_NAME', app_id)
config_h.set_quoted('PACKAGE_VERSION', ev_version)
config_h.set_quoted('VERSION', ev_version)
@@ -437,6 +445,7 @@ endif
mime_types_conf = configuration_data()
mime_types_conf.set('EVINCE_MIME_TYPES', ';'.join(evince_mime_types))
+mime_types_conf.set('PACKAGE_ICON_NAME', app_id)
subdir('cut-n-paste')
subdir('libdocument')
diff --git a/meson_options.txt b/meson_options.txt
index 1e6ef657..9a3f90b2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
+option('development', type: 'boolean', value: false, description: 'whether this is a development build')
option('platform', type: 'combo', choices: ['gnome', 'win32'], value: 'gnome', description: 'for which
platform to build')
option('viewer', type: 'boolean', value: true, description: 'whether Viewer support is requested')
diff --git a/previewer/ev-previewer.c b/previewer/ev-previewer.c
index 9b54fd2f..06ca7ab2 100644
--- a/previewer/ev-previewer.c
+++ b/previewer/ev-previewer.c
@@ -220,7 +220,7 @@ main (gint argc, gchar **argv)
ev_stock_icons_init ();
g_set_application_name (_("GNOME Document Previewer"));
- gtk_window_set_default_icon_name ("org.gnome.Evince");
+ gtk_window_set_default_icon_name (PACKAGE_ICON_NAME);
application = gtk_application_new (NULL,
G_APPLICATION_NON_UNIQUE |
diff --git a/shell/ev-window.c b/shell/ev-window.c
index fab121ca..6c0a2283 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -4212,7 +4212,7 @@ ev_window_cmd_about (GSimpleAction *action,
"authors", authors,
"documenters", documenters,
"translator-credits", _("translator-credits"),
- "logo-icon-name", "org.gnome.Evince",
+ "logo-icon-name", PACKAGE_ICON_NAME,
NULL);
}
diff --git a/shell/main.c b/shell/main.c
index 6c54078b..53617948 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -296,7 +296,7 @@ main (int argc, char *argv[])
/* Manually set name and icon */
g_set_application_name (_("Document Viewer"));
- gtk_window_set_default_icon_name ("org.gnome.Evince");
+ gtk_window_set_default_icon_name (PACKAGE_ICON_NAME);
application = ev_application_new ();
if (!g_application_register (G_APPLICATION (application), NULL, &error)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]