diff -r -u FileZilla3.orig/src/interface/LocalTreeView.cpp FileZilla3/src/interface/LocalTreeView.cpp
old
|
new
|
|
207 | 207 | #endif |
208 | 208 | EVT_TREE_SEL_CHANGED(wxID_ANY, CLocalTreeView::OnSelectionChanged) |
209 | 209 | EVT_TREE_BEGIN_DRAG(wxID_ANY, CLocalTreeView::OnBeginDrag) |
| 210 | EVT_TREE_BEGIN_RDRAG(wxID_ANY, CLocalTreeView::OnBeginRDrag) |
210 | 211 | #ifndef __WXMSW__ |
211 | 212 | EVT_KEY_DOWN(CLocalTreeView::OnKeyDown) |
212 | 213 | #else |
… |
… |
|
245 | 246 | m_pVolumeEnumeratorThread = 0; |
246 | 247 | |
247 | 248 | CreateRoot(); |
| 249 | |
| 250 | m_ignoreTreeEventItem = false; |
248 | 251 | #else |
249 | 252 | wxTreeItemId root = AddRoot(_T("/")); |
250 | 253 | SetItemImage(root, GetIconIndex(dir), wxTreeItemIcon_Normal); |
… |
… |
|
978 | 981 | } |
979 | 982 | } |
980 | 983 | |
| 984 | #ifdef __WXMSW__ |
| 985 | void CLocalTreeView::OnBeginRDrag(wxTreeEvent& event) |
| 986 | { |
| 987 | m_ignoreTreeEventItem = true; |
| 988 | } |
| 989 | #endif |
| 990 | |
| 991 | |
981 | 992 | #ifndef __WXMSW__ |
982 | 993 | void CLocalTreeView::OnKeyDown(wxKeyEvent& event) |
983 | 994 | { |
… |
… |
|
1109 | 1120 | void CLocalTreeView::OnContextMenu(wxTreeEvent& event) |
1110 | 1121 | { |
1111 | 1122 | m_contextMenuItem = event.GetItem(); |
| 1123 | |
| 1124 | #ifdef __WXMSW__ |
| 1125 | if (m_ignoreTreeEventItem) { |
| 1126 | m_contextMenuItem = GetSelection(); |
| 1127 | } |
| 1128 | |
| 1129 | m_ignoreTreeEventItem = false; |
| 1130 | #endif |
| 1131 | |
1112 | 1132 | if (!m_contextMenuItem.IsOk()) |
1113 | 1133 | return; |
1114 | 1134 | |
diff -r -u FileZilla3.orig/src/interface/LocalTreeView.h FileZilla3/src/interface/LocalTreeView.h
old
|
new
|
|
53 | 53 | |
54 | 54 | bool CheckSubdirStatus(wxTreeItemId& item, const wxString& path); |
55 | 55 | |
| 56 | #ifdef __WXMSW__ |
| 57 | bool m_ignoreTreeEventItem; |
| 58 | #endif |
| 59 | |
56 | 60 | DECLARE_EVENT_TABLE() |
57 | 61 | void OnItemExpanding(wxTreeEvent& event); |
58 | 62 | #ifdef __WXMSW__ |
… |
… |
|
60 | 64 | #endif |
61 | 65 | void OnSelectionChanged(wxTreeEvent& event); |
62 | 66 | void OnBeginDrag(wxTreeEvent& event); |
| 67 | #ifdef __WXMSW__ |
| 68 | void OnBeginRDrag(wxTreeEvent& event); |
| 69 | #endif |
63 | 70 | #ifndef __WXMSW__ |
64 | 71 | void OnKeyDown(wxKeyEvent& event); |
65 | 72 | #else |
diff -r -u FileZilla3.orig/src/interface/RemoteTreeView.cpp FileZilla3/src/interface/RemoteTreeView.cpp
old
|
new
|
|
220 | 220 | EVT_TREE_SEL_CHANGED(wxID_ANY, CRemoteTreeView::OnSelectionChanged) |
221 | 221 | EVT_TREE_ITEM_ACTIVATED(wxID_ANY, CRemoteTreeView::OnItemActivated) |
222 | 222 | EVT_TREE_BEGIN_DRAG(wxID_ANY, CRemoteTreeView::OnBeginDrag) |
| 223 | #ifdef __WXMSW__ |
| 224 | EVT_TREE_BEGIN_RDRAG(wxID_ANY, CRemoteTreeView::OnBeginRDrag) |
| 225 | #endif //__WXMSW__ |
223 | 226 | #ifndef __WXMSW__ |
224 | 227 | EVT_KEY_DOWN(CRemoteTreeView::OnKeyDown) |
225 | 228 | #endif //__WXMSW__ |
… |
… |
|
255 | 258 | m_pQueue = pQueue; |
256 | 259 | AddRoot(_T("")); |
257 | 260 | m_ExpandAfterList = wxTreeItemId(); |
| 261 | |
| 262 | #ifdef __WXMSW__ |
| 263 | m_ignoreTreeEventItem = false; |
| 264 | #endif |
258 | 265 | |
259 | 266 | SetDropTarget(new CRemoteTreeViewDropTarget(this)); |
260 | 267 | |
… |
… |
|
912 | 919 | #endif |
913 | 920 | } |
914 | 921 | |
| 922 | #ifdef __WXMSW__ |
| 923 | void CRemoteTreeView::OnBeginRDrag(wxTreeEvent& event) |
| 924 | { |
| 925 | m_ignoreTreeEventItem = true; |
| 926 | } |
| 927 | #endif |
| 928 | |
915 | 929 | #ifndef __WXMSW__ |
916 | 930 | void CRemoteTreeView::OnKeyDown(wxKeyEvent& event) |
917 | 931 | { |
… |
… |
|
933 | 947 | void CRemoteTreeView::OnContextMenu(wxTreeEvent& event) |
934 | 948 | { |
935 | 949 | m_contextMenuItem = event.GetItem(); |
| 950 | |
| 951 | #ifdef __WXMSW__ |
| 952 | if (m_ignoreTreeEventItem) { |
| 953 | m_contextMenuItem = GetSelection(); |
| 954 | } |
| 955 | |
| 956 | m_ignoreTreeEventItem = false; |
| 957 | #endif |
| 958 | |
936 | 959 | wxMenu* pMenu = wxXmlResource::Get()->LoadMenu(_T("ID_MENU_REMOTETREE")); |
937 | 960 | if (!pMenu) |
938 | 961 | return; |
diff -r -u FileZilla3.orig/src/interface/RemoteTreeView.h FileZilla3/src/interface/RemoteTreeView.h
old
|
new
|
|
47 | 47 | // Used to suspends event processing in OnItemExpanding for example |
48 | 48 | bool m_busy; |
49 | 49 | |
| 50 | #ifdef __WXMSW__ |
| 51 | bool m_ignoreTreeEventItem; |
| 52 | #endif |
| 53 | |
50 | 54 | wxTreeItemId m_ExpandAfterList; |
51 | 55 | |
52 | 56 | wxTreeItemId m_dropHighlight; |
… |
… |
|
56 | 60 | void OnSelectionChanged(wxTreeEvent& event); |
57 | 61 | void OnItemActivated(wxTreeEvent& event); |
58 | 62 | void OnBeginDrag(wxTreeEvent& event); |
| 63 | #ifdef __WXMSW__ |
| 64 | void OnBeginRDrag(wxTreeEvent& event); |
| 65 | #endif |
59 | 66 | #ifndef __WXMSW__ |
60 | 67 | void OnKeyDown(wxKeyEvent& event); |
61 | 68 | #endif |