Ticket #5705: upload_no_ask.patch
File upload_no_ask.patch, 3.6 KB (added by , 13 years ago) |
---|
-
src/interface/settings/optionspage_edit.cpp
36 36 SetRCheck(XRCID("ID_USEASSOCIATIONS"), true, failure); 37 37 38 38 SetCheckFromOption(XRCID("ID_EDIT_TRACK_LOCAL"), OPTION_EDIT_TRACK_LOCAL, failure); 39 SetCheckFromOption(XRCID("ID_EDIT_NO_ASK"), OPTION_EDIT_NO_ASK, failure); 39 40 40 41 if (!failure) 41 42 SetCtrlState(); … … 58 59 pOptions->SetOption(OPTION_EDIT_ALWAYSDEFAULT, 0); 59 60 60 61 SetOptionFromCheck(XRCID("ID_EDIT_TRACK_LOCAL"), OPTION_EDIT_TRACK_LOCAL); 62 SetOptionFromCheck(XRCID("ID_EDIT_NO_ASK"), OPTION_EDIT_NO_ASK); 61 63 62 64 return true; 63 65 } -
src/interface/Options.h
72 72 OPTION_COMPARE_HIDEIDENTICAL, 73 73 OPTION_SEARCH_SORTORDER, 74 74 OPTION_EDIT_TRACK_LOCAL, 75 OPTION_EDIT_NO_ASK, 75 76 OPTION_PREVENT_IDLESLEEP, 76 77 OPTION_FILTEREDIT_SIZE, 77 78 OPTION_INVALID_CHAR_REPLACE_ENABLE, -
src/interface/resources/settings.xrc
1889 1889 <label>&Watch locally edited files and prompt to upload modifications</label> 1890 1890 </object> 1891 1891 </object> 1892 <object class="sizeritem"> 1893 <object class="wxCheckBox" name="ID_EDIT_NO_ASK"> 1894 <label>&Do not ask before uploading files</label> 1895 </object> 1896 </object> 1892 1897 <cols>1</cols> 1893 1898 <vgap>5</vgap> 1894 1899 <growablecols>0</growablecols> -
src/interface/edithandler.cpp
657 657 continue; 658 658 659 659 // File has changed, ask user what to do 660 int res = wxID_YES; 661 bool remove; 660 662 661 m_busyTimer.Stop(); 662 wxMouseState mouseState = wxGetMouseState(); 663 if (mouseState.LeftDown() || mouseState.MiddleDown() || mouseState.RightDown()) 664 { 665 m_busyTimer.Start(1000, true); 666 insideCheckForModifications = false; 667 return; 668 } 663 if (!COptions::Get()->GetOptionVal(OPTION_EDIT_NO_ASK)) { 664 // File has changed and the no ask option is set 669 665 670 wxTopLevelWindow* pTopWindow = (wxTopLevelWindow*)wxTheApp->GetTopWindow(); 671 if (pTopWindow && pTopWindow->IsIconized()) 672 { 673 pTopWindow->RequestUserAttention(wxUSER_ATTENTION_INFO); 674 insideCheckForModifications = false; 675 return; 666 m_busyTimer.Stop(); 667 wxMouseState mouseState = wxGetMouseState(); 668 if (mouseState.LeftDown() || mouseState.MiddleDown() || mouseState.RightDown()) 669 { 670 m_busyTimer.Start(1000, true); 671 insideCheckForModifications = false; 672 return; 673 } 674 675 wxTopLevelWindow* pTopWindow = (wxTopLevelWindow*)wxTheApp->GetTopWindow(); 676 if (pTopWindow && pTopWindow->IsIconized()) 677 { 678 pTopWindow->RequestUserAttention(wxUSER_ATTENTION_INFO); 679 insideCheckForModifications = false; 680 return; 681 } 682 683 res = DisplayChangeNotification(CEditHandler::fileType(i), iter, remove); 684 if (res == -1) 685 continue; 676 686 } 677 687 678 bool remove;679 int res = DisplayChangeNotification(CEditHandler::fileType(i), iter, remove);680 if (res == -1)681 continue;682 683 688 if (res == wxID_YES) 684 689 { 685 690 UploadFile(CEditHandler::fileType(i), iter, remove);