Ticket #10829: Option to copy URL with password_3.patch

File Option to copy URL with password_3.patch, 22.0 KB (added by Julien Blitte, 8 years ago)

Patch - Option to copy URL with password (compiles, full works and run without error)

  • src/engine/ControlSocket.cpp

     
    77#include "proxy.h"
    88#include "servercapabilities.h"
    99#include "sizeformatting_base.h"
     10#include "server.h"
    1011
    1112#include <libfilezilla/event_loop.hpp>
    1213#include <libfilezilla/iputils.hpp>
     
    10441045
    10451046    const int proxy_type = engine_.GetOptions().GetOptionVal(OPTION_PROXY_TYPE);
    10461047    if (proxy_type > CProxySocket::unknown && proxy_type < CProxySocket::proxytype_count && !m_pCurrentServer->GetBypassProxy()) {
    1047         LogMessage(MessageType::Status, _("Connecting to %s through %s proxy"), m_pCurrentServer->FormatHost(), CProxySocket::Name(static_cast<CProxySocket::ProxyType>(proxy_type)));
     1048        LogMessage(MessageType::Status, _("Connecting to %s through %s proxy"), m_pCurrentServer->FormatServer(SERVER_HOST_PORT), CProxySocket::Name(static_cast<CProxySocket::ProxyType>(proxy_type)));
    10481049
    10491050        host = engine_.GetOptions().GetOption(OPTION_PROXY_HOST);
    10501051        port = engine_.GetOptions().GetOptionVal(OPTION_PROXY_PORT);
  • src/engine/ftpcontrolsocket.cpp

     
    1111#include "tlssocket.h"
    1212#include "transfersocket.h"
    1313#include "proxy.h"
     14#include "server.h"
    1415
    1516#include <libfilezilla/file.hpp>
    1617#include <libfilezilla/iputils.hpp>
     
    526527            pData->loginSequence.push_back(cmd);
    527528        }
    528529        // User@host
    529         t_loginCommand cmd = {false, false, loginCommandType::user, wxString::Format(_T("USER %s@%s"), server.GetUser(), server.FormatHost())};
     530        t_loginCommand cmd = {false, false, loginCommandType::user, wxString::Format(_T("USER %s@%s"), server.GetUser(), server.FormatServer(SERVER_HOST_PORT))};
    530531        pData->loginSequence.push_back(cmd);
    531532
    532533        // Password
     
    558559        // Site or Open
    559560        t_loginCommand cmd = {false, false, loginCommandType::user, _T("")};
    560561        if (pData->ftp_proxy_type == 2)
    561             cmd.command = _T("SITE ") + server.FormatHost();
     562            cmd.command = _T("SITE ") + server.FormatServer(SERVER_HOST_PORT);
    562563        else
    563             cmd.command = _T("OPEN ") + server.FormatHost();
     564            cmd.command = _T("OPEN ") + server.FormatServer(SERVER_HOST_PORT);
    564565        pData->loginSequence.push_back(cmd);
    565566
    566567        // User
     
    584585    else if (pData->ftp_proxy_type == 4) {
    585586        wxString proxyUser = engine_.GetOptions().GetOption(OPTION_FTP_PROXY_USER);
    586587        wxString proxyPass = engine_.GetOptions().GetOption(OPTION_FTP_PROXY_PASS);
    587         wxString host = server.FormatHost();
     588        wxString host = server.FormatServer(SERVER_HOST_PORT);
    588589        wxString user = server.GetUser();
    589590        wxString account = server.GetAccount();
    590591        proxyUser.Replace(_T("%"), _T("%%"));
     
    42444245            return FZ_REPLY_ERROR;
    42454246        }
    42464247
    4247         LogMessage(MessageType::Status, _("Connecting to %s through %s proxy"), server.FormatHost(), _T("FTP")); // @translator: Connecting to ftp.example.com through SOCKS5 proxy
     4248        LogMessage(MessageType::Status, _("Connecting to %s through %s proxy"), server.FormatServer(SERVER_HOST_PORT), _T("FTP")); // @translator: Connecting to ftp.example.com through SOCKS5 proxy
    42484249    }
    42494250    else {
    42504251        pData->ftp_proxy_type = 0;
  • src/engine/httpcontrolsocket.cpp

     
    343343    m_pCurOpData = pData;
    344344    m_pHttpOpData = pData;
    345345
    346     m_current_uri = wxURI(m_pCurrentServer->FormatServer() + pData->remotePath.FormatFilename(pData->remoteFile));
     346    m_current_uri = wxURI(m_pCurrentServer->FormatServer(SERVER_USER_HOST_PORT) + pData->remotePath.FormatFilename(pData->remoteFile));
    347347
    348348    if (!localFile.empty()) {
    349349        pData->localFileSize = fz::local_filesys::get_size(fz::to_native(pData->localFile));
  • src/engine/server.cpp

     
    4747    return protocolInfos[i];
    4848}
    4949
     50//TODO: move this to a new file with a proper URLEncode function, confer file_utils.cpp
     51static const bool needURLEncode(const wxString& string)
     52{
     53    const wxWX2MBbuf utf8 = string.mb_str(wxConvUTF8);
     54
     55    if (!utf8)
     56        return true;
     57
     58    const char* p = utf8;
     59    while (*p)
     60    {
     61        // RFC3986
     62        const unsigned char c = (unsigned char)*p++;
     63        if (! ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') ||
     64            c == '-' || c == '.' || c == '_' || c == '~') )
     65        {
     66            return true;
     67        }
     68    }
     69
     70    return false;
     71}
     72
    5073CServer::CServer()
    5174{
    5275    Initialize();
     
    637660    return m_maximumMultipleConnections;
    638661}
    639662
    640 wxString CServer::FormatHost(bool always_omit_port /*=false*/) const
     663wxString CServer::FormatServer(enum FormatServerType formatType) const
    641664{
    642     wxString host = m_host;
     665    const t_protocolInfo& info = GetProtocolInfo(m_protocol);
     666    wxString server = m_host;
    643667
    644     if (host.Find(':') != -1)
    645         host = _T("[") + host + _T("]");
     668    if (server.Find(':') != -1)
     669        server = _T("[") + server + _T("]");
    646670
    647     if (!always_omit_port)
     671    if (formatType == SERVER_HOST_ONLY)
     672        return server;
     673   
     674    if (m_port != GetDefaultPort(m_protocol))
     675        server += wxString::Format(_T(":%d"), m_port);
     676
     677    if (formatType == SERVER_HOST_PORT)
     678        return server;
     679       
     680    if (m_logonType != ANONYMOUS)
    648681    {
    649         if (m_port != GetDefaultPort(m_protocol))
    650             host += wxString::Format(_T(":%d"), m_port);
     682        if (formatType == SERVER_URL_PASSWORD && !needURLEncode(GetPass()))
     683            server = GetUser() + _T(":") + GetPass() + _T("@") + server;
     684        else
     685            server = GetUser() + _T("@") + server;
    651686    }
    652 
    653     return host;
    654 }
    655 
    656 wxString CServer::FormatServer(const bool always_include_prefix /*=false*/) const
    657 {
    658     wxString server = FormatHost();
    659 
    660     if (m_logonType != ANONYMOUS)
    661         server = GetUser() + _T("@") + server;
    662 
    663     const t_protocolInfo& info = GetProtocolInfo(m_protocol);
     687   
     688    if (formatType == SERVER_USER_HOST_PORT)
     689    {
     690        if (info.alwaysShowPrefix || m_port != info.defaultPort)
     691            formatType = SERVER_URL;
     692        else
     693            return server;
     694    }
     695       
    664696    if (!info.prefix.empty())
    665697    {
    666         if (always_include_prefix || info.alwaysShowPrefix)
    667             server = info.prefix + _T("://") + server;
    668         else if (m_port != info.defaultPort)
    669             server = info.prefix + _T("://") + server;
     698        server = info.prefix + _T("://") + server;
    670699    }
    671700
    672701    return server;
  • src/engine/sftpcontrolsocket.cpp

     
    355355
    356356int CSftpControlSocket::Connect(const CServer &server)
    357357{
    358     LogMessage(MessageType::Status, _("Connecting to %s..."), server.FormatHost());
     358    LogMessage(MessageType::Status, _("Connecting to %s..."), server.FormatServer(SERVER_HOST_PORT));
    359359    SetWait(true);
    360360
    361361    m_sftpEncryptionDetails = CSftpEncryptionNotification();
  • src/include/server.h

     
    5353    MODE_PASSIVE
    5454};
    5555
     56enum FormatServerType
     57{
     58    SERVER_HOST_ONLY,
     59    SERVER_HOST_PORT,
     60    SERVER_USER_HOST_PORT,
     61    SERVER_URL,
     62    SERVER_URL_PASSWORD
     63};
     64
     65
    5666enum CharsetEncoding
    5767{
    5868    ENCODING_AUTO,
     
    111121    void SetPasvMode(PasvMode pasvMode);
    112122    void MaximumMultipleConnections(int maximum);
    113123
    114     wxString FormatHost(bool always_omit_port = false) const;
    115     wxString FormatServer(const bool always_include_prefix = false) const;
     124    wxString FormatServer(enum FormatServerType formatType) const;
    116125
    117126    bool SetEncodingType(CharsetEncoding type, const wxString& encoding = wxString());
    118127    bool SetCustomEncoding(const wxString& encoding);
  • src/interface/edithandler.cpp

     
    88#include "queue.h"
    99#include "window_state_manager.h"
    1010#include "xrc_helper.h"
     11#include "server.h"
    1112
    1213#include <libfilezilla/local_filesys.hpp>
    1314
     
    688689int CEditHandler::DisplayChangeNotification(CEditHandler::fileType type, std::list<CEditHandler::t_fileData>::const_iterator iter, bool& remove)
    689690{
    690691    CChangedFileDialog dlg;
     692    enum FormatServerType serverInfo;
     693
    691694    if (!dlg.Load(wxTheApp->GetTopWindow(), _T("ID_CHANGEDFILE")))
    692695        return -1;
    693696    if (type == remote)
     
    716719        else
    717720            dlg.SetChildLabel(XRCID("ID_OPENEDAS"), file);
    718721    }
    719     dlg.SetChildLabel(XRCID("ID_SERVER"), iter->server.FormatServer());
     722    serverInfo = SERVER_USER_HOST_PORT;
     723
     724    dlg.SetChildLabel(XRCID("ID_SERVER"), iter->server.FormatServer(serverInfo));
    720725    dlg.SetChildLabel(XRCID("ID_REMOTEPATH"), iter->remotePath.GetPath());
    721726
    722727    dlg.GetSizer()->Fit(&dlg);
     
    11171122                pListCtrl->SetItem(i, COLUMN_STATUS, _("Unknown"));
    11181123                break;
    11191124            }
    1120             pListCtrl->SetItem(i, COLUMN_REMOTEPATH, iter->server.FormatServer() + iter->remotePath.GetPath());
     1125            pListCtrl->SetItem(i, COLUMN_REMOTEPATH, iter->server.FormatServer(SERVER_USER_HOST_PORT) + iter->remotePath.GetPath());
    11211126            CEditHandler::t_fileData* pData = new CEditHandler::t_fileData(*iter);
    11221127            pListCtrl->SetItemPtrData(i, (wxUIntPtr)pData);
    11231128        }
     
    11451150                pListCtrl->SetItem(i, COLUMN_STATUS, _("Unknown"));
    11461151                break;
    11471152            }
    1148             pListCtrl->SetItem(i, COLUMN_REMOTEPATH, iter->server.FormatServer() + iter->remotePath.GetPath());
     1153            pListCtrl->SetItem(i, COLUMN_REMOTEPATH, iter->server.FormatServer(SERVER_USER_HOST_PORT) + iter->remotePath.GetPath());
    11491154            CEditHandler::t_fileData* pData = new CEditHandler::t_fileData(*iter);
    11501155            pListCtrl->SetItemPtrData(i, (wxUIntPtr)pData);
    11511156        }
  • src/interface/file_utils.cpp

     
    2020    if (!utf8)
    2121        return wxString();
    2222
     23    //TODO: create a standalone URLEncode function
    2324    const char* p = utf8;
    2425    while (*p)
    2526    {
  • src/interface/loginmanager.cpp

     
    33
    44#include "dialogex.h"
    55#include "filezillaapp.h"
     6#include "server.h"
    67
    78#include <algorithm>
    89
     
    5960        pwdDlg.GetSizer()->Show(XRCCTRL(pwdDlg, "ID_REMEMBER", wxCheckBox), canRemember, true);
    6061        XRCCTRL(pwdDlg, "ID_CHALLENGE", wxTextCtrl)->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
    6162    }
    62     XRCCTRL(pwdDlg, "ID_HOST", wxStaticText)->SetLabel(server.FormatHost());
     63    XRCCTRL(pwdDlg, "ID_HOST", wxStaticText)->SetLabel(server.FormatServer(SERVER_HOST_PORT));
    6364
    6465    if (server.GetUser().empty()) {
    6566        pwdDlg.SetTitle(_("Enter username and password"));
  • src/interface/Mainfrm.cpp

     
    830830        CSpeedLimitsDialog dlg;
    831831        dlg.Run(this);
    832832    }
     833    else if (event.GetId() == XRCID("ID_MENU_EDIT_URLPASSWORD")) {
     834        if (event.IsChecked()) {
     835            if (wxMessageBoxEx(_("This option will enable the ability to copy password in clear in the clipboard.\nThis is insecure, are you sure you want to continue?"), _("Include password in URL"), wxICON_WARNING | wxYES_NO) == wxNO)
     836                m_pMenuBar->Check(XRCID("ID_MENU_EDIT_URLPASSWORD"), false);
     837            else
     838                COptions::Get()->SetOption(OPTION_PASSWORD_IN_URL, 1);
     839        }
     840        else
     841            COptions::Get()->SetOption(OPTION_PASSWORD_IN_URL, 0);
     842    }
    833843    else if (event.GetId() == m_comparisonToggleAcceleratorId) {
    834844        CState* pState = CContextManager::Get()->GetCurrentContext();
    835845        if (!pState)
  • src/interface/manual_transfer.cpp

     
    77#include "queue.h"
    88#include "QueueView.h"
    99#include "xrc_helper.h"
     10#include "server.h"
    1011
    1112#include <libfilezilla/local_filesys.hpp>
    1213
     
    159160{
    160161    if (m_pServer)
    161162    {
    162         XRCCTRL(*this, "ID_HOST", wxTextCtrl)->ChangeValue(m_pServer->FormatHost(true));
     163        XRCCTRL(*this, "ID_HOST", wxTextCtrl)->ChangeValue(m_pServer->FormatServer(SERVER_HOST_ONLY));
    163164        unsigned int port = m_pServer->GetPort();
    164165
    165166        if (port != CServer::GetDefaultPort(m_pServer->GetProtocol()))
     
    461462        return false;
    462463    }
    463464
    464     xrc_call(*this, "ID_HOST", &wxTextCtrl::ChangeValue, server.FormatHost(true));
     465    xrc_call(*this, "ID_HOST", &wxTextCtrl::ChangeValue, server.FormatServer(SERVER_HOST_ONLY));
    465466    xrc_call(*this, "ID_PORT", &wxTextCtrl::ChangeValue, wxString::Format(_T("%d"), server.GetPort()));
    466467
    467468    protocolName = CServer::GetProtocolName(server.GetProtocol());
  • src/interface/menu_bar.cpp

     
    8686    menubar->Check(XRCID("ID_VIEW_REMOTETREE"), COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_REMOTE) != 0);
    8787    menubar->Check(XRCID("ID_MENU_VIEW_FILELISTSTATUSBAR"), COptions::Get()->GetOptionVal(OPTION_FILELIST_STATUSBAR) != 0);
    8888    menubar->Check(XRCID("ID_MENU_TRANSFER_PRESERVETIMES"), COptions::Get()->GetOptionVal(OPTION_PRESERVE_TIMESTAMPS) != 0);
    89 
     89    menubar->Check(XRCID("ID_MENU_EDIT_URLPASSWORD"), COptions::Get()->GetOptionVal(OPTION_PASSWORD_IN_URL) != 0);
     90   
    9091    switch (COptions::Get()->GetOptionVal(OPTION_ASCIIBINARY))
    9192    {
    9293    case 1:
     
    373374    if (options.test(OPTION_PRESERVE_TIMESTAMPS)) {
    374375        Check(XRCID("ID_MENU_TRANSFER_PRESERVETIMES"), COptions::Get()->GetOptionVal(OPTION_PRESERVE_TIMESTAMPS) != 0);
    375376    }
     377    if (options.test(OPTION_PASSWORD_IN_URL)) {
     378        Check(XRCID("ID_MENU_EDIT_URLPASSWORD"), COptions::Get()->GetOptionVal(OPTION_PASSWORD_IN_URL) != 0);
     379    }
    376380    if (options.test(OPTION_SHOW_TREE_LOCAL)) {
    377381        Check(XRCID("ID_VIEW_LOCALTREE"), COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_LOCAL) != 0);
    378382    }
  • src/interface/Options.cpp

     
    194194    { "Persistent Choices", number, _T("0"), normal },
    195195    { "Queue completion action", number, _T("1"), normal },
    196196    { "Queue completion command", string, _T(""), normal },
     197    { "Include passwords in URL", number, _T("0"), normal },
    197198
    198199    // Default/internal options
    199200    { "Config Location", string, _T(""), default_only },
  • src/interface/Options.h

     
    9898    OPTION_PERSISTENT_CHOICES,
    9999    OPTION_QUEUE_COMPLETION_ACTION,
    100100    OPTION_QUEUE_COMPLETION_COMMAND,
     101    OPTION_PASSWORD_IN_URL,
    101102
    102103    // Default/internal options
    103104    OPTION_DEFAULT_SETTINGSDIR, // guaranteed to be (back)slash-terminated
  • src/interface/queue.cpp

     
    66#include "sizeformatting.h"
    77#include "timeformatting.h"
    88#include "themeprovider.h"
     9#include "server.h"
    910
    1011CQueueItem::CQueueItem(CQueueItem* parent)
    1112    : m_parent(parent)
     
    391392
    392393wxString CServerItem::GetName() const
    393394{
    394     return m_server.FormatServer();
     395    return m_server.FormatServer(SERVER_USER_HOST_PORT);
    395396}
    396397
    397398void CServerItem::AddChild(CQueueItem* pItem)
  • src/interface/quickconnectbar.cpp

     
    77#include "loginmanager.h"
    88#include "Mainfrm.h"
    99#include "asksavepassworddialog.h"
     10#include "server.h"
    1011
    1112BEGIN_EVENT_TABLE(CQuickconnectBar, wxPanel)
    1213EVT_BUTTON(XRCID("ID_QUICKCONNECT_OK"), CQuickconnectBar::OnQuickconnect)
     
    8687        return;
    8788    }
    8889
    89     host = server.FormatHost(true);
     90    host = server.FormatServer(SERVER_HOST_ONLY);
    9091    ServerProtocol protocol = server.GetProtocol();
    9192    switch (protocol)
    9293    {
     
    159160            iter != m_recentServers.end();
    160161            ++iter, ++i)
    161162        {
    162             wxString name(iter->FormatServer());
     163            wxString name(iter->FormatServer(SERVER_USER_HOST_PORT));
    163164            name.Replace(_T("&"), _T("&&"));
    164165            pMenu->Append(10 + i, name);
    165166        }
  • src/interface/RemoteListView.cpp

     
    2121#include <wx/clipbrd.h>
    2222#include "sizeformatting.h"
    2323#include "timeformatting.h"
     24#include "server.h"
    2425#ifdef __WXMSW__
    2526#include "shellapi.h"
    2627#include "commctrl.h"
     
    25232524    }
    25242525
    25252526    const CServerPath& path = m_pDirectoryListing->path;
    2526     const wxString server = pServer->FormatServer(true);
     2527
     2528    wxString server;
     2529    if (COptions::Get()->GetOptionVal(OPTION_PASSWORD_IN_URL) != 0)
     2530        server = pServer->FormatServer(SERVER_URL_PASSWORD);
     2531    else
     2532        server = pServer->FormatServer(SERVER_URL);
     2533
    25272534    if (selected_item_list.size() == 1)
    25282535    {
    25292536        wxString url = server;
     
    25302537        url += path.FormatFilename(selected_item_list.front().name, false);
    25312538
    25322539        // Poor mans URLencode
     2540        // TODO: use a proper URLEncode function, confer file_utils.cpp
    25332541        url.Replace(_T(" "), _T("%20"));
    25342542
    25352543        wxTheClipboard->SetData(new wxURLDataObject(url));
     
    25492557        }
    25502558
    25512559        // Poor mans URLencode
     2560        // TODO: use a proper URLEncode function, confer file_utils.cpp
    25522561        urls.Replace(_T(" "), _T("%20"));
    25532562
    25542563        wxTheClipboard->SetData(new wxTextDataObject(urls));
  • src/interface/RemoteTreeView.cpp

     
    1313#include "QueueView.h"
    1414#include "themeprovider.h"
    1515#include "Options.h"
     16#include "server.h"
    1617
    1718#include <algorithm>
    1819
     
    13821383        return;
    13831384    }
    13841385
    1385     wxString url = pServer->FormatServer(true);
     1386    wxString url;
     1387    if (COptions::Get()->GetOptionVal(OPTION_PASSWORD_IN_URL) != 0)
     1388        url = pServer->FormatServer(SERVER_URL_PASSWORD);
     1389    else
     1390        url = pServer->FormatServer(SERVER_URL);
     1391       
    13861392    url += path.GetPath();
    13871393
    13881394    // Poor mans URLencode
     1395    // TODO: use a proper URLEncode function, confer file_utils.cpp
    13891396    url.Replace(_T(" "), _T("%20"));
    13901397
    13911398    wxTheClipboard->SetData(new wxURLDataObject(url));
  • src/interface/resources/xrc/menus.xrc

     
    4949      <object class="wxMenuItem" name="ID_MENU_EDIT_CLEARPRIVATEDATA">
    5050        <label>&amp;Clear private data...</label>
    5151      </object>
     52      <object class="wxMenuItem" name="ID_MENU_EDIT_URLPASSWORD">
     53        <label>Show &amp;password in URL...</label>
     54        <checkable>1</checkable>
     55      </object>
    5256      <object class="separator"/>
    5357      <object class="wxMenuItem" name="wxID_PREFERENCES">
    5458        <label>&amp;Settings...</label>
  • src/interface/sitemanager_dialog.cpp

     
    1414#include "xmlfunctions.h"
    1515#include "fzputtygen_interface.h"
    1616#include "xrc_helper.h"
     17#include "server.h"
    1718
    1819#include <wx/dcclient.h>
    1920#include <wx/dnd.h>
     
    10001001            return false;
    10011002        }
    10021003
    1003         XRCCTRL(*this, "ID_HOST", wxTextCtrl)->ChangeValue(server.FormatHost(true));
     1004        XRCCTRL(*this, "ID_HOST", wxTextCtrl)->ChangeValue(server.FormatServer(SERVER_HOST_ONLY));
    10041005        if (server.GetPort() != CServer::GetDefaultPort(server.GetProtocol())) {
    10051006            XRCCTRL(*this, "ID_PORT", wxTextCtrl)->ChangeValue(wxString::Format(_T("%d"), server.GetPort()));
    10061007        }
     
    16231624        xrc_call(*this, "ID_CONNECT", &wxButton::Enable, true);
    16241625
    16251626        xrc_call(*this, "ID_HOST", &wxWindow::Enable, !predefined);
    1626         xrc_call(*this, "ID_HOST", &wxTextCtrl::ChangeValue, site_data->m_server.FormatHost(true));
     1627        xrc_call(*this, "ID_HOST", &wxTextCtrl::ChangeValue, site_data->m_server.FormatServer(SERVER_HOST_ONLY));
    16271628        unsigned int port = site_data->m_server.GetPort();
    16281629
    16291630        if (port != CServer::GetDefaultPort(site_data->m_server.GetProtocol()))
  • src/interface/state.cpp

     
    1010#include "remote_recursive_operation.h"
    1111#include "listingcomparison.h"
    1212#include "xrc_helper.h"
     13#include "server.h"
    1314
    1415#include <libfilezilla/local_filesys.hpp>
    1516
     
    469470
    470471        const wxString& name = server->GetName();
    471472        if (!name.empty())
    472             m_title = name + _T(" - ") + server->FormatServer();
     473            m_title = name + _T(" - ") + server->FormatServer(SERVER_USER_HOST_PORT);
    473474        else
    474             m_title = server->FormatServer();
     475            m_title = server->FormatServer(SERVER_USER_HOST_PORT);
    475476    }
    476477    else {
    477478        m_pServer = 0;
  • src/interface/statuslinectrl.cpp

     
    44#include <wx/dcbuffer.h>
    55#include "Options.h"
    66#include "sizeformatting.h"
     7#include "server.h"
    78
    89#include <algorithm>
    910
     
    240241        m_statusText = _("Waiting for transfer to be cancelled");
    241242        break;
    242243    case t_EngineData::connect:
    243         m_statusText = wxString::Format(_("Connecting to %s"), m_pEngineData->lastServer.FormatServer());
     244        m_statusText = wxString::Format(_("Connecting to %s"), m_pEngineData->lastServer.FormatServer(SERVER_USER_HOST_PORT));
    244245        break;
    245246    default:
    246247        m_statusText = _("Transferring");