Tommy 碎碎念

Tommy Wu's blog

« 上一篇 | 下一篇 »

在 FileZilla3 的視窗標題顯示連線的伺服器
post by tommy @ 24 九月, 2007 14:02

由於公司內有好幾台伺服器的常用路徑都一樣, 所以在使用 FileZilla 時, 常常忘了同前連線的是那一個伺服器, 就想到是否可以把目前連線的伺服器給顯示在程式的標題上頭, 也因此就產生的這樣的一個 patch 了.這個 patch 如下:

diff -Nur Filezilla3/src/interface/Mainfrm.cpp Filezilla3.patch/src/interface/Mainfrm.cpp
--- Filezilla3/src/interface/Mainfrm.cpp Mon Sep 24 21:49:26 2007
+++ Filezilla3.patch/src/interface/Mainfrm.cpp Mon Sep 24 21:49:58 2007
@@ -911,6 +911,8 @@
return;
}
 
+ SetLabel(_T("FileZilla"));
+
CServer server;
event.Enable(COptions::Get()->GetLastServer(server));
}
@@ -930,6 +932,8 @@
return;
}
 
+ SetLabel(_T("FileZilla - ") + server.FormatServer());
+
CServerPath path;
path.SetSafePath(COptions::Get()->GetOption(OPTION_LASTSERVERPATH));
m_pState->Connect(server, false, path);
@@ -1455,6 +1459,8 @@
if (!CLoginManager::Get().GetPassword(pData->m_server, false, pData->m_name))
return;
}
+
+ SetLabel(_T("FileZilla - ") + pData->m_server.FormatServer());
 
m_pState->Connect(pData->m_server, true, pData->m_remoteDir);
 
diff -Nur Filezilla3/src/interface/quickconnectbar.cpp Filezilla3.patch/src/interface/quickconnectbar.cpp
--- Filezilla3/src/interface/quickconnectbar.cpp Mon Sep 24 21:49:26 2007
+++ Filezilla3.patch/src/interface/quickconnectbar.cpp Mon Sep 24 21:56:46 2007
@@ -108,6 +108,9 @@
return;
}
 
+ if (GetParent() != NULL)
+ GetParent()->SetLabel(_T("FileZilla - ") + server.FormatServer());
+
if (!m_pState->Connect(server, true))
return;

Patch 可以由這兒抓取: http://www.teatime.com.tw/~tommy/mypatch/filezilla3_title_show_server.patch
製作出來的 Windows 執行檔可以由這兒抓: http://www.teatime.com.tw/~tommy/files/filezilla/filezilla301.7z   


2007/09/24: 

加上對於 QuickConnect 的處理. 

 

Del.icio.us Furl HEMiDEMi Technorati MyShare
迴響
暱稱:
標題:
個人網頁:
電子郵件:
authimage

迴響

  

Bad Behavior 已經阻擋了 48 個過去 7 天試圖闖關的垃圾迴響與引用。
Power by LifeType. Template design by JamesHuang. Valid XHTML and CSS