1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-06-30 22:54:23 +00:00

libview: make it possible to get libview icon directory from env var

Together with changes to meson, it allows to have icons while doing
"meson devenv". Icons are expected under the "hicolor" location, so
create a link that points there.
This commit is contained in:
Pablo Correa Gómez 2023-05-22 23:22:11 +02:00 committed by Germán Poo-Caamaño
parent aa2e5276d5
commit 6150af1a8a
3 changed files with 9 additions and 1 deletions

1
data/icons/hicolor Symbolic link
View File

@ -0,0 +1 @@
.

View File

@ -99,3 +99,9 @@ install_data(
join_paths('symbolic', 'apps', '@0@-symbolic.svg'.format(ev_namespace)),
install_dir: join_paths(ev_datadir, 'icons', 'hicolor', 'symbolic', 'apps'),
)
if ev_debug
devenv = environment()
devenv.set('EV_ICONS_DIR', meson.current_source_dir())
meson.add_devenv(devenv)
endif

View File

@ -105,6 +105,8 @@ ev_stock_icons_init (void)
g_free (dir);
#else
ev_icons_path = g_build_filename (EVINCEDATADIR, "icons", NULL);
if (g_getenv ("EV_ICONS_DIR") != NULL)
ev_icons_path = g_build_filename (g_getenv ("EV_ICONS_DIR"), NULL);
#endif
factory = gtk_icon_factory_new ();
@ -144,4 +146,3 @@ ev_stock_icons_shutdown (void)
{
g_free (ev_icons_path);
}