diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-06-12 18:34:23 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-06-12 18:34:23 +0000 |
commit | e74411f50d715f467a378ae77d8feee11d03a1a2 (patch) | |
tree | ae0f74b6ce47e00163a8550c1bd237f6c4ef20cd /plugins/MyDetails/src/frame.cpp | |
parent | 7de38a08b97e0554e318b8c25806cef5d47259e6 (diff) |
MyDetails: Restored support for core default away messages, replaces SimpleAway with SimpleStatusMsg support
git-svn-id: http://svn.miranda-ng.org/main/trunk@9439 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src/frame.cpp')
-rw-r--r-- | plugins/MyDetails/src/frame.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 3e1309edd8..2469e22728 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1806,6 +1806,26 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar HMENU submenu = GetSubMenu(menu, 3);
TranslateMenu(submenu);
+ if (protocols->CanSetStatusMsgPerProtocol()) {
+ // Add this proto to menu
+ mir_sntprintf(tmp, SIZEOF(tmp), TranslateT("Set my status message for %s..."), proto->description);
+
+ MENUITEMINFO mii = {0};
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_ID | MIIM_TYPE;
+ mii.fType = MFT_STRING;
+ mii.dwTypeData = tmp;
+ mii.cch = (int)_tcslen(tmp);
+ mii.wID = 1;
+
+ if (!proto->CanSetStatusMsg()) {
+ mii.fMask |= MIIM_STATE;
+ mii.fState = MFS_DISABLED;
+ }
+
+ InsertMenuItem(submenu, 0, TRUE, &mii);
+ }
+
// Add this to menu
mir_sntprintf(tmp, SIZEOF(tmp), TranslateT("Set my status message for %s..."),
CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, proto->status, GSMDF_TCHAR));
@@ -1907,6 +1927,26 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar InsertMenuItem(submenu, 0, TRUE, &mii);
+ if (protocols->CanSetStatusMsgPerProtocol()) {
+ // Add this proto to menu
+ mir_sntprintf(tmp, SIZEOF(tmp), TranslateT("Set my status message for %s..."), proto->description);
+
+ ZeroMemory(&mii, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_ID | MIIM_TYPE;
+ mii.fType = MFT_STRING;
+ mii.dwTypeData = tmp;
+ mii.cch = (int)_tcslen(tmp);
+ mii.wID = 3;
+
+ if ( !proto->CanSetStatusMsg()) {
+ mii.fMask |= MIIM_STATE;
+ mii.fState = MFS_DISABLED;
+ }
+
+ InsertMenuItem(submenu, 0, TRUE, &mii);
+ }
+
mir_sntprintf(tmp, SIZEOF(tmp), TranslateT("Set my nickname for %s..."), proto->description);
ZeroMemory(&mii, sizeof(mii));
|