summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPeteHemery <[email protected]>2025-06-20 08:03:56 +0100
committerGitHub <[email protected]>2025-06-20 07:03:56 +0000
commitbe3bbcc4144c69d0f65ab07aeb3e4e69e74d12a9 (patch)
treebb75c214c099c8e601ad080d4ab9efe4d83c7bec /src/main.c
parent891c063168f0d794228fd8069deca1f513453c4f (diff)
downloadeom-be3bbcc4144c69d0f65ab07aeb3e4e69e74d12a9.tar.bz2
eom-be3bbcc4144c69d0f65ab07aeb3e4e69e74d12a9.tar.xz
Add 'preserve-order' flag to allow viewing order specified on cmd line (#354)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 1c4d725..94487d8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -52,6 +52,7 @@ static gboolean fullscreen = FALSE;
static gboolean slide_show = FALSE;
static gboolean disable_collection = FALSE;
static gboolean force_new_instance = FALSE;
+static gboolean preserve_order = FALSE;
static gchar **startup_files = NULL;
static gboolean
@@ -71,6 +72,7 @@ static const GOptionEntry goption_options[] =
{ "disable-image-collection", 'c', 0, G_OPTION_ARG_NONE, &disable_collection, N_("Disable image collection"), NULL },
{ "slide-show", 's', 0, G_OPTION_ARG_NONE, &slide_show, N_("Open in slideshow mode"), NULL },
{ "new-instance", 'n', 0, G_OPTION_ARG_NONE, &force_new_instance, N_("Start a new instance instead of reusing an existing one"), NULL },
+ { "preserve-order", 'p', 0, G_OPTION_ARG_NONE, &preserve_order, N_("Preserve the input file order (disable default sorting)"), NULL },
{ "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
_print_version_and_exit, N_("Show the application's version"), NULL},
{ NULL }
@@ -87,6 +89,9 @@ set_startup_flags (void)
if (slide_show)
flags |= EOM_STARTUP_SLIDE_SHOW;
+
+ if (preserve_order)
+ flags |= EOM_STARTUP_PRESERVE_ORDER;
}
int