Rewrite of main.cpp using InkscapeApplication (Gtk::Application)
- Use Gio::File for accessing files.
- Use Gio options to handle command line arguments.
- Use Gio::Actions for some command line arguments.
- Move file export code to src/io/file-export-cmd.h/.cpp. Make into class.
Reimplementation of main.cpp using latest Gtk3 technology, reducing line count by 50%.
Internally:
- Replace main.cpp by Inkscape::Application (Gio::Application). This allows us to use application wide Gio::Actions.
- Use Gio::File to access files.
- Use Gio options for command line arguments.
- Moved file export code to src/io/file-export-cmd.h/cpp
User changes:
-
--verbs
: Verbs must be listed together:--verb="ObjectFlipVertically,FileSave,FileClose"
This is a limit from using Gio options. -
In export mode, to overwrite a file, one must use --export-overwrite, otherwise a new filename will be generated: file.svg -> file_out.svg
-
--export-id
takes a semi-colon separated list of object id's. Each object will be exported separately. -
--export-png
,--export-ps
,--export-eps
,--export-pdf
,--export-emf
,--export-wmf
,--export-xaml
: Replaced by either:
-
--output-file=MyOutput.xxx
to export a single file of type xxx. -
--output-type="xxx"
to batch export a list of input files to type xxx.
-
If multiple files are listed in command line, they will be batch processed.
-
--query-id
: can have a comma separated list of id's which will produce a comma separated list of values. -
--actions
: A list of semi-colon separated actions with optional arguments (separated by a colon). At the moment only a few actions are supported. Eventually all verbs will be replaced by actions.
Missing:
-
--print
Not implemented (broken in 0.92 and trunk) - Xaml Not tested
- DBus Not tested (note Gio::Actions have an automatic DBus binding).
- Console mode not implemented.