From 1eb0517fd430968178d4183686468963a71fed41 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 16 Aug 2015 10:20:23 +0200 Subject: [PATCH] Now tries to figure out which files should be open in the various juci applications started when more than one directory is opened. --- src/juci.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/juci.cc b/src/juci.cc index ee3bc1b..68623ea 100644 --- a/src/juci.cc +++ b/src/juci.cc @@ -49,15 +49,23 @@ void app::on_activate() { first_directory=false; } else { - std::thread another_juci_app([this, directory](){ - Singleton::terminal()->async_print("Executing: juci "+directory); - Singleton::terminal()->execute("juci "+directory, ""); + std::string files_in_directory; + for(size_t c=0;casync_print("Executing: juci "+directory+files_in_directory); + Singleton::terminal()->execute("juci "+directory+files_in_directory, ""); //TODO: do not open pipes here, doing this after Juci compiles on Windows }); another_juci_app.detach(); } } - for(auto &f: files) - window->notebook.open(f); + for(auto &file: files) + window->notebook.open(file); } app::app() : Gtk::Application("no.sout.juci", Gio::APPLICATION_NON_UNIQUE | Gio::APPLICATION_HANDLES_COMMAND_LINE) {