"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/interface/edithandler.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.

edithandler.cpp  (FileZilla_3.48.0_src.tar.bz2):edithandler.cpp  (FileZilla_3.48.1_src.tar.bz2)
skipping to change at line 57 skipping to change at line 57
} }
return ret; return ret;
} }
void SaveAssociations(Associations const& assocs) void SaveAssociations(Associations const& assocs)
{ {
std::wstring quoted; std::wstring quoted;
for (auto const& assoc : assocs) { for (auto const& assoc : assocs) {
if (quoted.empty()) { if (!quoted.empty()) {
quoted += '\n'; quoted += '\n';
} }
if (assoc.first.find_first_of(L" \t'\"") != std::wstring::npos) { if (assoc.first.find_first_of(L" \t'\"") != std::wstring::npos) {
quoted += '"'; quoted += '"';
quoted += fz::replaced_substrings(assoc.first, L"\"", L"\ "\""); quoted += fz::replaced_substrings(assoc.first, L"\"", L"\ "\"");
quoted += '"'; quoted += '"';
} }
else { else {
quoted += assoc.first; quoted += assoc.first;
skipping to change at line 359 skipping to change at line 359
data.state = download; data.state = download;
} }
else { else {
data.state = edit; data.state = edit;
} }
data.localFile = localFile; data.localFile = localFile;
data.remoteFile = remoteFile; data.remoteFile = remoteFile;
data.remotePath = remotePath; data.remotePath = remotePath;
data.site = site; data.site = site;
m_fileDataList[type].push_back(data);
if (type == local) { if (type == local) {
auto it = GetFile(localFile); bool const launched = LaunchEditor(local, data);
bool launched = LaunchEditor(local, *it);
if (!launched || !COptions::Get()->GetOptionVal(OPTION_EDIT_TRACK if (launched && COptions::Get()->GetOptionVal(OPTION_EDIT_TRACK_L
_LOCAL)) { OCAL)) {
m_fileDataList[local].erase(it); m_fileDataList[type].emplace_back(std::move(data));
}
if (!launched) {
wxMessageBoxEx(wxString::Format(_("The file '%s' could no t be opened:\nThe associated command failed"), localFile), _("Opening failed"), wxICON_EXCLAMATION); wxMessageBoxEx(wxString::Format(_("The file '%s' could no t be opened:\nThe associated command failed"), localFile), _("Opening failed"), wxICON_EXCLAMATION);
} }
return launched; return launched;
} }
else { else {
m_fileDataList[type].emplace_back(std::move(data));
std::wstring localFileName; std::wstring localFileName;
CLocalPath localPath(localFile, &localFileName); CLocalPath localPath(localFile, &localFileName);
if (localFileName == remoteFile) { if (localFileName == remoteFile) {
localFileName.clear(); localFileName.clear();
} }
m_pQueue->QueueFile(false, true, remoteFile, localFileName, local Path, remotePath, site, size, type, QueuePriority::high); m_pQueue->QueueFile(false, true, remoteFile, localFileName, local Path, remotePath, site, size, type, QueuePriority::high);
m_pQueue->QueueFile_Finish(true); m_pQueue->QueueFile_Finish(true);
} }
return true; return true;
skipping to change at line 1222 skipping to change at line 1223
wxCheckBox* always{}; wxCheckBox* always{};
if (fileCount > 1) { if (fileCount > 1) {
always = new wxCheckBox(&dlg, -1, _("Do the same with &all selected files already being edited")); always = new wxCheckBox(&dlg, -1, _("Do the same with &all selected files already being edited"));
main->Add(always); main->Add(always);
if (choices & edit_choices::edit_existing_always) { if (choices & edit_choices::edit_existing_always) {
always->SetValue(true); always->SetValue(true);
} }
} }
auto buttons = lay.createButtonSizer(&dlg, main, false); auto buttons = lay.createButtonSizer(&dlg, main, true);
if (type == remote) { if (type == remote) {
auto ok = new wxButton(&dlg, wxID_OK, _("OK")); auto ok = new wxButton(&dlg, wxID_OK, _("OK"));
ok->SetDefault(); ok->SetDefault();
buttons->AddButton(ok); buttons->AddButton(ok);
auto cancel = new wxButton(&dlg, wxID_CANCEL, _(" Cancel")); auto cancel = new wxButton(&dlg, wxID_CANCEL, _(" Cancel"));
buttons->AddButton(cancel); buttons->AddButton(cancel);
} }
else { else {
auto yes = new wxButton(&dlg, wxID_YES, _("&Yes") ); auto yes = new wxButton(&dlg, wxID_YES, _("&Yes") );
skipping to change at line 1267 skipping to change at line 1268
} }
if (fileCount > 1) { if (fileCount > 1) {
if (always && always->GetValue()) { if (always && always->GetValue()) {
already_editing_action = action; already_editing_action = action;
choices |= edit_choices::edit_existing_al ways; choices |= edit_choices::edit_existing_al ways;
} }
else { else {
choices &= ~edit_choices::edit_existing_a lways; choices &= ~edit_choices::edit_existing_a lways;
} }
COptions::Get()->SetOption(OPTION_PERSISTENT_CHOI CES, choices);
} }
COptions::Get()->SetOption(OPTION_PERSISTENT_CHOICES, cho ices);
} }
if (action == -1) { if (action == -1) {
return false; return false;
} }
else if (action == 1) { else if (action == 1) {
if (type == CEditHandler::local) { if (type == CEditHandler::local) {
LaunchEditor(file.name); LaunchEditor(file.name);
} }
else { else {
 End of changes. 8 change blocks. 
10 lines changed or deleted 11 lines changed or added

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