Commits

Leyorus  committed e4861d1

refactor and clean code

  • Participants
  • Parent commits e7aa2f0
  • Tags v0.8

Comments (0)

Files changed (9)

File src/core/Common.cpp

+/*
+===========================================================================
+
+mkvextract-gtk
+Copyright (C) 2011 Leyorus <leyorus@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see  <http://www.gnu.org/licenses/>.
+===========================================================================
+*/
+
+#include "Common.h"
+#include <sstream>
+
+namespace Core {
+
+std::string toString(int number) {
+   std::stringstream ss;
+   ss << number;
+   return ss.str();
+}
+
+int toInteger(const std::string &str) {
+	std::stringstream ss(str);
+	int n;
+	ss >> n;
+	return n;
+}
+
+}

File src/core/Common.h

+/*
+===========================================================================
+
+mkvextract-gtk
+Copyright (C) 2011 Leyorus <leyorus@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see  <http://www.gnu.org/licenses/>.
+===========================================================================
+*/
+
+#ifndef COMMON_H_
+#define COMMON_H_
+
+#include <string>
+
+namespace Core {
+
+	typedef struct track_info_t{
+		std::string num;
+		std::string type;
+		std::string codec;
+		std::string language;
+		track_info_t() {
+			num = "0";
+			type = "unknown";
+			codec = "unknown";
+			language = "unknown";
+		}
+	}track_info_t;
+
+
+	std::string toString(int number);
+	int toInteger(const std::string &str);
+
+}
+
+
+#endif /* COMMON_H_ */

File src/core/MkvExtractor.cpp

 #include "MkvExtractor.h"
 
 #include <iostream>
-#include <sstream>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
 #include <map>
 
+#include "Common.h"
+#include "MkvInfoParser.h"
 
-MkvExtractor::MkvExtractor(std::string filePath) {
-	this->filePath = filePath;
-	this->fileExtensionsMap = createFileExtensionsMap();
-    std::string mkvinfo_out = getRawMkvInfo(filePath);
-	this->tracks_infos = parseTracksInfos(mkvinfo_out);
-}
 
-std::map<std::string, std::string> MkvExtractor::createFileExtensionsMap() {
+namespace Core {
+
+const std::map<std::string, std::string> MkvExtractor::createFileExtensionsMap() {
 	std::map<std::string, std::string> m;
 	m["V_MPEG1"] = "mpg";
 	m["A_AAC"] = "aac";
 	return m;
 }
 
-const std::string TRACK_STRING = "A track";
-const std::string CODEC_ID_STRING = "Codec ID: ";
-const std::string TRACK_TYPE_STRING = "Track type: ";
-const std::string TRACK_NUMBER_STRING = "Track number: ";
-const std::string LANGUAGE_STRING = "Language: ";
-
-std::string toString(int number) {
-   std::stringstream ss;
-   ss << number;
-   return ss.str();
-}
-
-int toInteger(const std::string &str) {
-	std::stringstream ss(str);
-	int n;
-	ss >> n;
-	return n;
-}
-
-std::string MkvExtractor::exec(std::string cmd) {
-    FILE* pipe = popen(cmd.c_str(), "r");
-    if (!pipe) return "ERROR";
-    char buffer[128];
-    std::string result = "";
-    while(!feof(pipe)) {
-        if(fgets(buffer, 128, pipe) != NULL)
-                result += buffer;
-    }
-    pclose(pipe);
-    return result;
-}
-
-std::string MkvExtractor::substring_toend(std::string& s, int from) {
-	int end_of_line = s.find("\n", from);
-	return s.substr(from, end_of_line - from);
-}
-
-std::string MkvExtractor::parse(std::string& s, unsigned int track_number, std::string key) {
-	unsigned int current_track_number = 0;
-	size_t current_track_pos = 0;
-	size_t key_pos;
-
-	//looking for asked track position
-	do {
-		current_track_pos = s.find(TRACK_NUMBER_STRING, current_track_pos) + TRACK_NUMBER_STRING.size();
-		if (current_track_pos != std::string::npos) {
-			current_track_number = toInteger(substring_toend(s, current_track_pos));
-		} else {
-			return "unknown";
-		}
-	} while (current_track_number != track_number);
-
-	// looking for the next track (if there is any)
-	size_t next_track_pos = s.find(TRACK_NUMBER_STRING, current_track_pos);
-
-	if (next_track_pos != std::string::npos) {
-		key_pos = s.find(key, current_track_pos) + key.size();
-		if (key_pos != std::string::npos) {
-			if (key_pos < next_track_pos) {
-				return substring_toend(s, key_pos);
-			} else {
-				return "unknown";
-			}
-		} else {
-			return "keypos >= next_track_pos";
-		}
-	} else {
-		key_pos = s.find(key, current_track_pos) + key.size();
-		return substring_toend(s, key_pos);
-	}
-	return "unknown";
-}
-
-int extractNumberOfTracks(std::string raw_infos) {
-	unsigned int numberOfTracks = 0;
-	size_t found = raw_infos.find(TRACK_STRING, 0) + TRACK_STRING.size();
-    while(found != std::string::npos){
-        numberOfTracks++;
-        found = raw_infos.find(TRACK_STRING, found + 1);
-    }
-    return numberOfTracks;
-}
-
-std::vector<std::string> MkvExtractor::makeExtractCommandLine(std::map<int, std::string> tracks_to_extract, bool usable) {
+std::vector<std::string> MkvExtractor::makeExtractCommandLine(std::string inputFilePath, std::map<int, std::string> tracks_to_extract, bool usable) {
 	std::vector<std::string> ret;
 	ret.push_back("mkvextract");
 	ret.push_back("tracks");
 	if(usable) {
-		ret.push_back("\"" + filePath + "\"");
+		ret.push_back("\"" + inputFilePath + "\"");
 	    for(std::map<int, std::string>::iterator i = tracks_to_extract.begin(); i != tracks_to_extract.end();i++){
 	        ret.push_back(toString(i->first) + ":" + "\""+ i->second + "\"");
 	    }
 	} else {
-		ret.push_back(filePath);
+		ret.push_back(inputFilePath);
 	    for(std::map<int, std::string>::iterator i = tracks_to_extract.begin(); i != tracks_to_extract.end();i++){
 	        ret.push_back(toString(i->first) + ":" + i->second);
 	    }
     return ret;
 }
 
-std::string MkvExtractor::getExtractCommandLine(std::map<int, std::string> tracks_to_extract) {
-	std::vector<std::string> cmd = makeExtractCommandLine(tracks_to_extract, true);
+std::string MkvExtractor::getExtractCommandLine(std::string inputFilePath, std::map<int, std::string> tracks_to_extract) {
+	std::vector<std::string> cmd = makeExtractCommandLine(inputFilePath, tracks_to_extract, true);
 	std::string ret = "";
 
 	for (int i=0; i < (cmd.size()-1) ; i++) {
 	return ret;
 }
 
-
-std::vector<track_info_t> MkvExtractor::parseTracksInfos(std::string raw_infos) {
-	std::vector<track_info_t> tracks;
-
-    for (int track_number=1; track_number<= extractNumberOfTracks(raw_infos); track_number++) {
-        track_info_t track;
-        track.num = toString(track_number);
-        track.type = parse(raw_infos, track_number, TRACK_TYPE_STRING);
-        track.codec = parse(raw_infos, track_number, CODEC_ID_STRING);
-        track.language = parse(raw_infos, track_number, LANGUAGE_STRING);
-        tracks.push_back(track);
-    }
-    return tracks;
-}
-
 std::string MkvExtractor::getDefaultFileName (track_info_t info){
 	std::string ret = "Track" + info.num;
 	ret+= "_" + info.type;
 	if (info.language.size() != 0)
 		ret += "_" + info.language;
-	ret += getDefaultFileNameExtension(info);
+	std::string extension = getDefaultFileNameExtension(info);
+	if (extension.size() !=0){
+		ret += "." + extension;
+	}
 	return ret;
 }
 
 std::string MkvExtractor::getDefaultFileNameExtension(track_info_t info) {
 	std::map<std::string, std::string>::iterator it;
-	it = this->fileExtensionsMap.find(info.codec);
-	if (it != this->fileExtensionsMap.end()) {
-		return "." + it->second;
+	std::map<std::string, std::string> extensions = createFileExtensionsMap();
+	it = extensions.find(info.codec);
+	if (it != extensions.end()) {
+		return it->second;
 	} else {
 		return "";
 	}
 }
 
-void MkvExtractor::extractTracks(const std::map<int, std::string> tracks_to_extract) {
+void MkvExtractor::extractTracks(std::string inputFilePath, const std::map<int, std::string> tracks_to_extract) {
 	if (tracks_to_extract.size() != 0) {
-		std::vector<std::string> cmdline = makeExtractCommandLine(tracks_to_extract, false);
+		std::vector<std::string> cmdline = makeExtractCommandLine(inputFilePath, tracks_to_extract, false);
 
 	    int i;
 	    char **argv = new char*[tracks_to_extract.size()+1];
 	    delete[] argv;
 
 	} else { // No track to extract
-//		std::cout << "No track to extract" << std::endl;
 	}
 }
 
-std::string MkvExtractor::getRawMkvInfo(std::string filePath) {
-	std::string cmdline("mkvinfo \"" + filePath + "\"");
-	return exec(cmdline.c_str());
 }
-
-int MkvExtractor::getNumberOfTracks(std::string raw_infos) {
-    return extractNumberOfTracks(raw_infos);
-}
-

File src/core/MkvExtractor.h

 ===========================================================================
 */
 
+#ifndef DEF_MKVINFOEXTRACTOR
+#define DEF_MKVINFOEXTRACTOR
+
 #include <vector>
 #include <string>
 #include <map>
+#include "Common.h"
 
-
-typedef struct track_info_t{
-	std::string num;
-	std::string type;
-	std::string codec;
-	std::string language;
-	track_info_t() {
-		num = "0";
-		type = "unknown";
-		codec = "unknown";
-		language = "unknown";
-	}
-}track_info_t;
-
+namespace Core {
 
 class MkvExtractor {
 public:
-	MkvExtractor(){};
-	MkvExtractor(std::string filePath);
-	std::vector<track_info_t> getTracksInfos() {
-		return tracks_infos;
-	}
-	void extractTracks(const std::map<int, std::string> tracks_to_extract);
-	std::string getExtractCommandLine(std::map<int, std::string> tracks_to_extract);
-	std::string getDefaultFileName (track_info_t info);
+	static void extractTracks(std::string inputFilePath, const std::map<int, std::string> tracks_to_extract);
+	static std::string getExtractCommandLine(std::string inputFilePath, std::map<int, std::string> tracks_to_extract);
+	static std::string getDefaultFileName (track_info_t info);
 
 private:
-	std::string filePath;
-	std::vector<track_info_t> tracks_infos;
-	std::string getRawMkvInfo(std::string filePath);
-	int getNumberOfTracks(std::string raw_infos);
-	std::vector<track_info_t> parseTracksInfos(std::string raw_infos);
-	std::vector<std::string> makeExtractCommandLine(std::map<int, std::string> tracks_to_extract, bool usable);
-	std::map<std::string, std::string> fileExtensionsMap;
-	static std::map<std::string, std::string> createFileExtensionsMap();
-	std::string getDefaultFileNameExtension(track_info_t info);
-
-	static std::string substring_toend(std::string& s, int n_pos);
-	static std::string parse(std::string& s, unsigned int track_number, std::string key);
-	std::string exec(std::string cmd);
+	static std::vector<std::string> makeExtractCommandLine(std::string inputFilePath, std::map<int, std::string> tracks_to_extract, bool usable);
+	const static std::map<std::string, std::string> createFileExtensionsMap();
+	static std::string getDefaultFileNameExtension(track_info_t info);
 };
 
-std::string toString(int number);
-int toInteger(const std::string &str);
-
+}
+#endif
 

File src/core/MkvInfoParser.cpp

+/*
+===========================================================================
+
+mkvextract-gtk
+Copyright (C) 2011 Leyorus <leyorus@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see  <http://www.gnu.org/licenses/>.
+===========================================================================
+*/
+
+#include "MkvInfoParser.h"
+#include "Common.h"
+#include <stdio.h>
+
+namespace Core {
+
+const std::string TRACK_STRING = "A track";
+const std::string CODEC_ID_STRING = "Codec ID: ";
+const std::string TRACK_TYPE_STRING = "Track type: ";
+const std::string TRACK_NUMBER_STRING = "Track number: ";
+const std::string LANGUAGE_STRING = "Language: ";
+
+std::string exec(std::string cmd) {
+    FILE* pipe = popen(cmd.c_str(), "r");
+    if (!pipe) return "ERROR";
+    char buffer[128];
+    std::string result = "";
+    while(!feof(pipe)) {
+        if(fgets(buffer, 128, pipe) != NULL)
+                result += buffer;
+    }
+    pclose(pipe);
+    return result;
+}
+
+std::string MkvInfoParser::getRawMkvInfo(std::string filePath) {
+	std::string cmdline("mkvinfo \"" + filePath + "\"");
+	return exec(cmdline.c_str());
+}
+
+
+std::string substring_toend(std::string& s, int from) {
+	int end_of_line = s.find("\n", from);
+	return s.substr(from, end_of_line - from);
+}
+
+std::string parse(std::string& s, unsigned int track_number, std::string key) {
+	unsigned int current_track_number = 0;
+	size_t current_track_pos = 0;
+	size_t key_pos;
+
+	//looking for asked track position
+	do {
+		current_track_pos = s.find(TRACK_NUMBER_STRING, current_track_pos) + TRACK_NUMBER_STRING.size();
+		if (current_track_pos != std::string::npos) {
+			current_track_number = toInteger(substring_toend(s, current_track_pos));
+		} else {
+			return "unknown";
+		}
+	} while (current_track_number != track_number);
+
+	// looking for the next track (if there is any)
+	size_t next_track_pos = s.find(TRACK_NUMBER_STRING, current_track_pos);
+
+	if (next_track_pos != std::string::npos) {
+		key_pos = s.find(key, current_track_pos) + key.size();
+		if (key_pos != std::string::npos) {
+			if (key_pos < next_track_pos) {
+				return substring_toend(s, key_pos);
+			} else {
+				return "unknown";
+			}
+		} else {
+			return "keypos >= next_track_pos";
+		}
+	} else {
+		key_pos = s.find(key, current_track_pos) + key.size();
+		return substring_toend(s, key_pos);
+	}
+	return "unknown";
+}
+
+int extractNumberOfTracks(std::string raw_infos) {
+	unsigned int numberOfTracks = 0;
+	size_t found = raw_infos.find(TRACK_STRING, 0) + TRACK_STRING.size();
+    while(found != std::string::npos){
+        numberOfTracks++;
+        found = raw_infos.find(TRACK_STRING, found + 1);
+    }
+    return numberOfTracks;
+}
+
+std::vector<track_info_t> MkvInfoParser::parseTracksInfos(std::string mkvFileName) {
+	std::string raw_infos = getRawMkvInfo(mkvFileName);
+	std::vector<track_info_t> tracks;
+
+    for (int track_number=1; track_number<= extractNumberOfTracks(raw_infos); track_number++) {
+        track_info_t track;
+        track.num = toString(track_number);
+        track.type = parse(raw_infos, track_number, TRACK_TYPE_STRING);
+        track.codec = parse(raw_infos, track_number, CODEC_ID_STRING);
+        track.language = parse(raw_infos, track_number, LANGUAGE_STRING);
+        tracks.push_back(track);
+    }
+    return tracks;
+}
+
+}

File src/core/MkvInfoParser.h

+/*
+===========================================================================
+
+mkvextract-gtk
+Copyright (C) 2011 Leyorus <leyorus@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see  <http://www.gnu.org/licenses/>.
+===========================================================================
+*/
+
+#ifndef DEF_MKVINFOPARSER
+#define DEF_MKVINFOPARSER
+
+#include <vector>
+#include <string>
+#include <map>
+#include "Common.h"
+
+namespace Core {
+class MkvInfoParser {
+public:
+	static std::vector<track_info_t> parseTracksInfos(std::string mkvFileName);
+private:
+	static std::string getRawMkvInfo(std::string filePath);
+};
+
+}
+#endif
+

File src/gui/MainWindow.cpp

 */
 
 #include "MainWindow.h"
+#include "MkvInfoParser.h"
+#include "MkvExtractor.h"
+
 #include <iostream>
 #include <sstream>
 #include <pthread.h>
 			inputFileButton(Gtk::FILE_CHOOSER_ACTION_OPEN),
 			outputFrame("Output folder"),
 			outputFileButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER),
-			contentFrame(""),
+			contentFrame("Content"),
 			extractOrPauseButton("Extract"),
 			cancelButton(Gtk::Stock::CANCEL)
 {
 	mkvFileNameFilter.set_name("MKV Files");
 	mkvFileNameFilter.add_mime_type("video/x-matroska");
 	inputFileButton.add_filter(mkvFileNameFilter);
-	inputFileButton.signal_file_set().connect(sigc::mem_fun(this, &MainWindow::fileSet));
+	inputFileButton.signal_file_set().connect(sigc::mem_fun(this, &MainWindow::onFileSet));
 
 	outputFrame.add(outputFileButton);
 	mainVBox.pack_start(outputFrame, Gtk::PACK_SHRINK);
 
 	current_state = stop_status;
 	pthread_mutex_init(&extraction_status_mutex, 0);
-
-	fileChoosen = false;
-	trackSelected = false;
 }
 
-void MainWindow::printTracksInfos(std::vector<track_info_t> & tracks) {
+void MainWindow::printTracksInfos(std::vector<Core::track_info_t> tracks) {
 	refListStore->clear();
-    for(std::vector<track_info_t>::iterator i = tracks.begin();i != tracks.end();i++){
+    for(std::vector<Core::track_info_t>::iterator i = tracks.begin();i != tracks.end();i++){
     	Gtk::TreeModel::Row row = *(refListStore->append());
     	row[m_Columns.m_col_selected] = false;
-    	row[m_Columns.m_col_id] = toInteger(i->num);
+    	row[m_Columns.m_col_id] = Core::toInteger(i->num);
     	row[m_Columns.m_col_type] = i->type;
     	row[m_Columns.m_col_codec] = i->codec;
     	row[m_Columns.m_col_language] = i->language;
-    	row[m_Columns.m_col_outputFileName] = mkvExtractor.getDefaultFileName(*i);
-    	tracksToExtract[toInteger(i->num)] = false;
+    	row[m_Columns.m_col_outputFileName] = Core::MkvExtractor::getDefaultFileName(*i);
+    	tracksToExtract[Core::toInteger(i->num)] = false;
     }
 }
 
 	if (win->getExtractionProcessPID() == 0) { // child process
 		close(master);
 
-		win->getMkvExtractor().extractTracks(toExtract);
+		Core::MkvExtractor::extractTracks(win->getInputFileName(), toExtract);
 
 	} else { // parent process
 		win->setExtractionStatus(extracting_status);
 		std::cout << "Command line used : "<< std::endl;
 		std::cout << "-------------------- "<< std::endl;
-		std::cout << win->getMkvExtractor().getExtractCommandLine(toExtract) << std::endl;
+		std::cout << Core::MkvExtractor::getExtractCommandLine(win->getInputFileName(), toExtract) << std::endl;
 
 		std::string str;
 		while (getLine(master, str)) {
 	return 0;
 }
 
+std::string MainWindow::getInputFileName(){
+	return this->inputFileButton.get_filename();
+}
+
 std::string MainWindow::getFileName(int id) {
-	Gtk::TreeModel::Path path(toString(id-1));
+	Gtk::TreeModel::Path path(Core::toString(id-1));
 	Gtk::TreeModel::Row row = *(refListStore->get_iter(path));
 	std::string name;
 	row.get_value(5, name);
 
 void MainWindow::updateProgressBar() {
 	progressBar.set_fraction((double)progress_percentage / 100.0);
-	progressBar.set_text(toString(progress_percentage)+ "%");
+	progressBar.set_text(Core::toString(progress_percentage)+ "%");
 }
 
 void MainWindow::onExtractionEnd() {
 	extractOrPauseButton.set_image(*Gtk::manage (new Gtk::Image (Gtk::Stock::CONVERT, Gtk::ICON_SIZE_BUTTON)));
 	progress_percentage = 0;
 	progressBar.set_fraction((double)progress_percentage / 100.0);
-	progressBar.set_text(toString(progress_percentage)+ "%");
+	progressBar.set_text(Core::toString(progress_percentage)+ "%");
 }
 
 void MainWindow::onExtractOrPauseButton() {
 	return false;
 }
 
-void MainWindow::fileSet() {
-	fileChoosen = true;
-	trackSelected = false;
+void MainWindow::onFileSet() {
 
 	trackList.set_sensitive(true);
 
-	mkvExtractor = MkvExtractor(inputFileButton.get_filename());
-
 	tracksToExtract.clear();
-	tracks = mkvExtractor.getTracksInfos();
-	printTracksInfos(tracks);
+	printTracksInfos(Core::MkvInfoParser::parseTracksInfos(getInputFileName()));
 
-	outputFileButton.set_current_folder(dirName(inputFileButton.get_filename().c_str()));
+	outputFileButton.set_current_folder(dirName(getInputFileName()));
 }
 

File src/gui/MainWindow.h

 #include <gtkmm/progressbar.h>
 #include <gtkmm/buttonbox.h>
 
-#include <MkvExtractor.h>
+
+#include "Common.h"
 #include <string>
 #include <vector>
 #include <map>
 class MainWindow: public Gtk::Window {
 public:
 	MainWindow();
-	MkvExtractor getMkvExtractor(){ return this->mkvExtractor;}
 	std::map<int,bool> getUserSelection() {return this->tracksToExtract;}
 	bool isExtracting();
 	void setExtractionStatus(extraction_status_t newState);
 	void setExtractionProcessPID(int PID) { extractionProcess_pid = PID;};
 	int getExtractionProcessPID() { return extractionProcess_pid;};
-	std::vector<track_info_t> tracks;
+	std::string getInputFileName();
 	std::string getFileName(int id);
 	std::string getOutputFolder() { return outputFileButton.get_current_folder();};
 	bool onTimeOut();
 	Gtk::Button extractOrPauseButton;
 	Gtk::Button cancelButton;
 
-	MkvExtractor mkvExtractor;
 	std::map<int,bool> tracksToExtract;
 
 	extraction_status_t current_state;
-//	bool extracting;
+
 	pthread_mutex_t extraction_status_mutex;
 	pthread_t extraction_thread;
 	pid_t extractionProcess_pid;
 
-	bool fileChoosen;
-	bool trackSelected;
 	int progress_percentage;
 
 	void startExtraction();
 	void pauseExtraction();
 	void continueExtraction();
 	void enableTimer();
-    void fileSet();
-	void printTracksInfos(std::vector<track_info_t> & tracks);
+    void onFileSet();
+	void printTracksInfos(std::vector<Core::track_info_t> tracks);
 	void updateProgressBar();
 	void onExtractionEnd();
 	void onCheckboxClicked(Glib::ustring path);

File src/gui/mkvextract-gtk.cpp

     MainWindow window;
 	Glib::RefPtr<Gtk::Settings> settings = Gtk::Settings::get_default();
 	/* force using icons on stock buttons: */
-	settings->property_gtk_button_images() = true; ;
+	settings->property_gtk_button_images() = true;
 
     Gtk::Main::run(window);