Skip to content

Commit

Permalink
feat(i18n): add translatable desktop files
Browse files Browse the repository at this point in the history
- Includes the first swappy logo, yay !
- Includes a desktop file that registers mime type for png files

Closes #35
  • Loading branch information
jtheoof committed Jun 24, 2020
1 parent 38168d4 commit 7df87f8
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 0 deletions.
118 changes: 118 additions & 0 deletions res/icons/hicolor/scalable/apps/swappy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions res/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# resources will be compiled.
gnome = import('gnome')

# Icons
install_subdir('icons',
install_dir: join_paths(get_option('datadir')),
)

swappy_resources = gnome.compile_resources('swappy',
'swappy.gresource.xml'
)
10 changes: 10 additions & 0 deletions src/po/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ add_project_arguments('-DGETTEXT_PACKAGE="intltest"', language:'c')
i18n.gettext(meson.project_name(),
args: '--directory=' + meson.source_root()
)

# Translate and install our .desktop file
i18n.merge_file(
input: meson.project_name() + '.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: meson.current_source_dir(),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
13 changes: 13 additions & 0 deletions src/po/swappy.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Desktop Entry]
Name=Swappy
GenericName=Annotation Tool
Comment=A Wayland native snapshot editing tool
TryExec=swappy
Exec=swappy -f %F
Terminal=true
Type=Application
Keywords=wayland;snapshot;annotation;editing;
Icon=swappy
Categories=Utility;Graphics;Annotation;
StartupNotify=true
MimeType=image/png;

0 comments on commit 7df87f8

Please sign in to comment.