Ticket #2361: ShowConnectedServerInTitle.patch

File ShowConnectedServerInTitle.patch, 1.0 KB (added by eyebex, 10 years ago)
  • FileZilla

     
    12091209
    12101210STRINGTABLE
    12111211BEGIN
    1212     IDR_MAINFRAME           "FileZilla server"
     1212    IDR_MAINFRAME           "FileZilla Server"
    12131213END
    12141214
    12151215STRINGTABLE
  • MainFrm.cpp

     
    11161116        delete m_pAdminSocket;
    11171117        m_pAdminSocket = NULL;
    11181118        SetIcon();
     1119
     1120        CString title;
     1121        title.LoadString(IDR_MAINFRAME);
     1122        SetWindowText(title + _T(" (disconnected)"));
    11191123    }
    11201124    m_nEdit = 0;
    11211125
     
    12881292void CMainFrame::OnAdminInterfaceConnected()
    12891293{
    12901294    m_nReconnectCount = 0;
     1295
     1296    CString title;
     1297    title.LoadString(IDR_MAINFRAME);
     1298    CString ip;
     1299    UINT port;
     1300    if (m_pAdminSocket->GetPeerName(ip, port))
     1301    {
     1302        SetWindowText(title + _T(" (") + ip + _T(")"));
     1303    }
    12911304}
    12921305
    12931306void CMainFrame::OnAdminInterfaceClosed()