diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
commit | c0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch) | |
tree | 4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /RealtimeSync/main_dlg.cpp | |
parent | 3.13 (diff) | |
download | FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2 FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip |
3.14
Diffstat (limited to 'RealtimeSync/main_dlg.cpp')
-rw-r--r-- | RealtimeSync/main_dlg.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp index d832b0aa..a1db4b74 100644 --- a/RealtimeSync/main_dlg.cpp +++ b/RealtimeSync/main_dlg.cpp @@ -22,11 +22,12 @@ #include "../shared/build_info.h" #include "../shared/help_provider.h" #include "../shared/util.h" +#include "../shared/mouse_move_dlg.h" using namespace ffs3; -MainDialog::MainDialog(wxDialog *dlg, const wxString& cfgFileName) +MainDialog::MainDialog(wxDialog* dlg, const wxString& cfgFileName) : MainDlgGenerated(dlg) { wxWindowUpdateLocker dummy(this); //avoid display distortion @@ -44,6 +45,13 @@ MainDialog::MainDialog(wxDialog *dlg, const wxString& cfgFileName) //prepare drag & drop dirNameFirst.reset(new ffs3::DirectoryName(m_panelMainFolder, m_dirPickerMain, m_txtCtrlDirectoryMain)); + +#ifdef FFS_WIN + new MouseMoveWindow(*this, //allow moving main dialog by clicking (nearly) anywhere... + m_panelMain); //ownership passed to "this" +#endif + + //--------------------------- load config values ------------------------------------ xmlAccess::XmlRealConfig newConfig; @@ -99,13 +107,13 @@ MainDialog::~MainDialog() } -void MainDialog::OnClose(wxCloseEvent &event) +void MainDialog::OnClose(wxCloseEvent& event) { Destroy(); } -void MainDialog::OnQuit(wxCommandEvent &event) +void MainDialog::OnQuit(wxCommandEvent& event) { Destroy(); } @@ -172,15 +180,15 @@ void MainDialog::OnStart(wxCommandEvent& event) switch (rts::startDirectoryMonitor(currentCfg, ffs3::extractJobName(currentConfigFileName))) { - case rts::QUIT: - { - Destroy(); - return; - } - break; - - case rts::RESUME: + case rts::QUIT: + { + Destroy(); + return; + } break; + + case rts::RESUME: + break; } Show(); @@ -256,7 +264,7 @@ void MainDialog::setLastUsedConfig(const wxString& filename) } else { - SetTitle(wxString(wxT("RealtimeSync - ")) + filename); + SetTitle(filename); currentConfigFileName = filename; } } @@ -265,8 +273,8 @@ void MainDialog::setLastUsedConfig(const wxString& filename) void MainDialog::OnLoadConfig(wxCommandEvent& event) { wxFileDialog* filePicker = new wxFileDialog(this, wxEmptyString, wxEmptyString, wxEmptyString, - wxString(_("RealtimeSync configuration")) + wxT(" (*.ffs_real;*.ffs_batch)|*.ffs_real;*.ffs_batch"), - wxFD_OPEN); + wxString(_("RealtimeSync configuration")) + wxT(" (*.ffs_real;*.ffs_batch)|*.ffs_real;*.ffs_batch"), + wxFD_OPEN); if (filePicker->ShowModal() == wxID_OK) loadConfig(filePicker->GetPath()); } |