diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:59 +0200 |
commit | d4af25c52a28b93484ffb55e0a8027bc4ce7856f (patch) | |
tree | 853d57468d6b370711e7a5dd2c3dc7d5bac81b10 /ui/folder_history_box.cpp | |
parent | 5.8 (diff) | |
download | FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.gz FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.bz2 FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.zip |
5.9
Diffstat (limited to 'ui/folder_history_box.cpp')
-rw-r--r-- | ui/folder_history_box.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp index 2832afed..cefc03c8 100644 --- a/ui/folder_history_box.cpp +++ b/ui/folder_history_box.cpp @@ -36,10 +36,16 @@ FolderHistoryBox::FolderHistoryBox(wxWindow* parent, /*##*/ SetMinSize(wxSize(150, -1)); //## workaround yet another wxWidgets bug: default minimum size is much too large for a wxComboBox //##################################### - Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(FolderHistoryBox::OnKeyEvent ), nullptr, this); - Connect(wxEVT_LEFT_DOWN, wxEventHandler(FolderHistoryBox::OnUpdateList), nullptr, this); + Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(FolderHistoryBox::OnKeyEvent ), nullptr, this); Connect(wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler(FolderHistoryBox::OnSelection ), nullptr, this); - Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(FolderHistoryBox::OnMouseWheel), nullptr, this); + Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(FolderHistoryBox::OnMouseWheel), nullptr, this); +#ifdef FFS_WIN //on Win, this event only fires, when clicking on the small down arrow, NOT when clicking on the text field + //thanks to wxWidgets' non-portability it's exactly the converse on Linux! + Connect(wxEVT_LEFT_DOWN, wxEventHandler(FolderHistoryBox::OnUpdateList), nullptr, this); +#elif defined FFS_LINUX //update on each text change: maybe a little too often, but we have no choice as long as we don't have an event right before showing the drop-down list + Connect(wxEVT_COMMAND_TEXT_UPDATED, wxEventHandler(FolderHistoryBox::OnUpdateList), nullptr, this); +#endif + #if wxCHECK_VERSION(2, 9, 1) Connect(wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCommandEventHandler(FolderHistoryBox::OnShowDropDown), nullptr, this); @@ -73,10 +79,8 @@ void FolderHistoryBox::setValueAndUpdateList(const wxString& dirname) std::list<Zstring> dirList; //add some aliases to allow user changing to volume name and back, if possible -#ifdef FFS_WIN std::vector<Zstring> aliases = getDirectoryAliases(toZ(dirname)); dirList.insert(dirList.end(), aliases.begin(), aliases.end()); -#endif if (sharedHistory_.get()) { |