diff options
Diffstat (limited to 'src/main.vala')
-rw-r--r-- | src/main.vala | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/main.vala b/src/main.vala index 0755f62..d09c827 100644 --- a/src/main.vala +++ b/src/main.vala @@ -117,6 +117,8 @@ void library_exec(string[] mounts) { ThumbnailCache.init(); Tombstone.init(); + + LibraryFiles.select_copy_function(); if (aggregate_monitor != null) aggregate_monitor.next_step("LibraryPhoto.init"); @@ -216,7 +218,7 @@ public void run_system_pictures_import(ImportManifest? external_exclusion_manife return; Gee.ArrayList<FileImportJob> jobs = new Gee.ArrayList<FileImportJob>(); - jobs.add(new FileImportJob(AppDirs.get_import_dir(), false)); + jobs.add(new FileImportJob(AppDirs.get_import_dir(), false, true)); LibraryWindow library_window = (LibraryWindow) AppWindow.get_instance(); @@ -240,7 +242,7 @@ private void report_system_pictures_import(ImportManifest manifest, BatchImportR ImportUI.report_manifest(manifest, true); } -void editing_exec(string filename) { +void editing_exec(string filename, bool fullscreen) { File initial_file = File.new_for_commandline_arg(filename); // preconfigure units @@ -267,9 +269,16 @@ void editing_exec(string filename) { direct_window.show_all(); debug("%lf seconds to Gtk.main()", startup_timer.elapsed()); + + if (fullscreen) { + var action = direct_window.get_common_action("CommonFullscreen"); + if (action != null) { + action.activate(null); + } + } Application.get_instance().start(); - + DesktopIntegration.terminate(); // terminate units for direct-edit mode @@ -282,6 +291,7 @@ bool no_startup_progress = false; string data_dir = null; bool show_version = false; bool no_runtime_monitoring = false; +bool fullscreen = false; private OptionEntry[]? entries = null; @@ -304,6 +314,10 @@ public OptionEntry[] get_options() { OptionEntry version = { "version", 'V', 0, OptionArg.NONE, &show_version, _("Show the application’s version"), null }; entries += version; + + OptionEntry fullscreen = { "fullscreen", 'f', 0, OptionArg.NONE, + &fullscreen, _("Start the application in fullscreen mode"), null }; + entries += fullscreen; OptionEntry terminator = { null, 0, 0, 0, null, null, null }; entries += terminator; @@ -333,7 +347,7 @@ void main(string[] args) { // the build directory. this allows us to access local GSettings schemas without having to // muck with the user's XDG_... directories, which is seriously frowned upon if (AppDirs.get_install_dir() == null) { - GLib.Environment.set_variable("GSETTINGS_SCHEMA_DIR", AppDirs.get_exec_dir().get_path() + + GLib.Environment.set_variable("GSETTINGS_SCHEMA_DIR", AppDirs.get_lib_dir().get_path() + "/misc", true); } @@ -426,7 +440,7 @@ void main(string[] args) { if (is_string_empty(filename)) library_exec(mounts); else - editing_exec(filename); + editing_exec(filename, CommandlineOptions.fullscreen); // terminate mode-inspecific modules Resources.terminate(); |