Ticket #8179: multiple_site_patch

File multiple_site_patch, 4.9 KB (added by rajesh, 12 years ago)
Line 
1Only in src/dbus: .deps
2Only in src/dbus: Makefile
3Only in src/engine: .deps
4Only in src/engine: Makefile
5Only in src/fzshellext: .deps
6Only in src/fzshellext: Makefile
7Only in src/fzshellext: version.rc
8Only in src/include: config.h
9Only in src/include: Makefile
10Only in src/include: stamp-h1
11Only in src/interface: .deps
12diff -u -r src/interface/Mainfrm.cpp ../../filezilla-3.5.3/src/interface/Mainfrm.cpp
13--- src/interface/Mainfrm.cpp 2012-09-04 10:02:37.416732681 +0530
14+++ ../../filezilla-3.5.3/src/interface/Mainfrm.cpp 2011-12-29 10:00:18.000000000 +0530
15@@ -2017,46 +2017,6 @@
16 return true;
17 }
18
19-bool CMainFrame::ConnectToSiteInNewTab(CSiteManagerItemData_Site* const pData)
20-{
21- wxASSERT(pData);
22-
23- if (pData->m_server.GetLogonType() == ASK ||
24- (pData->m_server.GetLogonType() == INTERACTIVE && pData->m_server.GetUser() == _T("")))
25- {
26- if (!CLoginManager::Get().GetPassword(pData->m_server, false, pData->m_server.GetName()))
27- return false;
28- }
29-
30- CState* pState = CContextManager::Get()->GetCurrentContext();
31-
32- if (!pState)
33- return false;
34-
35- m_pContextControl->CreateTab();
36-
37- pState = CContextManager::Get()->GetCurrentContext();
38-
39- if (!(pState->Connect(pData->m_server, pData->m_remoteDir)))
40- return false;
41-
42- if (pData->m_localDir != _T(""))
43- {
44- CState *pState = CContextManager::Get()->GetCurrentContext();
45- bool set = pState && pState->SetLocalDir(pData->m_localDir);
46-
47- if (set && pData->m_sync)
48- {
49- wxASSERT(!pData->m_remoteDir.IsEmpty());
50-
51- pState->SetSyncBrowse(true, pData->m_remoteDir);
52- }
53- }
54-
55- return true;
56-}
57-
58-
59 void CMainFrame::CheckChangedSettings()
60 {
61 #if FZ_MANUALUPDATECHECK && FZ_AUTOUPDATECHECK
62@@ -2479,25 +2439,6 @@
63 pComparisonManager->CompareListings();
64 }
65
66-std :: vector<wxString> CMainFrame::GetAllSites(wxString site)
67-{
68- std :: vector<wxString> all_sites;
69- all_sites.clear();
70-
71- int start = 0;
72- for(unsigned int i = 0; i < site.Len(); i++)
73- {
74- if (site[i] == wchar_t(','))
75- {
76- all_sites.push_back(site.Mid(start, i - start));
77- start = i + 1;
78- }
79- }
80- all_sites.push_back(site.Mid(start, site.Len() - start));
81-
82- return all_sites;
83-}
84-
85 void CMainFrame::ProcessCommandLine()
86 {
87 const CCommandLine* pCommandLine = wxGetApp().GetCommandLine();
88@@ -2515,45 +2456,18 @@
89 }
90 else if ((site = pCommandLine->GetOption(CCommandLine::site)) != _T(""))
91 {
92- std :: cout << "mainfrm.cpp 2518 " << site.mb_str();
93- std :: vector<wxString> all_sites = GetAllSites(site);
94-
95-
96- CSiteManagerItemData_Site* pData = CSiteManager::GetSiteByPath(all_sites[0]);
97+ CSiteManagerItemData_Site* pData = CSiteManager::GetSiteByPath(site);
98
99- if (pData)
100- {
101- if (ConnectToSite(pData))
102- {
103- SetBookmarksFromPath(site);
104- if (m_pMenuBar)
105- m_pMenuBar->UpdateBookmarkMenu();
106- }
107- delete pData;
108- }
109-
110-
111- if (all_sites.size() > 1)
112+ if (pData)
113 {
114-
115- for (unsigned int i = 1; i < all_sites.size(); i++)
116+ if (ConnectToSite(pData))
117 {
118-
119- CSiteManagerItemData_Site* pData = CSiteManager::GetSiteByPath(all_sites[i]);
120-
121- if (pData)
122- {
123- if (ConnectToSiteInNewTab(pData))
124- {
125- SetBookmarksFromPath(site);
126- if (m_pMenuBar)
127- m_pMenuBar->UpdateBookmarkMenu();
128- }
129- delete pData;
130- }
131+ SetBookmarksFromPath(site);
132+ if (m_pMenuBar)
133+ m_pMenuBar->UpdateBookmarkMenu();
134 }
135+ delete pData;
136 }
137-
138 }
139
140 wxString param = pCommandLine->GetParameter();
141diff -u -r src/interface/Mainfrm.h ../../filezilla-3.5.3/src/interface/Mainfrm.h
142--- src/interface/Mainfrm.h 2012-09-04 10:01:19.320732797 +0530
143+++ ../../filezilla-3.5.3/src/interface/Mainfrm.h 2011-12-06 10:00:16.000000000 +0530
144@@ -59,12 +59,8 @@
145 bool ConnectToServer(const CServer& server, const CServerPath& path = CServerPath());
146
147 CContextControl* GetContextControl() { return m_pContextControl; }
148-
149- std :: vector<wxString> GetAllSites(wxString site);
150
151 bool ConnectToSite(CSiteManagerItemData_Site* const pData);
152-
153- bool ConnectToSiteInNewTab(CSiteManagerItemData_Site* const pData);
154
155 protected:
156 bool CreateMenus();
157Only in src/interface: Makefile
158Only in src/interface/resources/16x16: Makefile
159Only in src/interface/resources/32x32: Makefile
160Only in src/interface/resources/blukis: Makefile
161Only in src/interface/resources/cyril/16x16: Makefile
162Only in src/interface/resources/cyril: Makefile
163Only in src/interface/resources/lone: Makefile
164Only in src/interface/resources: MacInfo.plist
165Only in src/interface/resources: Makefile
166Only in src/interface/resources/minimal: Makefile
167Only in src/interface/resources/opencrystal: Makefile
168Only in src/interface/resources: version.rc
169Only in src/interface/settings: .deps
170Only in src/interface/settings: .dirstamp
171Only in src/: Makefile
172Only in src/putty: .deps
173Only in src/putty: Makefile
174Only in src/putty/unix: .deps
175Only in src/putty/unix: Makefile
176Only in src/putty/windows: .deps
177Only in src/putty/windows: Makefile
178Only in src/tinyxml: .deps
179Only in src/tinyxml: Makefile