diff options
author | wishmaster51@gmail.com <wishmaster51@gmail.com@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2012-05-11 19:07:02 +0000 |
---|---|---|
committer | wishmaster51@gmail.com <wishmaster51@gmail.com@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2012-05-11 19:07:02 +0000 |
commit | 204ac9f4649859b583dffc2588abbd0a736656fd (patch) | |
tree | cabb9ba88658b1a22538b5b62bf6fb1e9244dede | |
parent | d99bb5efdfe347e690012bdbb4ff382271508994 (diff) |
-Show contact display name in save dialog
-Added hidden debug setting:
Add BYTE "Debug" in "AvatarHistory" module to show debug popups.
ATTENTION: This is only recommended for advanced users to find problems,
in normal usage they tend to become annoying
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@251 c086bb3d-8645-0410-b8da-73a8550f86e7
-rw-r--r-- | Plugins/avatarhistory/AvatarDlg.cpp | 11 | ||||
-rw-r--r-- | Plugins/avatarhistory/AvatarHistory.cpp | 5 | ||||
-rw-r--r-- | Plugins/avatarhistory/popup.cpp | 8 | ||||
-rw-r--r-- | Plugins/avatarhistory/popup.h | 1 |
4 files changed, 20 insertions, 5 deletions
diff --git a/Plugins/avatarhistory/AvatarDlg.cpp b/Plugins/avatarhistory/AvatarDlg.cpp index 10e64b3..4abe154 100644 --- a/Plugins/avatarhistory/AvatarDlg.cpp +++ b/Plugins/avatarhistory/AvatarDlg.cpp @@ -589,6 +589,17 @@ int ShowSaveDialog(HWND hwnd, TCHAR* fn, HANDLE hContact) lstrcpyn(file, _tcsrchr(fn, '\\')+1, sizeof(file));
ofn.lpstrFile = file;
+ TCHAR *displayName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR);
+ if(displayName)
+ {
+ TCHAR title[MAX_PATH];
+ mir_sntprintf(title,sizeof(title),TranslateT("Save Avatar for %s"),displayName);
+ ofn.lpstrTitle = title;
+ }
+ else
+ {
+ ofn.lpstrTitle = TranslateT("Save Avatar");
+ }
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_DONTADDTORECENT;
ofn.lpstrDefExt = _tcsrchr(fn, '.')+1;
diff --git a/Plugins/avatarhistory/AvatarHistory.cpp b/Plugins/avatarhistory/AvatarHistory.cpp index 5d624db..7d0006d 100644 --- a/Plugins/avatarhistory/AvatarHistory.cpp +++ b/Plugins/avatarhistory/AvatarHistory.cpp @@ -60,11 +60,6 @@ static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam); TCHAR * GetCachedAvatar(char *proto, TCHAR *hash);
BOOL CreateShortcut(TCHAR *file, TCHAR *shortcut);
-#ifdef DBGPOPUPS
-#define ShowDebugPopup ShowPopup
-#else
-#define ShowDebugPopup
-#endif
PLUGININFOEX pluginInfo={
diff --git a/Plugins/avatarhistory/popup.cpp b/Plugins/avatarhistory/popup.cpp index a1319fe..dc03ee7 100644 --- a/Plugins/avatarhistory/popup.cpp +++ b/Plugins/avatarhistory/popup.cpp @@ -76,6 +76,14 @@ void ShowPopup(HANDLE hContact, const TCHAR *title, const TCHAR *description) ShowPopupEx(hContact, title, description, hContact, POPUP_TYPE_NORMAL, &opts);
}
+void ShowDebugPopup(HANDLE hContact, const TCHAR *title, const TCHAR *description)
+{
+ if(DBGetContactSettingByte(NULL,MODULE_NAME,"Debug",0))
+ {
+ ShowPopup(hContact,title,description);
+ }
+}
+
typedef struct
{
void* plugin_data;
diff --git a/Plugins/avatarhistory/popup.h b/Plugins/avatarhistory/popup.h index 74c5323..2944ba0 100644 --- a/Plugins/avatarhistory/popup.h +++ b/Plugins/avatarhistory/popup.h @@ -37,6 +37,7 @@ void DeInitPopups(); // Show an popup
void ShowPopup(HANDLE hContact, const TCHAR *title, const TCHAR *description);
+void ShowDebugPopup(HANDLE hContact, const TCHAR *title, const TCHAR *description);
// Show an test
void ShowTestPopup(HANDLE hContact,const TCHAR *title, const TCHAR *description, const Options *op);
|