Index: src/interface/settings/optionspage_transfer.h
===================================================================
--- src/interface/settings/optionspage_transfer.h	(revision 3532)
+++ src/interface/settings/optionspage_transfer.h	(working copy)
@@ -8,6 +8,12 @@
 	virtual bool LoadPage();
 	virtual bool SavePage();
 	virtual bool Validate();
+
+// Added by Xishi Pan for #4993 - START
+protected:
+    DECLARE_EVENT_TABLE()
+    void OnBrowseDefaultDownloadDirectory(wxCommandEvent& event);
+// #4993 - END
 };
 
 #endif //__OPTIONSPAGE_TRANSFER_H__
Index: src/interface/settings/optionspage_transfer.cpp
===================================================================
--- src/interface/settings/optionspage_transfer.cpp	(revision 3532)
+++ src/interface/settings/optionspage_transfer.cpp	(working copy)
@@ -4,6 +4,11 @@
 #include "optionspage.h"
 #include "optionspage_transfer.h"
 
+BEGIN_EVENT_TABLE(COptionsPageTransfer, COptionsPage)
+EVT_BUTTON(XRCID("ID_BROWSEDEFDIR"), COptionsPageTransfer::OnBrowseDefaultDownloadDirectory)
+END_EVENT_TABLE()
+
+
 bool COptionsPageTransfer::LoadPage()
 {
 	bool failure = false;
@@ -39,6 +44,10 @@
 	wxString filtered = wxString::Format(_("The following character will be replaced: %s"), invalid.c_str());
 #endif
 	XRCCTRL(*this, "ID_REPLACED", wxStaticText)->SetLabel(filtered);
+	
+	// Added by Xishi Pan for #4993 - START
+	SetTextFromOption(XRCID("ID_DEFAULTDIR"), OPTION_DEFAULT_DOWNLOAD_DIRECTORY, failure);
+	// #4993 - END
 
 	return !failure;
 }
@@ -53,6 +62,10 @@
 	m_pOptions->SetOption(OPTION_SPEEDLIMIT_BURSTTOLERANCE, GetChoice(XRCID("ID_BURSTTOLERANCE")));
 	SetOptionFromText(XRCID("ID_REPLACE"), OPTION_INVALID_CHAR_REPLACE);
 	SetOptionFromCheck(XRCID("ID_ENABLE_REPLACE"), OPTION_INVALID_CHAR_REPLACE_ENABLE);
+	
+	// Added by Xishi Pan for #4993 - START
+	SetOptionFromText(XRCID("ID_DEFAULTDIR"), OPTION_DEFAULT_DOWNLOAD_DIRECTORY);
+	// #4993 - END
 
 	return true;
 }
@@ -103,3 +116,26 @@
 
 	return true;
 }
+
+// Added by Xishi Pan for #4993 - START
+void COptionsPageTransfer::OnBrowseDefaultDownloadDirectory(wxCommandEvent& event)
+{
+    // Get control handler
+    wxTextCtrl* pTextCtrl = XRCCTRL(*this, "ID_DEFAULTDIR", wxTextCtrl);
+    
+    // Select a folder for default download directory
+    const wxString& curDir = pTextCtrl->GetValue();
+    
+    // Open DirSelector
+    const wxString& dir = ::wxDirSelector(_("Default Download Directory"), curDir);
+    
+    // Pressed OK
+    if (!dir.empty())
+    {   
+        // Update setting
+        wxTextCtrl* pTextCtrl = XRCCTRL(*this, "ID_DEFAULTDIR", wxTextCtrl);
+                
+        pTextCtrl->ChangeValue(dir);
+    }
+}
+// #4993 - END
Index: src/interface/Mainfrm.cpp
===================================================================
--- src/interface/Mainfrm.cpp	(revision 3532)
+++ src/interface/Mainfrm.cpp	(working copy)
@@ -3393,6 +3393,29 @@
 	}
 
 	context_controls.pLocalViewHeader = new CLocalViewHeader(context_controls.pLocalSplitter, pState);
+	
+	// Added by Xishi Pan for #4993 - START
+	{
+    	wxString error;
+
+    	// Fetch setting
+    	const wxString& defaultDownloadDirectory = COptions::Get()->GetOption(OPTION_DEFAULT_DOWNLOAD_DIRECTORY);
+    	
+    	// Set Local Dir
+        if ((defaultDownloadDirectory != _T("")) && (!pState->SetLocalDir(defaultDownloadDirectory, &error)))
+        {
+            if (error != _T(""))
+            {
+                wxMessageBox(error, _("Failed to change default download directory"), wxICON_INFORMATION);
+            }
+            else
+            {
+                wxBell();
+            }
+        }
+    }
+	// #4993 - END
+	
 	if (COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_LOCAL))
 	{
 		context_controls.pLocalTreeViewPanel->SetHeader(context_controls.pLocalViewHeader);
Index: src/interface/Options.h
===================================================================
--- src/interface/Options.h	(revision 3532)
+++ src/interface/Options.h	(working copy)
@@ -79,6 +79,8 @@
 	OPTION_INVALID_CHAR_REPLACE_ENABLE,
 	OPTION_INVALID_CHAR_REPLACE,
 	OPTION_ALREADYCONNECTED_CHOICE,
+	
+	OPTION_DEFAULT_DOWNLOAD_DIRECTORY, // Added by Xish Pan for #4993
 
 	// Has to be last element
 	OPTIONS_NUM
Index: src/interface/resources/menus.xrc
===================================================================
--- src/interface/resources/menus.xrc	(revision 3532)
+++ src/interface/resources/menus.xrc	(working copy)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <resource version="2.3.0.1" xmlns="http://www.wxwindows.org/wxxrc">
   <object class="wxMenuBar" name="ID_MENUBAR">
     <object class="wxMenu">
Index: src/interface/resources/settings.xrc
===================================================================
--- src/interface/resources/settings.xrc	(revision 3532)
+++ src/interface/resources/settings.xrc	(working copy)
@@ -971,6 +971,62 @@
         </object>
         <flag>wxGROW</flag>
       </object>
+      <object class="sizeritem">
+        <option>1</option>
+        <flag>wxEXPAND</flag>
+        <border>5</border>
+        <object class="wxStaticBoxSizer">
+          <orient>wxVERTICAL</orient>
+          <label>General</label>
+          <object class="sizeritem">
+            <option>1</option>
+            <flag>wxEXPAND</flag>
+            <border>5</border>
+            <object class="wxFlexGridSizer">
+              <rows>2</rows>
+              <cols>2</cols>
+              <vgap>0</vgap>
+              <hgap>0</hgap>
+              <growablecols></growablecols>
+              <growablerows></growablerows>
+              <object class="sizeritem">
+                <option>1</option>
+                <flag>wxEXPAND</flag>
+                <border>5</border>
+                <object class="wxBoxSizer">
+                  <orient>wxHORIZONTAL</orient>
+                  <object class="sizeritem">
+                    <option>0</option>
+                    <flag>wxALL</flag>
+                    <border>5</border>
+                    <object class="wxStaticText" name="m_staticText108">
+                      <label>Default Download Directory:</label>
+                    </object>
+                  </object>
+                  <object class="sizeritem">
+                    <option>0</option>
+                    <flag>wxALL</flag>
+                    <border>5</border>
+                    <object class="wxTextCtrl" name="ID_DEFAULTDIR">
+                      <value></value>
+                      <maxlength>0</maxlength>
+                    </object>
+                  </object>
+                  <object class="sizeritem">
+                    <option>0</option>
+                    <flag>wxALL</flag>
+                    <border>5</border>
+                    <object class="wxButton" name="ID_BROWSEDEFDIR">
+                      <label>Browse</label>
+                      <default>0</default>
+                    </object>
+                  </object>
+                </object>
+              </object>
+            </object>
+          </object>
+        </object>
+      </object>
     </object>
   </object>
   <object class="wxPanel" name="ID_SETTINGS_FILETYPE">
@@ -2159,4 +2215,4 @@
       </object>
     </object>
   </object>
-</resource>
\ No newline at end of file
+</resource>
Index: src/interface/resources/toolbar.xrc
===================================================================
--- src/interface/resources/toolbar.xrc	(revision 3532)
+++ src/interface/resources/toolbar.xrc	(working copy)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <resource version="2.3.0.1" xmlns="http://www.wxwindows.org/wxxrc">
   <object class="wxToolBar" name="ID_TOOLBAR">
     <style>wxTB_FLAT|wxTB_DOCKABLE|wxTB_HORIZONTAL</style>
Index: src/interface/Options.cpp
===================================================================
--- src/interface/Options.cpp	(revision 3532)
+++ src/interface/Options.cpp	(working copy)
@@ -147,7 +147,8 @@
 	{ "Filteredit window size", string, _T(""), false },
 	{ "Enable invalid char filter", number, _T("1"), false },
 	{ "Invalid char replace", string, _T("_"), false },
-	{ "Already connected choice", number, _T("0"), false }
+	{ "Already connected choice", number, _T("0"), false },
+	{ "Default Download Directory", string, _T(""), false } // Added by Xishi Pan for #4993
 };
 
 struct t_default_option
