Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 105307 Details for
Bug 89290
New ebuild: net-ftp/filezilla
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
site-manager-fix.patch
site-manager-fix.patch (text/plain), 6.97 KB, created by
Kalidarn
on 2007-01-03 09:54:31 UTC
(
hide
)
Description:
site-manager-fix.patch
Filename:
MIME Type:
Creator:
Kalidarn
Created:
2007-01-03 09:54:31 UTC
Size:
6.97 KB
patch
obsolete
>diff -ur filezilla-3.0.0-beta4_2/src/engine/server.cpp filezilla-3.0.0-beta4_1/src/engine/server.cpp >--- filezilla-3.0.0-beta4_2/src/engine/server.cpp 2006-12-14 20:15:50.000000000 +1030 >+++ filezilla-3.0.0-beta4_1/src/engine/server.cpp 2007-01-04 03:48:38.000000000 +1030 >@@ -1,5 +1,21 @@ > #include "FileZilla.h" > >+struct t_protocolInfo >+{ >+ const bool translateable; >+ const enum ServerProtocol protocol; >+ const wxChar* const name; >+}; >+ >+static const t_protocolInfo protocolInfos[] = { >+ false, FTP, _T("FTP - File Transfer Protocol"), >+ false, SFTP, _T("SFTP - SSH File Transfer Protocol"), >+ true, FTPS, wxTRANSLATE("FTPS - FTP over implicit TLS/SSL"), >+ true, FTPES, wxTRANSLATE("FTPES - FTP over explicit TLS/SSL"), >+ true, SFTP, _T("SSH File Transfer Protocol (SFTP)"), >+ false, UNKNOWN, _T("") >+}; >+ > CServer::CServer() > { > Initialize(); >@@ -553,3 +569,44 @@ > return FTP; > } > } >+ >+wxString CServer::GetProtocolName(enum ServerProtocol protocol) >+{ >+ const t_protocolInfo *protocolInfo = protocolInfos; >+ while (protocolInfo->protocol != UNKNOWN) >+ { >+ if (protocolInfo->protocol != protocol) >+ { >+ protocolInfo++; >+ continue; >+ } >+ >+ if (protocolInfo->translateable) >+ return wxGetTranslation(protocolInfo->name); >+ else >+ return protocolInfo->name; >+ } >+ >+ return _T(""); >+} >+ >+enum ServerProtocol CServer::GetProtocolFromName(const wxString& name) >+{ >+ const t_protocolInfo *protocolInfo = protocolInfos; >+ while (protocolInfo->protocol != UNKNOWN) >+ { >+ if (protocolInfo->translateable) >+ { >+ if (wxGetTranslation(protocolInfo->name) == name) >+ return protocolInfo->protocol; >+ } >+ else >+ { >+ if (protocolInfo->name == name) >+ return protocolInfo->protocol; >+ } >+ protocolInfo++; >+ } >+ >+ return UNKNOWN; >+} >diff -ur filezilla-3.0.0-beta4_2/src/include/server.h filezilla-3.0.0-beta4_1/src/include/server.h >--- filezilla-3.0.0-beta4_2/src/include/server.h 2006-12-14 20:15:50.000000000 +1030 >+++ filezilla-3.0.0-beta4_1/src/include/server.h 2007-01-04 03:48:45.000000000 +1030 >@@ -101,6 +101,9 @@ > static unsigned int GetDefaultPort(enum ServerProtocol protocol); > static enum ServerProtocol GetProtocolFromPort(unsigned int port); > >+ static wxString GetProtocolName(enum ServerProtocol protocol); >+ static enum ServerProtocol GetProtocolFromName(const wxString& name); >+ > protected: > void Initialize(); > >diff -ur filezilla-3.0.0-beta4_2/src/interface/resources/dialogs.xrc filezilla-3.0.0-beta4_1/src/interface/resources/dialogs.xrc >--- filezilla-3.0.0-beta4_2/src/interface/resources/dialogs.xrc 2006-12-14 20:15:50.000000000 +1030 >+++ filezilla-3.0.0-beta4_1/src/interface/resources/dialogs.xrc 2007-01-04 03:48:32.000000000 +1030 >@@ -719,10 +719,6 @@ > </object> > <object class="sizeritem"> > <object class="wxChoice" name="ID_PROTOCOL"> >- <content> >- <item>FTP</item> >- <item>SFTP</item> >- </content> > <selection>0</selection> > </object> > <flag>wxGROW</flag> >diff -ur filezilla-3.0.0-beta4_2/src/interface/sitemanager.cpp filezilla-3.0.0-beta4_1/src/interface/sitemanager.cpp >--- filezilla-3.0.0-beta4_2/src/interface/sitemanager.cpp 2006-12-14 20:15:50.000000000 +1030 >+++ filezilla-3.0.0-beta4_1/src/interface/sitemanager.cpp 2007-01-04 03:48:50.000000000 +1030 >@@ -85,6 +85,12 @@ > { > wxXmlResource::Get()->LoadDialog(this, GetParent(), _T("ID_SITEMANAGER")); > >+ wxChoice *pProtocol = XRCCTRL(*this, "ID_PROTOCOL", wxChoice); >+ pProtocol->Append(CServer::GetProtocolName(FTP)); >+ pProtocol->Append(CServer::GetProtocolName(SFTP)); >+ pProtocol->Append(CServer::GetProtocolName(FTPS)); >+ pProtocol->Append(CServer::GetProtocolName(FTPES)); >+ > wxChoice *pChoice = XRCCTRL(*this, "ID_SERVERTYPE", wxChoice); > wxASSERT(pChoice); > pChoice->Append(_T("Unix")); >@@ -414,8 +420,9 @@ > return false; > } > >- const wxString& protocol = XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->GetStringSelection(); >- if (protocol == _("SFTP") && >+ wxString protocolName = XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->GetStringSelection(); >+ enum ServerProtocol protocol = CServer::GetProtocolFromName(protocolName); >+ if (protocol == SFTP && > XRCCTRL(*this, "ID_LOGONTYPE", wxChoice)->GetStringSelection() == _("Account")) > { > XRCCTRL(*this, "ID_LOGONTYPE", wxChoice)->SetFocus(); >@@ -424,10 +431,8 @@ > } > > CServer server; >- if (protocol == _("FTP")) >- server.SetProtocol(FTP); >- else if (protocol == _("SFTP")) >- server.SetProtocol(SFTP); >+ if (protocol != UNKNOWN) >+ server.SetProtocol(protocol); > > unsigned long port; > XRCCTRL(*this, "ID_PORT", wxTextCtrl)->GetValue().ToULong(&port); >@@ -443,16 +448,10 @@ > XRCCTRL(*this, "ID_HOST", wxTextCtrl)->SetValue(server.GetHost()); > XRCCTRL(*this, "ID_PORT", wxTextCtrl)->SetValue(wxString::Format(_T("%d"), server.GetPort())); > >- switch (server.GetProtocol()) >- { >- case SFTP: >- XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(_("SFTP")); >- break; >- case FTP: >- default: >- XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(_("FTP")); >- break; >- } >+ protocolName = CServer::GetProtocolName(server.GetProtocol()); >+ if (protocolName == _T("")) >+ CServer::GetProtocolName(FTP); >+ XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(protocolName); > > if (XRCCTRL(*this, "ID_CHARSET_CUSTOM", wxRadioButton)->GetValue()) > { >@@ -664,11 +663,10 @@ > XRCCTRL(*this, "ID_PORT", wxTextCtrl)->GetValue().ToULong(&port); > data->m_server.SetHost(XRCCTRL(*this, "ID_HOST", wxTextCtrl)->GetValue(), port); > >- wxString protocol = XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->GetStringSelection(); >- if (protocol == _("FTP")) >- data->m_server.SetProtocol(FTP); >- else if (protocol == _("SFTP")) >- data->m_server.SetProtocol(SFTP); >+ const wxString& protocolName = XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->GetStringSelection(); >+ const enum ServerProtocol protocol = CServer::GetProtocolFromName(protocolName); >+ if (protocol != UNKNOWN) >+ data->m_server.SetProtocol(protocol); > else > data->m_server.SetProtocol(FTP); > >@@ -863,16 +861,11 @@ > else > XRCCTRL(*this, "ID_PORT", wxTextCtrl)->SetValue(_T("")); > >- switch (data->m_server.GetProtocol()) >- { >- case SFTP: >- XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(_("SFTP")); >- break; >- case FTP: >- default: >- XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(_("FTP")); >- break; >- } >+ const wxString& protocolName = CServer::GetProtocolName(data->m_server.GetProtocol()); >+ if (protocolName != _T("")) >+ XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(protocolName); >+ else >+ XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(CServer::GetProtocolName(FTP)); > > XRCCTRL(*this, "ID_USER", wxTextCtrl)->Enable(data->m_server.GetLogonType() != ANONYMOUS); > XRCCTRL(*this, "ID_PASS", wxTextCtrl)->Enable(data->m_server.GetLogonType() == NORMAL || data->m_server.GetLogonType() == ACCOUNT);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 89290
:
100565
|
105298
|
105301
|
105306
|
105307
|
105309
|
105310
|
105332
|
106618
|
108241
|
108242
|
109941
|
109942
|
109946
|
109958
|
110743
|
114687
|
114695
|
115185
|
115187
|
119426
|
121212
|
123219
|
123703
|
125718
|
128417
|
130781
|
133155
|
133341
|
134093
|
135941
|
136034
|
136514
|
136515
|
137100
|
150692