Ticket #7991: myModif.2.patch
File myModif.2.patch, 8.6 KB (added by , 13 years ago) |
---|
-
trunk/src/interface/Mainfrm.cpp
50 50 #include "toolbar.h" 51 51 #include "menu_bar.h" 52 52 #include "string_coalescer.h" 53 #include "select_dialog.h" 53 54 54 55 #ifdef __WXMSW__ 55 56 #include <wx/module.h> … … 67 68 DEFINE_EVENT_TYPE(fzEVT_TASKBAR_CLICK_DELAYED); 68 69 #endif 69 70 71 72 73 70 74 static int tab_hotkey_ids[10]; 71 75 72 76 BEGIN_EVENT_TABLE(CMainFrame, wxFrame) … … 336 340 m_pContextControl->CreateTab(); 337 341 338 342 m_pContextControl->GetCurrentControls(); 339 343 340 344 switch (message_log_position) 341 345 { 342 346 case 1: … … 508 512 delete m_pMenuBar; 509 513 } 510 514 m_pMenuBar = CMenuBar::Load(this); 511 515 512 516 if (!m_pMenuBar) 513 517 return false; 514 518 … … 610 614 { 611 615 OnMenuEditSettings(event); 612 616 } 617 else if(event.GetId() == XRCID("ID_MENU_EDIT_SELECT")) // Ma modification 618 { 619 OnSelectSettings(event); 620 621 } 613 622 else if (event.GetId() == XRCID("ID_MENU_EDIT_NETCONFWIZARD")) 614 623 { 615 624 CNetConfWizard wizard(this, COptions::Get()); … … 854 863 CSiteManager::GetBookmarks(controls->site_bookmarks->path, controls->site_bookmarks->bookmarks); 855 864 if (m_pMenuBar) 856 865 m_pMenuBar->UpdateBookmarkMenu(); 857 } 866 } 858 867 } 859 868 else if (event.GetId() == XRCID("ID_MENU_HELP_WELCOME")) 860 869 { … … 946 955 { 947 956 if ((*iter)->m_pEngine != pEngine) 948 957 continue; 949 958 950 959 pState = *iter; 951 960 break; 952 961 } … … 1239 1248 } 1240 1249 1241 1250 RememberSplitterPositions(); 1242 1251 1243 1252 #ifdef __WXMAC__ 1244 1253 if (m_pToolBar) 1245 1254 COptions::Get()->SetOption(OPTION_TOOLBAR_HIDDEN, m_pToolBar->IsShown() ? 0 : 1); … … 1534 1543 CheckChangedSettings(); 1535 1544 } 1536 1545 1546 void CMainFrame::OnSelectSettings(wxCommandEvent& event) 1547 { 1548 1549 CContextControl::_context_controls* controls = m_pContextControl->GetCurrentControls(); 1550 1551 CSelect_dialog *dlg= new CSelect_dialog(wxT("Select local files..."), (controls->pLocalListView)); 1552 dlg->ShowModal(); 1553 delete dlg; 1554 1555 } 1556 1537 1557 void CMainFrame::OnToggleLogView(wxCommandEvent& event) 1538 1558 { 1539 1559 if (!m_pTopSplitter) … … 1581 1601 shown = true; 1582 1602 } 1583 1603 } 1584 1604 1585 1605 if (COptions::Get()->GetOptionVal(OPTION_MESSAGELOG_POSITION) != 2) 1586 1606 COptions::Get()->SetOption(OPTION_SHOW_MESSAGELOG, shown); 1587 1607 } … … 1632 1652 continue; 1633 1653 1634 1654 controls->pLocalTreeViewPanel->SetHeader(controls->pLocalListViewPanel->DetachHeader()); 1635 1655 1636 1656 if (layout == 3 && swap) 1637 1657 controls->pLocalSplitter->SplitVertically(controls->pLocalListViewPanel, controls->pLocalTreeViewPanel); 1638 1658 else if (layout) … … 1796 1816 1797 1817 if (messagelog_position == -1) 1798 1818 messagelog_position = COptions::Get()->GetOptionVal(OPTION_MESSAGELOG_POSITION); 1799 1819 1800 1820 // First handle changes in message log position as it can make size of the other panes change 1801 1821 { 1802 1822 bool shown = m_pStatusView->IsShown(); 1803 1823 wxWindow* parent = m_pStatusView->GetParent(); 1804 1824 1805 1825 bool changed; 1806 1826 if (parent == m_pTopSplitter && messagelog_position != 0) 1807 1827 { … … 2203 2223 CContextControl::_context_controls* controls = m_pContextControl->GetCurrentControls(); 2204 2224 if (!controls) 2205 2225 return; 2206 2226 2207 2227 wxString posString; 2208 2228 2209 2229 // top_pos … … 2549 2569 // create another instance of the module and call its Exit() member. 2550 2570 // After that, the next call to a wxDisplay will create a new factory and 2551 2571 // get the new display layout from Windows. 2552 // 2572 // 2553 2573 // Note: Both the factory pattern as well as the dynamic object system 2554 2574 // are perfect example of bad design. 2555 2575 // -
trunk/src/interface/LocalListView.cpp
1856 1856 } 1857 1857 } 1858 1858 1859 1860 void CLocalListView::StartSelect() 1861 { 1862 m_selectIndex = 0; 1863 } 1864 1865 bool CLocalListView::GetNextFileSelect(wxString& name, bool& dir, wxLongLong& size, wxDateTime& date, bool &hasTime) 1866 { 1867 1868 if (m_selectIndex >= m_fileData.size()) return false; 1869 1870 const CLocalFileData& data = m_fileData[m_indexMapping[m_selectIndex]]; 1871 1872 name = data.name; 1873 dir = data.dir; 1874 size = data.size; 1875 date = data.lastModified; 1876 hasTime = true; 1877 1878 m_selectIndex++; 1879 1880 return true; 1881 } 1882 1883 1884 1859 1885 bool CLocalListView::GetNextFile(wxString& name, bool& dir, wxLongLong& size, wxDateTime& date, bool &hasTime) 1860 1886 { 1861 1887 if (++m_comparisonIndex >= (int)m_originalIndexMapping.size()) … … 2219 2245 continue; 2220 2246 2221 2247 m_fileData[index].label = drive + _T(" (") + iter->volumeName + _T(")"); 2222 2248 2223 2249 RefreshItem(item); 2224 2250 } 2225 2251 } -
trunk/src/interface/Makefile.am
64 64 RemoteListView.cpp \ 65 65 RemoteTreeView.cpp \ 66 66 search.cpp \ 67 select_dialog.cpp \ 67 68 settings/optionspage.cpp \ 68 69 settings/optionspage_connection.cpp \ 69 70 settings/optionspage_connection_active.cpp \ … … 176 177 RemoteListView.h \ 177 178 RemoteTreeView.h \ 178 179 search.h \ 180 select_dialog.h \ 179 181 settings/optionspage.h \ 180 182 settings/optionspage_connection.h \ 181 183 settings/optionspage_connection_active.h \ -
trunk/src/interface/resources/menus.xrc
43 43 </object> 44 44 <object class="wxMenu"> 45 45 <label>&Edit</label> 46 <object class="wxMenuItem" name="ID_MENU_EDIT_SELECT"> 47 <label>Se&lect local files...</label> 48 </object> 49 <object class="separator"/> 46 50 <object class="wxMenuItem" name="ID_MENU_EDIT_NETCONFWIZARD"> 47 51 <label>&Network configuration wizard...</label> 48 52 </object> … … 597 601 <label>&Configure speed limits...</label> 598 602 </object> 599 603 </object> 600 </resource> 601 No newline at end of file 604 </resource> -
trunk/src/interface/Mainfrm.h
55 55 void ProcessCommandLine(); 56 56 57 57 void PostInitialize(); 58 58 59 59 bool ConnectToServer(const CServer& server, const CServerPath& path = CServerPath()); 60 60 61 61 CContextControl* GetContextControl() { return m_pContextControl; } … … 117 117 void OnSiteManager(wxCommandEvent& event); 118 118 void OnProcessQueue(wxCommandEvent& event); 119 119 void OnMenuEditSettings(wxCommandEvent& event); 120 void OnSelectSettings(wxCommandEvent& event); 120 121 void OnToggleToolBar(wxCommandEvent& event); 121 122 void OnToggleLogView(wxCommandEvent& event); 122 123 void OnToggleLocalTreeView(wxCommandEvent& event); -
trunk/src/interface/LocalListView.h
64 64 virtual bool GetNextFile(wxString& name, bool &dir, wxLongLong &size, wxDateTime& date, bool &hasTime); 65 65 virtual void FinishComparison(); 66 66 67 virtual void StartSelect(); 68 virtual bool GetNextFileSelect(wxString& name, bool &dir, wxLongLong &size, wxDateTime& date, bool &hasTime); 69 67 70 virtual bool ItemIsDir(int index) const; 68 71 virtual wxLongLong ItemGetSize(int index) const; 69 72 … … 87 90 wxDropTarget* m_pDropTarget; 88 91 int m_dropTarget; 89 92 93 unsigned int m_selectIndex; 94 90 95 // Event handlers 91 96 DECLARE_EVENT_TABLE(); 92 97 void OnItemActivated(wxListEvent& event); -
trunk/src/tinyxml/tinyxml.cpp
57 57 { 58 58 unsigned char c = (unsigned char) str[i]; 59 59 60 if ( c == '&' ) 60 if ( c == '&' 61 && i < ( (int)str.length() - 2 ) 62 && str[i+1] == '#' 63 && str[i+2] == 'x' ) 61 64 { 65 // Hexadecimal character reference. 66 // Pass through unchanged. 67 // © -- copyright symbol, for example. 68 // 69 // The -1 is a bug fix from Rob Laveaux. It keeps 70 // an overflow from happening if there is no ';'. 71 // There are actually 2 ways to exit this loop - 72 // while fails (error case) and break (semicolon found). 73 // However, there is no mechanism (currently) for 74 // this function to return an error. 75 while ( i<(int)str.length()-1 ) 76 { 77 outString->append( str.c_str() + i, 1 ); 78 ++i; 79 if ( str[i] == ';' ) 80 break; 81 } 82 } 83 else if ( c == '&' ) 84 { 62 85 outString->append( entity[0].str, entity[0].strLength ); 63 86 ++i; 64 87 }