Commits

Leyorus committed 9c33677

Add verbosity option for commandline output

Comments (0)

Files changed (2)

src/gtk-gui/MainWindow.cpp

 			extractOrPauseButton(extractButtonText),
 			cancelButton(Gtk::Stock::CANCEL),
 			labelBox(true),
-			labelTable(1,2,true)
+			labelTable(1,2,true),
+			verbose(true)
 {
     /* force using icons on stock buttons: */
     showIconOnButton();
 
 	} else { // parent process
 		setExtractionStatus(MainWindow::extracting_status);
-		std::cout << _("Command line used for extraction:") << std::endl;
-		std::cout << Core::MkvExtractor::getExtractCommandLine(getInputFileName(), toExtract) << std::endl;
+		if (verbose) {
+			std::cout << _("Command line used for extraction:") << std::endl;
+			std::cout << Core::MkvExtractor::getExtractCommandLine(getInputFileName(), toExtract) << std::endl << std::endl;
+		}
 
 		std::string str;
 		while (getLine(master, str)) {
 			if (ret > 0) {
 				setProgressPercentage(progress);
 			}
-			std::cout << str;
+			if (verbose) {
+				std::cout << str;
+			}
 
 		}
 		setExtractionStatus(MainWindow::stop_status);

src/gtk-gui/MainWindow.h

 	int remainingTime;
 	timeval lastStartTime;
 	sigc::connection con;
+	bool verbose;
 
 	void showIconOnButton();
     void startExtraction();