diff options
author | PeteHemery <[email protected]> | 2025-06-20 08:03:56 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2025-06-20 07:03:56 +0000 |
commit | be3bbcc4144c69d0f65ab07aeb3e4e69e74d12a9 (patch) | |
tree | bb75c214c099c8e601ad080d4ab9efe4d83c7bec /src/main.c | |
parent | 891c063168f0d794228fd8069deca1f513453c4f (diff) | |
download | eom-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |