"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/interface/filelistctrl.cpp" between
FileZilla_3.48.0_src.tar.bz2 and FileZilla_3.48.1_src.tar.bz2

About: FileZilla is a fast and feature-rich cross-platform FTP, FTPS and SFTP client with an intuitive graphical user interface.

filelistctrl.cpp  (FileZilla_3.48.0_src.tar.bz2):filelistctrl.cpp  (FileZilla_3.48.1_src.tar.bz2)
skipping to change at line 934 skipping to change at line 934
template<class CFileData> void CFileListCtrl<CFileData>::OnProcessFocusChange(wx CommandEvent& event) template<class CFileData> void CFileListCtrl<CFileData>::OnProcessFocusChange(wx CommandEvent& event)
{ {
m_pending_focus_processing--; m_pending_focus_processing--;
int old_focus = event.GetInt(); int old_focus = event.GetInt();
int new_focus = (int)event.GetExtraLong(); int new_focus = (int)event.GetExtraLong();
if (old_focus >= GetItemCount()) { if (old_focus >= GetItemCount()) {
return; return;
} }
if (old_focus != -1) { if (old_focus >= 0) {
bool selected = GetItemState(old_focus, wxLIST_STATE_SELECTED) == wxLIST_STATE_SELECTED; bool selected = GetItemState(old_focus, wxLIST_STATE_SELECTED) == wxLIST_STATE_SELECTED;
if (!selected && m_selections[old_focus]) { if (!selected && old_focus < m_selections.size() && m_selections[ old_focus]) {
// Need to deselect all // Need to deselect all
if (m_pFilelistStatusBar) { if (m_pFilelistStatusBar) {
m_pFilelistStatusBar->UnselectAll(); m_pFilelistStatusBar->UnselectAll();
} }
for (unsigned int i = 0; i < m_selections.size(); ++i) { for (unsigned int i = 0; i < m_selections.size(); ++i) {
m_selections[i] = 0; m_selections[i] = 0;
} }
} }
} }
skipping to change at line 973 skipping to change at line 973
if (max >= GetItemCount()) { if (max >= GetItemCount()) {
return; return;
} }
UpdateSelections(min, max); UpdateSelections(min, max);
} }
template <class CFileData> void CFileListCtrl<CFileData>::UpdateSelections(int m in, int max) template <class CFileData> void CFileListCtrl<CFileData>::UpdateSelections(int m in, int max)
{ {
if (min < 0 || min > max) {
return;
}
size_t smax = static_cast<size_t>(max);
if (m_selections.size() <= smax || m_indexMapping.size() <= smax || m_fil
eData.size() <= smax) {
return;
}
for (int i = min; i <= max; ++i) { for (int i = min; i <= max; ++i) {
bool selected = GetItemState(i, wxLIST_STATE_SELECTED) == wxLIST_ STATE_SELECTED; bool selected = GetItemState(i, wxLIST_STATE_SELECTED) == wxLIST_ STATE_SELECTED;
if (selected == m_selections[i]) { if (selected == m_selections[i]) {
continue; continue;
} }
m_selections[i] = selected; m_selections[i] = selected;
if (!m_pFilelistStatusBar) { if (!m_pFilelistStatusBar) {
continue; continue;
skipping to change at line 1080 skipping to change at line 1089
template<class CFileData> void CFileListCtrl<CFileData>::OnKeyDown(wxKeyEvent& e vent) template<class CFileData> void CFileListCtrl<CFileData>::OnKeyDown(wxKeyEvent& e vent)
{ {
#ifdef __WXMAC__ #ifdef __WXMAC__
#define CursorModifierKey wxMOD_CMD #define CursorModifierKey wxMOD_CMD
#else #else
#define CursorModifierKey wxMOD_ALT #define CursorModifierKey wxMOD_ALT
#endif #endif
const int code = event.GetKeyCode(); const int code = event.GetKeyCode();
const int mods = event.GetModifiers(); const int mods = event.GetModifiers();
if (code == 'A' && (mods == wxMOD_CMD || mods == (wxMOD_CONTROL | wxMOD_M if (code == 'A' && (mods & wxMOD_CMD || (mods & (wxMOD_CONTROL | wxMOD_ME
ETA))) { TA)) == (wxMOD_CONTROL | wxMOD_META))) {
int mask = fill;
if (mods & wxMOD_SHIFT) {
mask |= normal;
}
for (unsigned int i = m_hasParent ? 1 : 0; i < m_indexMapping.siz e(); ++i) { for (unsigned int i = m_hasParent ? 1 : 0; i < m_indexMapping.siz e(); ++i) {
const CFileData& data = m_fileData[m_indexMapping[i]]; const CFileData& data = m_fileData[m_indexMapping[i]];
if (data.comparison_flags != fill) { if (data.comparison_flags & mask) {
SetSelection(i, true); SetSelection(i, false);
} }
else { else {
SetSelection(i, false); SetSelection(i, true);
} }
} }
if (m_hasParent && GetItemCount()) { if (m_hasParent && GetItemCount()) {
SetSelection(0, false); SetSelection(0, false);
} }
if (m_pFilelistStatusBar) { if (m_pFilelistStatusBar) {
m_pFilelistStatusBar->SelectAll(); m_pFilelistStatusBar->SelectAll();
} }
} }
else if (code == WXK_BACK || else if (code == WXK_BACK ||
 End of changes. 6 change blocks. 
7 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)