Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize desktop files, simplify build #778

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,21 @@ install_data(
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas')
)

config_data = configuration_data()
config_data.set('EXEC_NAME', meson.project_name())

# Set the executable name and translate the desktop files
viewer_desktop_in_file = configure_file(
input: 'viewer.desktop.in.in',
output: '@BASENAME@',
configuration: config_data
)

viewer_desktop_file = i18n.merge_file(
input: viewer_desktop_in_file,
i18n.merge_file(
input: 'viewer.desktop.in',
output: meson.project_name() + '.viewer.desktop',
po_dir: join_paths(meson.source_root (), 'po', 'extra'),
po_dir: meson.project_source_root() / 'po' / 'extra',
type: 'desktop',
install_dir: join_paths(get_option('datadir'), 'applications'),
install_dir: get_option('datadir') / 'applications',
install: true
)

app_desktop_in_file = configure_file(
input: meson.project_name() + '.desktop.in.in',
output: '@BASENAME@',
configuration: config_data
)

app_desktop_file = i18n.merge_file(
input: app_desktop_in_file,
i18n.merge_file(
input: 'photos.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root (), 'po', 'extra'),
po_dir: meson.project_source_root() / 'po' / 'extra',
type: 'desktop',
install_dir: join_paths(get_option('datadir'), 'applications'),
install_dir: get_option('datadir') / 'applications',
install: true
)

Expand Down
17 changes: 11 additions & 6 deletions data/io.elementary.photos.desktop.in.in → data/photos.desktop.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
[Desktop Entry]
Version=1.5
Type=Application

Name=Photos
Comment=Organize your photos
Exec=@EXEC_NAME@ %U
Icon=io.elementary.photos
GenericName=Photo Manager
Categories=Graphics;Photography;GNOME;GTK;
Keywords=album;cameras;crop;edit;enhance;export;gallery;images;import;organize;photographs;photos;pictures;photography;print;publish;rotate;share;tags;video;
Terminal=false
Type=Application

Icon=io.elementary.photos
Exec=io.elementary.photos %U
SingleMainWindow=true
StartupNotify=true
Terminal=false

MimeType=x-content/image-dcf;
Categories=Graphics;Photography;GNOME;GTK;

X-GNOME-UsesNotifications=false
16 changes: 11 additions & 5 deletions data/viewer.desktop.in.in → data/viewer.desktop.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[Desktop Entry]
Version=1.5
Type=Application

Name=Photo Viewer
GenericName=Photo Viewer
Exec=@EXEC_NAME@ %U
Categories=Graphics;Viewer;Photography;GNOME;GTK;

Icon=io.elementary.photos.viewer
Terminal=false
Exec=io.elementary.photos %U
NoDisplay=true
Type=Application
SingleMainWindow=false
StartupNotify=true
Terminal=false

MimeType=image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/gif;image/x-3fr;image/x-adobe-dng;image/x-arw;image/x-bay;image/x-bmp;image/x-canon-cr2;image/x-canon-crw;image/x-cap;image/x-cr2;image/x-crw;image/x-dcr;image/x-dcraw;image/x-dcs;image/x-dng;image/x-drf;image/x-eip;image/x-erf;image/x-fff;image/x-fuji-raf;image/x-iiq;image/x-k25;image/x-kdc;image/x-mef;image/x-minolta-mrw;image/x-mos;image/x-mrw;image/x-nef;image/x-nikon-nef;image/x-nrw;image/x-olympus-orf;image/x-orf;image/x-panasonic-raw;image/x-pef;image/x-pentax-pef;image/x-png;image/x-ptx;image/x-pxn;image/x-r3d;image/x-raf;image/x-raw;image/x-rw2;image/x-rwl;image/x-rwz;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-sr2;image/x-srf;image/x-x3f;image/webp;
Categories=Graphics;Viewer;Photography;GNOME;GTK;

X-GNOME-UsesNotifications=false
4 changes: 2 additions & 2 deletions po/extra/POTFILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data/viewer.desktop.in.in
data/io.elementary.photos.desktop.in.in
data/viewer.desktop.in
data/photos.desktop.in
data/photos.metainfo.xml.in