muriloventuroso / pdftricks

A simple, efficient application for small manipulations in PDF files using Ghostscript.
90 stars 14 forks source link

Default save location of compressed pdf to same as the original #54

Closed FreaxMATE closed 3 years ago

FreaxMATE commented 3 years ago

When compressing a pdf most users want the compressed pdf to be saved in the same directory. Before this PR the root directory was always set as default by the filechooser after selecting the compress button. However instead of being forced to always click through your whole filesystem tree to the original location it is now set by default.

Before: always_root_dir After:

use_current_dir

This was done by parsing the directory name instead of the filename filename to the set_current_folder function (https://valadoc.org/gtk+-3.0/Gtk.FileChooser.set_current_folder.html) using the get_dirname function (https://valadoc.org/glib-2.0/GLib.Path.get_dirname.html)

muriloventuroso commented 3 years ago

Thanks!