summaryrefslogtreecommitdiffstats
path: root/src/inkview.cpp
diff options
context:
space:
mode:
authorhellozee <hellozee@disroot.org>2018-03-06 12:22:22 +0000
committerhellozee <hellozee@disroot.org>2018-03-06 12:22:22 +0000
commita65c02c515528168aec0c5a092078117de02b0a9 (patch)
treec80b1ead2a302de453ab901af79b4740947122f1 /src/inkview.cpp
parentFix for Bug #1643260, Step size changed to 0.1% for Blur and Opacity Spin But... (diff)
parentRemove unused includes, etc. (diff)
downloadinkscape-a65c02c515528168aec0c5a092078117de02b0a9.tar.gz
inkscape-a65c02c515528168aec0c5a092078117de02b0a9.zip
Merge remote-tracking branch 'remote/master'
Diffstat (limited to 'src/inkview.cpp')
-rw-r--r--src/inkview.cpp65
1 files changed, 1 insertions, 64 deletions
diff --git a/src/inkview.cpp b/src/inkview.cpp
index 5b27e9168..f3e5ccdfc 100644
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
@@ -33,7 +33,6 @@
#include <libxml/tree.h>
-#include <glibmm.h>
#include <glibmm/i18n.h>
#include "document.h"
@@ -45,69 +44,7 @@
#include "inkgc/gc-core.h"
#include "io/sys.h"
#include "svg-view-slideshow.h"
-
-
-
-
-
-/**
- * \brief Set of command-line options for Inkview
- */
-class InkviewOptionsGroup : public Glib::OptionGroup
-{
-public:
- // list of all input filenames;
- // this list contains all arguments that are not recognized as an option (so needs to be checked)
- Glib::OptionGroup::vecustrings filenames;
-
- bool fullscreen = false; // whether to launch in fullscreen mode
- bool recursive = false; // whether to search folders for SVG files recursively
- int timer = 0; // time (in seconds) after which the next image of the slideshow is automatically loaded
- double scale = 1; // scale factor for images
- // (currently only applied to the first image - others are resized to window dimensions)
-
- InkviewOptionsGroup() : Glib::OptionGroup(N_("Inkscape Options"),
- N_("Default program options"))
- {
- // Entry for the "fullscreen" option
- Glib::OptionEntry entry_fullscreen;
- entry_fullscreen.set_short_name('f');
- entry_fullscreen.set_long_name("fullscreen");
- entry_fullscreen.set_description(N_("Launch in fullscreen mode"));
- add_entry(entry_fullscreen, fullscreen);
-
- // Entry for the "recursive" option
- Glib::OptionEntry entry_recursive;
- entry_recursive.set_short_name('r');
- entry_recursive.set_long_name("recursive");
- entry_recursive.set_description(N_("Search folders recursively"));
- add_entry(entry_recursive, recursive);
-
- // Entry for the "timer" option
- Glib::OptionEntry entry_timer;
- entry_timer.set_short_name('t');
- entry_timer.set_long_name("timer");
- entry_timer.set_arg_description(N_("NUM"));
- entry_timer.set_description(N_("Change image every NUM seconds"));
- add_entry(entry_timer, timer);
-
- // Entry for the "scale" option
- Glib::OptionEntry entry_scale;
- entry_scale.set_short_name('s');
- entry_scale.set_long_name("scale");
- entry_scale.set_arg_description(N_("NUM"));
- entry_scale.set_description(N_("Scale image by factor NUM"));
- add_entry(entry_scale, scale);
-
- // Entry for the remaining non-option arguments
- Glib::OptionEntry entry_args;
- entry_args.set_long_name(G_OPTION_REMAINING);
- entry_args.set_arg_description(N_("FILES/FOLDERS…"));
-
- add_entry(entry_args, filenames);
- }
-};
-
+#include "inkview-options-group.h"
/** get a list of valid SVG files from a list of strings */
std::vector<Glib::ustring> get_valid_files(std::vector<Glib::ustring> filenames, bool recursive = false, bool first_iteration = false)