Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig <https://EditorConfig.org>
root = true

# elementary defaults
[*]
charset = utf-8
end_of_line = lf
indent_size = tab
indent_style = space
insert_final_newline = true
max_line_length = 80
tab_width = 4

# Markup files
[{*.html,*.xml,*.xml.in,*.yml}]
tab_width = 2
tab_width = 2
File renamed without changes.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Features:
- Keyboard control: Change the sizes using the up and down keys, press enter to resize.
- Settings are stored for next time.

![Screenshot resize image](screenshot-6-image.png)
![Screenshot empty](screenshot-6-empty.png)
![Screenshot resize multiple images](screenshot-6-images.png)
![Screenshot resize image](data/screenshots/screenshot-6-image.png)
![Screenshot empty](data/screenshots/screenshot-6-empty.png)
![Screenshot resize multiple images](data/screenshots/screenshot-6-images.png)

## Building, Testing, and Installation

Expand All @@ -36,14 +36,16 @@ To install, use `ninja install`, then execute with `com.github.peteruithoven.res
sudo ninja install
com.github.peteruithoven.resizer

## translations
## Translations
Generate `.pot` file using `po/LINGUAS` and `po/POTFILES`:

ninja com.github.peteruithoven.resizer-pot
ninja extra-pot

Generate / update `.po` files:

ninja com.github.peteruithoven.resizer-update-po
ninja extra-update-po

## Credits

Expand Down
74 changes: 37 additions & 37 deletions data/com.github.peteruithoven.resizer.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
Features:
</p>
<ul>
<li>Open images with Resizer or open Resizer and Drag and drop images</li>
<li>Maintains aspect ratio.</li>
<li>Keyboard control: Change the sizes using the up and down keys, press enter to resize.</li>
<li>Settings are stored for next time.</li>
<li>Open images with Resizer or open Resizer and Drag and drop images</li>
<li>Maintains aspect ratio.</li>
<li>Keyboard control: Change the sizes using the up and down keys, press enter to resize.</li>
<li>Settings are stored for next time.</li>
</ul>
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/screenshot-6-image.png</image>
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/data/screenshots/screenshot-6-image.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/screenshot-6-empty.png</image>
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/data/screenshots/screenshot-6-empty.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/screenshot-6-images.png</image>
<image>https://raw.githubusercontent.com/peteruithoven/resizer/master/data/screenshots/screenshot-6-images.png</image>
</screenshot>
</screenshots>
<releases>
<release version="2.3.0" date="2022-01-19">
<release version="2.3.0" date="2022-01-19">
<description>
<ul>
<li>Auto focus relevant buttons</li>
Expand All @@ -41,7 +41,7 @@
</ul>
</description>
</release>
<release version="2.2.0" date="2021-11-25">
<release version="2.2.0" date="2021-11-25">
<description>
<ul>
<li>Selecting images through file chooser (Thanks @Adithyan-KV)</li>
Expand Down Expand Up @@ -130,94 +130,94 @@
<release version="1.1.1" date="2019-02-06">
<description>
<ul>
<li>Never upscale images</li>
<li>Added info box</li>
<li>Never upscale images</li>
<li>Added info box</li>
</ul>
</description>
</release>
<release version="1.1.0" date="2019-02-06">
<description>
<ul>
<li>Never upscale images</li>
<li>Added info box</li>
<li>Never upscale images</li>
<li>Added info box</li>
</ul>
</description>
</release>
<release version="1.0.7" date="2019-01-31">
<description>
<ul>
<li>Improved Lithuanian translation (Thanks @welaq)</li>
<li>Added French translation (Thanks @NathanBnm)</li>
<li>Added more app categories</li>
<li>Improved Lithuanian translation (Thanks @welaq)</li>
<li>Added French translation (Thanks @NathanBnm)</li>
<li>Added more app categories</li>
</ul>
</description>
</release>
<release version="1.0.6" date="2018-09-14">
<description>
<ul>
<li>Improved page transition</li>
<li>Added clearer finished state</li>
<li>Republishing for Juno</li>
<li>Improved page transition</li>
<li>Added clearer finished state</li>
<li>Republishing for Juno</li>
</ul>
</description>
</release>
<release version="1.0.5" date="2018-09-14">
<description>
<ul>
<li>Improved page transition</li>
<li>Added clearer finished state</li>
<li>Improved page transition</li>
<li>Added clearer finished state</li>
</ul>
</description>
</release>
<release version="1.0.4" date="2018-07-24">
<description>
<ul>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>Release for Loki</li>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>Release for Loki</li>
</ul>
</description>
</release>
<release version="1.0.3" date="2018-07-23">
<description>
<ul>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>More appdata file fixes</li>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>More appdata file fixes</li>
</ul>
</description>
</release>
<release version="1.0.2" date="2018-07-21">
<description>
<ul>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>Appdata file fixes</li>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>Appdata file fixes</li>
</ul>
</description>
</release>
<release version="1.0.1" date="2018-07-21">
<description>
<ul>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
<li>Lithuanian translation (Thanks welaq)</li>
<li>Fixed issue where files with a . in their path couldn't be resized (Thanks inhji)</li>
</ul>
</description>
</release>
<release version="1.0.0" date="2018-02-09">
<description>
<ul>
<li>Improved icon thanks to TraumaD</li>
<li>Clarified that it resizes within size using labels</li>
<li>Improved icon thanks to TraumaD</li>
<li>Clarified that it resizes within size using labels</li>
</ul>
</description>
</release>
<release version="0.10.0" date="2018-02-07">
<description>
<ul>
<li>Progress indication</li>
<li>Proper error messages</li>
<li>Switched to GPL-3.0</li>
<li>Progress indication</li>
<li>Proper error messages</li>
<li>Switched to GPL-3.0</li>
</ul>
</description>
</release>
Expand Down
4 changes: 0 additions & 4 deletions data/com.github.peteruithoven.resizer.contract
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[Contractor Entry]
Name=Resize images
Name[lt]=Keisti paveikslų dydį
Name[pl]=Zmień rozmiar obrazu
Description=Resize images
Description[lt]=Keisti paveikslų dydį
Description[pl]=Zmień rozmiar obrazu
MimeType=image
Icon=com.github.peteruithoven.resizer
Exec=com.github.peteruithoven.resizer %F
20 changes: 10 additions & 10 deletions data/com.github.peteruithoven.resizer.gschema.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<schemalist>
<schema id="com.github.peteruithoven.resizer" path="/com/github/peteruithoven/resizer/" gettext-domain="com.github.peteruithoven.resizer">
<key name="width" type="i">
<range min="1" max="10000"/>
<default>1000</default>
</key>
<key name="height" type="i">
<range min="1" max="10000"/>
<default>1000</default>
</key>
</schema>
<schema id="com.github.peteruithoven.resizer" path="/com/github/peteruithoven/resizer/" gettext-domain="com.github.peteruithoven.resizer">
<key name="width" type="i">
<range min="1" max="10000" />
<default>1000</default>
</key>
<key name="height" type="i">
<range min="1" max="10000" />
<default>1000</default>
</key>
</schema>
</schemalist>
46 changes: 25 additions & 21 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
# Install icons
icon_sizes = ['16', '24', '32', '48', '64', '128']

foreach i : icon_sizes
install_data (
join_paths('icons', i + '.svg'),
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps'),
rename : meson.project_name() + '.svg'
join_paths ('icons', i + '.svg'),
install_dir: join_paths (get_option ('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps'),
rename : meson.project_name () + '.svg'
)
install_data (
join_paths ('icons', i + '.svg'),
install_dir: join_paths (get_option ('datadir'), 'icons', 'hicolor', i + 'x' + i + '@2', 'apps'),
rename : meson.project_name () + '.svg'
)
endforeach

i18n.merge_file(
input: meson.project_name() + '.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root(), 'po', 'extra'),
# Translate and install our .desktop file so the Applications Menu will see it
i18n.merge_file (
input: meson.project_name () + '.desktop.in',
output: meson.project_name () + '.desktop',
po_dir: join_paths (meson.source_root (), 'po', 'extra'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
install_dir: join_paths (get_option ('datadir'), 'applications')
)

i18n.merge_file(
input: meson.project_name() + '.appdata.xml.in',
output: meson.project_name() + '.appdata.xml',
po_dir: join_paths(meson.source_root(), 'po', 'extra'),
# Translate and install our .appdata.xml file so AppCenter will see it
i18n.merge_file (
input: meson.project_name () + '.appdata.xml.in',
output: meson.project_name () + '.appdata.xml',
po_dir: join_paths (meson.source_root (), 'po', 'extra'),
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)

install_data(
meson.project_name() + '.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
install_dir: join_paths (get_option ('datadir'), 'metainfo')
)

install_data(
meson.project_name() + '.contract',
install_dir: join_paths(get_option('datadir'), 'contractor')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the contract install logic but keep the contract file?
I know the contract file will no longer work: elementary/contractor#34. Maybe we should just remove all the contract logic in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I'll add it back so it can be removed in another PR

# Install gschema
install_data (
meson.project_name () + '.gschema.xml',
install_dir: join_paths (get_option ('datadir'), 'glib-2.0', 'schemas')
)
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
69 changes: 36 additions & 33 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@
project(
# Project name, programming language and version
project (
'com.github.peteruithoven.resizer',
['vala', 'c'],
meson_version : '>= 0.47',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not define the min. required meson?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely should be defined!

Meson can refuse to run on older versions, while printing an informative error message telling you that your version of Meson is too old. Additionally, it also prints informative warnings when you use features too new for the minimum required version to handle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it back but even elementary apps does not include this. I assume developers should check that their development tools are up to date before trying to build the app. But I can add it back if you prefer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make life harder, when you could make life easier instead? :)

license: 'GPL-3.0+'
'c', 'vala',
version: '1.0.1'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to limit the amount of places where the version is defined, to ideally nowhere but the tag. Is this really useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know but elementary does in their app as well as many other developers so.

)

i18n = import('i18n')
# Translation module
i18n = import ('i18n')

add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
# Project arguments
add_project_arguments (
'-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name ()),
language: 'c'
)

# Config file
conf_data = configuration_data ()

conf_data.set_quoted ('PROJECT_NAME', meson.project_name ())

# Create config.vala from config.vala.in,
# replacing variables like PROJECT_NAME
conf_data = configuration_data()
conf_data.set_quoted('PROJECT_NAME', meson.project_name())
config_file = configure_file(
input : 'src/config.vala.in',
output : 'config.vala',
config_file = configure_file (
input : 'src/Config.vala.in',
output : 'Config.vala',
configuration : conf_data
)

meson.build_root()

executable(
meson.project_name(),
'src/Application.vala',
'src/HeaderBar.vala',
'src/Window.vala',
'src/ResizePage.vala',
'src/ResizingPage.vala',
'src/Resizer.vala',
'src/DropArea.vala',
'src/MessageCenter.vala',
# Listing dependencies
dependencies = [
dependency ('gtk+-3.0'),
dependency ('granite'),
dependency ('libhandy-1')
]

subdir ('src')

# Defining executable
executable (
meson.project_name (),
sources,
config_file,
dependencies: [
dependency('gtk+-3.0'),
dependency('granite'),
dependency('libhandy-1', version: '>=1.0.0')
],
install : true
dependencies: dependencies,
install: true
)

meson.add_install_script('meson/post_install.py')

subdir('data')
subdir('po')

meson.add_install_script('meson/post_install.py')
Loading