From 1671ec08e6d19b72e910bc2e61dcf974a8472586 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 13 Apr 2013 07:59:55 +0000 Subject: removed debugging popup git-svn-id: http://svn.miranda-ng.org/main/trunk@4437 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AvatarHistory/src/AvatarDlg.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'plugins/AvatarHistory') diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index ffe177923d..6bf53acbf1 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -221,19 +221,15 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l int ret = TrackPopupMenu(submenu, TPM_TOPALIGN|TPM_LEFTALIGN|TPM_RIGHTBUTTON|TPM_RETURNCMD, p.x, p.y, 0, hwndList, NULL); DestroyMenu(menu); + ListEntry *le = (ListEntry*) SendMessage(hwndList, LB_GETITEMDATA, pos, 0); + HANDLE hContact = (HANDLE) GetWindowLongPtr(hwnd, GWLP_USERDATA); switch(ret) { case ID_AVATARLISTPOPUP_SAVEAS: - { - HANDLE hContact = (HANDLE) GetWindowLongPtr(hwnd, GWLP_USERDATA); - ListEntry *le = (ListEntry*) SendMessage(hwndList, LB_GETITEMDATA, pos, 0); - ShowSaveDialog(hwnd, le->filename, hContact); - } + ShowSaveDialog(hwnd, le->filename, hContact); break; case ID_AVATARLISTPOPUP_DELETE: { - ListEntry *le = (ListEntry*) SendMessage(hwndList, LB_GETITEMDATA, pos, 0); - BOOL blDelete; if (le->hDbEvent) @@ -244,8 +240,6 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l TranslateT("Delete avatar log?"), MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2|MB_SETFOREGROUND|MB_TOPMOST) == IDYES; if (blDelete) { - HANDLE hContact = (HANDLE) GetWindowLongPtr(hwnd, GWLP_USERDATA); - if (le->hDbEvent) db_event_delete(hContact, le->hDbEvent); else @@ -269,8 +263,6 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l break; case ID_AVATARLISTPOPUP_DELETE_BOTH: - ListEntry *le = (ListEntry*) SendMessage(hwndList, LB_GETITEMDATA, pos, 0); - BOOL blDelete; if (le->hDbEvent) @@ -281,8 +273,6 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l TranslateT("Delete avatar?"), MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2|MB_SETFOREGROUND|MB_TOPMOST) == IDYES; if (blDelete) { - HANDLE hContact = (HANDLE) GetWindowLongPtr(hwnd, GWLP_USERDATA); - DeleteFile(le->filename); if (le->hDbEvent) @@ -391,7 +381,6 @@ int FillAvatarListFromFiles(HWND list, HANDLE hContact) GetContactFolder(dir, hContact); mir_sntprintf(path, MAX_PATH, _T("%s\\*.*"), dir); - ShowPopup(hContact,_T("look sc"),path); HANDLE hFind = FindFirstFile(path, &finddata); if (hFind == INVALID_HANDLE_VALUE) @@ -439,7 +428,7 @@ int FillAvatarListFromFolder(HWND list, HANDLE hContact) SendMessage(list, LB_SETCURSEL, max_pos, 0); // Set to first item return 0; } - + int FillAvatarListFromDB(HWND list, HANDLE hContact) { int max_pos = 0; -- cgit v1.2.3