From 6095be64a11b57e137686c77768587bba82b00b4 Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 27 Jun 2016 13:41:09 +0200 Subject: [PATCH] Added option to turn off terminal progress, for instance when opening c/c++ files --- src/config.cc | 2 ++ src/config.h | 1 + src/files.h | 5 +++-- src/terminal.cc | 5 ++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/config.cc b/src/config.cc index 53dbab9..de29e32 100644 --- a/src/config.cc +++ b/src/config.cc @@ -98,6 +98,8 @@ void Config::retrieve_config() { terminal.history_size=cfg.get("terminal.history_size"); terminal.font=cfg.get("terminal.font"); + terminal.show_progress=cfg.get("terminal.show_progress"); + terminal.clang_format_command="clang-format"; #ifdef __linux if(terminal.clang_format_command=="clang-format" && diff --git a/src/config.h b/src/config.h index 031c564..fadd8b7 100644 --- a/src/config.h +++ b/src/config.h @@ -27,6 +27,7 @@ public: std::string clang_format_command; int history_size; std::string font; + bool show_progress; #ifdef _WIN32 boost::filesystem::path msys2_mingw_path; diff --git a/src/files.h b/src/files.h index c51ff4d..eebf5c5 100644 --- a/src/files.h +++ b/src/files.h @@ -2,7 +2,7 @@ #define JUCI_FILES_H_ #include -#define JUCI_VERSION "1.2.0-rc4" +#define JUCI_VERSION "1.2.0-rc5" const std::string default_config_file = R"RAW({ "version": ")RAW"+std::string(JUCI_VERSION)+R"RAW(", @@ -19,7 +19,8 @@ const std::string default_config_file = R"RAW({ "terminal": { "history_size": 1000, "font_comment": "Use \"\" to use source.font with slightly smaller size", - "font": "" + "font": "", + "show_progress": true }, "source": { "style_comment": "Use \"\" for default style, and for instance juci-dark or juci-dark-blue together with dark gtk_theme variant. Styles from normal gtksourceview install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango", diff --git a/src/terminal.cc b/src/terminal.cc index 38d04e0..6c63554 100644 --- a/src/terminal.cc +++ b/src/terminal.cc @@ -6,7 +6,10 @@ #include Terminal::InProgress::InProgress(const std::string& start_msg): stop(false) { - start(start_msg); + if(Config::get().terminal.show_progress) + start(start_msg); + else + stop=true; } Terminal::InProgress::~InProgress() {