diff options
author | Dennis Syrovatsky <dennis@tightvnc.com> | 2005-11-23 05:23:50 +0000 |
---|---|---|
committer | Dennis Syrovatsky <dennis@tightvnc.com> | 2005-11-23 05:23:50 +0000 |
commit | 3f079e7eff79181a17ace419ebd405a76b3f005c (patch) | |
tree | 87d3f395eae54bb67e140d7a2062d390bfd24537 /vncviewer/FTDialog.cxx | |
parent | f7b2449ff01cd2c306702ab815b5b9539613f130 (diff) | |
download | tigervnc-3f079e7eff79181a17ace419ebd405a76b3f005c.tar.gz tigervnc-3f079e7eff79181a17ace419ebd405a76b3f005c.zip |
Added RBUTTON menu to the file transfer dialog.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@414 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/FTDialog.cxx')
-rw-r--r-- | vncviewer/FTDialog.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vncviewer/FTDialog.cxx b/vncviewer/FTDialog.cxx index dacce7bf..b27270da 100644 --- a/vncviewer/FTDialog.cxx +++ b/vncviewer/FTDialog.cxx @@ -222,6 +222,7 @@ FTDialog::FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) _this->onLocalItemActivate((LPNMITEMACTIVATE) lParam); return FALSE; case NM_RCLICK: + _this->onLocalRButton(); return FALSE; } break; @@ -239,6 +240,7 @@ FTDialog::FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) _this->onRemoteItemActivate((LPNMITEMACTIVATE) lParam); return FALSE; case NM_RCLICK: + _this->onRemoteRButton(); return FALSE; } break; @@ -367,6 +369,33 @@ FTDialog::onDownload() } +void +FTDialog::onLocalRButton() +{ + showFTMenu(1, 1, 1, 1); +} + +void +FTDialog::onRemoteRButton() +{ + showFTMenu(1, 1, 1, 1); +} + +void +FTDialog::showFTMenu(int copyBtnState, int renameBtnState, int deleteBtnState, int cancelBtnState) +{ + HMENU hMenu = LoadMenu(m_hInstance, MAKEINTRESOURCE(IDR_FTMENU)); + HMENU hFTMenu = GetSubMenu(hMenu, 0); + + SetMenuDefaultItem(hFTMenu, IDM_FTCOPY, FALSE); + + SetForegroundWindow(m_hwndFTDialog); + + POINT cursorPosition; + GetCursorPos(&cursorPosition); + TrackPopupMenu(hFTMenu, 0, cursorPosition.x, cursorPosition.y, 0, m_hwndFTDialog, 0); +} + void FTDialog::setIcon(int dest, int idIcon) { |