Added parent window handle to the creation method
of the file transfer dialog.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@409 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/FTDialog.cxx b/vncviewer/FTDialog.cxx
index 423a1c8..ece35ae 100644
--- a/vncviewer/FTDialog.cxx
+++ b/vncviewer/FTDialog.cxx
@@ -52,7 +52,7 @@
 }
 
 bool
-FTDialog::createFTDialog()
+FTDialog::createFTDialog(HWND hwndParent)
 {
   if (m_hwndFTDialog != NULL) {
     ShowWindow(m_hwndFTDialog, SW_SHOW);
@@ -62,7 +62,7 @@
 
   m_hwndFTDialog = CreateDialogParam(m_hInstance, 
                                      MAKEINTRESOURCE(IDD_FILETRANSFER_DLG),
-                                     NULL, 
+                                     hwndParent, 
                                      (DLGPROC) FTDialogProc,
                                      (LONG) this);
   
@@ -277,6 +277,7 @@
   m_pRemoteLV->addItems(pFI);
   strcpy(m_szRemotePath, m_szRemotePathTmp);
   SetWindowText(m_hwndRemotePath, m_szRemotePath);
+  UpdateWindow(m_hwndFTDialog);
 }
 
 void 
diff --git a/vncviewer/FTDialog.h b/vncviewer/FTDialog.h
index 7c577ed..961b1a8 100644
--- a/vncviewer/FTDialog.h
+++ b/vncviewer/FTDialog.h
@@ -43,7 +43,7 @@
       FTDialog(HINSTANCE hInst, FileTransfer *pFT);
       ~FTDialog();
       
-      bool createFTDialog();
+      bool createFTDialog(HWND hwndParent);
       bool closeFTDialog();
       void destroyFTDialog();
       
diff --git a/vncviewer/FileTransfer.cxx b/vncviewer/FileTransfer.cxx
index 77ebe0a..8997ebc 100644
--- a/vncviewer/FileTransfer.cxx
+++ b/vncviewer/FileTransfer.cxx
@@ -58,11 +58,11 @@
 }
 
 bool 
-FileTransfer::show()
+FileTransfer::show(HWND hwndParent)
 {
   if (!m_bInitialized) return false;
 
-  m_bFTDlgShown = m_pFTDialog->createFTDialog();
+  m_bFTDlgShown = m_pFTDialog->createFTDialog(hwndParent);
   return m_bFTDlgShown;
 }
 
diff --git a/vncviewer/FileTransfer.h b/vncviewer/FileTransfer.h
index 6bf36c9..805c10e 100644
--- a/vncviewer/FileTransfer.h
+++ b/vncviewer/FileTransfer.h
@@ -45,7 +45,7 @@
 
       bool initialize(rdr::InStream *pIS, rdr::OutStream *pOS);
       bool processFTMsg(int type);
-      bool show();
+      bool show(HWND hwndParent);
 
       void requestFileList(char *pPath, int dest, bool bDirOnly);
 
diff --git a/vncviewer/cview.cxx b/vncviewer/cview.cxx
index 4701801..66dd501 100644
--- a/vncviewer/cview.cxx
+++ b/vncviewer/cview.cxx
@@ -686,7 +686,7 @@
       AboutDialog::instance.showDialog();
       return 0;
     case IDM_FILE_TRANSFER:
-      m_fileTransfer.show();
+      m_fileTransfer.show(getHandle());
       return 0;
     case IDM_CONN_SAVE_AS:
       return 0;
diff --git a/vncviewer/vncviewer.rc b/vncviewer/vncviewer.rc
index df6bf08..64a4d90 100644
--- a/vncviewer/vncviewer.rc
+++ b/vncviewer/vncviewer.rc
@@ -40,7 +40,7 @@
     PUSHBUTTON      "...",IDC_FTLOCALBROWSE,165,20,14,12
     PUSHBUTTON      "",IDC_FTLOCALUP,179,20,14,12,BS_ICON
     PUSHBUTTON      "",IDC_FTLOCALRELOAD,193,20,14,12,BS_ICON
-    EDITTEXT        IDC_EDIT2,323,20,155,12,ES_AUTOHSCROLL
+    EDITTEXT        IDC_FTREMOTEPATH,323,20,155,12,ES_AUTOHSCROLL
     CONTROL         "List2",IDC_FTREMOTELIST,"SysListView32",LVS_REPORT | 
                     LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | 
                     WS_TABSTOP,323,40,200,196