diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:15:16 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:15:16 +0200 |
commit | bd6336c629841c6db3a6ca53a936d629d34db53b (patch) | |
tree | 3721ef997864108df175ce677a8a7d4342a6f1d2 /ui/switch_to_gui.h | |
parent | 4.0 (diff) | |
download | FreeFileSync-bd6336c629841c6db3a6ca53a936d629d34db53b.tar.gz FreeFileSync-bd6336c629841c6db3a6ca53a936d629d34db53b.tar.bz2 FreeFileSync-bd6336c629841c6db3a6ca53a936d629d34db53b.zip |
4.1
Diffstat (limited to 'ui/switch_to_gui.h')
-rw-r--r-- | ui/switch_to_gui.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/ui/switch_to_gui.h b/ui/switch_to_gui.h index cbbff20c..70ef90d3 100644 --- a/ui/switch_to_gui.h +++ b/ui/switch_to_gui.h @@ -7,22 +7,35 @@ #ifndef SWITCHTOGUI_H_INCLUDED #define SWITCHTOGUI_H_INCLUDED -#include "../library/process_xml.h" - +#include "../lib/process_xml.h" +#include "main_dlg.h" //in "application.cpp" we have this dependency anyway! namespace zen { - //switch from FreeFileSync Batch to GUI modus: opens a new FreeFileSync GUI session asynchronously class SwitchToGui { public: - SwitchToGui(const xmlAccess::XmlBatchConfig& batchCfg, xmlAccess::XmlGlobalSettings& globalSettings); //prepare - void execute() const; //throw() + SwitchToGui(const wxString& referenceFile, + const xmlAccess::XmlBatchConfig& batchCfg, + xmlAccess::XmlGlobalSettings& globalSettings) : + guiCfg(xmlAccess::convertBatchToGui(batchCfg)), + globalSettings_(globalSettings) + { + referenceFiles.push_back(referenceFile); + } + + void execute() const + { + + MainDialog* frame = new MainDialog(referenceFiles, guiCfg, globalSettings_, true); //toplevel window + frame->Show(); + } private: - xmlAccess::XmlGlobalSettings& globalSettings_; + std::vector<wxString> referenceFiles; const xmlAccess::XmlGuiConfig guiCfg; + xmlAccess::XmlGlobalSettings& globalSettings_; }; } |