diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-30 10:53:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-30 10:53:08 +0000 |
commit | 14f574fcf1bdc6059fb2ee3994578decc03e40a3 (patch) | |
tree | fef44f106106604f8f87ff7cfc0033fe681e2def /plugins/TabSRMM/src | |
parent | 7c862bb56c10a32edbf38e3843549678a71309c9 (diff) |
- fixes #1061 (Not all TabSRMM buttons working after language change)
- version bump before release
git-svn-id: http://svn.miranda-ng.org/main/trunk@16889 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/TSButton.cpp | 20 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 50 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/version.h | 2 |
9 files changed, 47 insertions, 52 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index cc9cc58f25..603bdceb34 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -328,18 +328,18 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L return 0;
case WM_PAINT:
- {
PAINTSTRUCT ps;
- HDC hdcPaint = BeginPaint(hwndDlg, &ps);
- if (hdcPaint) {
- if (bct->sitem)
- bct->sitem->RenderThis(hdcPaint);
- else
- PaintWorker(bct, hdcPaint);
- EndPaint(hwndDlg, &ps);
+ {
+ HDC hdcPaint = BeginPaint(hwndDlg, &ps);
+ if (hdcPaint) {
+ if (bct->sitem)
+ bct->sitem->RenderThis(hdcPaint);
+ else
+ PaintWorker(bct, hdcPaint);
+ EndPaint(hwndDlg, &ps);
+ }
}
- }
- return 0;
+ return 0;
case BM_SETIMAGE:
if (wParam == IMAGE_ICON) {
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 71d1aabbfe..eab7d769d2 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -3156,7 +3156,7 @@ LABEL_SHOWWINDOW: case WM_RBUTTONUP: GetCursorPos(&pt); if (!dat->Panel->invokeConfigDialog(pt)) { - HMENU subMenu = GetSubMenu(dat->pContainer->hMenuContext, 0); + HMENU subMenu = GetSubMenu(PluginConfig.g_hMenuContext, 0); MsgWindowUpdateMenu(dat, subMenu, MENU_TABCONTEXT); diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 50ffb10f52..0fe93c40d7 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -534,9 +534,6 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, SendMessage(hwndDlg, DM_CONFIGURECONTAINER, 0, 10);
- // context menu
- pContainer->hMenuContext = PluginConfig.g_hMenuContext;
-
// tab tooltips...
if (!fHaveTipper || M.GetByte("d_tooltips", 0) == 0) {
pContainer->hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT,
@@ -779,7 +776,7 @@ panel_found: memset(&tci, 0, sizeof(tci));
GetCursorPos(&pt);
- HMENU subMenu = GetSubMenu(pContainer->hMenuContext, 0);
+ HMENU subMenu = GetSubMenu(PluginConfig.g_hMenuContext, 0);
dat = 0;
if (((LPNMHDR)lParam)->idFrom == IDC_MSGTABS) {
@@ -1598,7 +1595,6 @@ panel_found: case WM_DESTROY:
pContainer->hwnd = 0;
pContainer->hwndActive = 0;
- pContainer->hMenuContext = 0;
if (pContainer->hwndStatus)
DestroyWindow(pContainer->hwndStatus);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index b7d74b1abd..141a1fbbd9 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -249,7 +249,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, break; case IDC_FONTFACE: - submenu = GetSubMenu(m_pContainer->hMenuContext, 7); + submenu = GetSubMenu(PluginConfig.g_hMenuContext, 7); { CHARFORMAT2 cf; memset(&cf, 0, sizeof(CHARFORMAT2)); @@ -326,7 +326,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, break; case IDC_TIME: - submenu = GetSubMenu(m_pContainer->hMenuContext, 2); + submenu = GetSubMenu(PluginConfig.g_hMenuContext, 2); MsgWindowUpdateMenu(dat, submenu, MENU_LOGMENU); GetWindowRect(GetDlgItem(hwndDlg, IDC_TIME), &rc); @@ -336,7 +336,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, case IDC_PROTOMENU: if (dat->hContact) { - submenu = GetSubMenu(m_pContainer->hMenuContext, 4); + submenu = GetSubMenu(PluginConfig.g_hMenuContext, 4); int iOldGlobalSendFormat = PluginConfig.m_SendFormat; int iLocalFormat = M.GetDword(dat->hContact, "sendformat", 0); int iNewLocalFormat = iLocalFormat; @@ -412,7 +412,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, break; case IDC_INFOPANELMENU: - submenu = GetSubMenu(m_pContainer->hMenuContext, 9); + submenu = GetSubMenu(PluginConfig.g_hMenuContext, 9); GetWindowRect(GetDlgItem(hwndDlg, IDC_NAME), &rc); EnableMenuItem(submenu, ID_FAVORITES_ADDCONTACTTOFAVORITES, !dat->cache->isFavorite() ? MF_ENABLED : MF_GRAYED); @@ -434,7 +434,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, break; case IDC_SENDMENU: - submenu = GetSubMenu(m_pContainer->hMenuContext, 3); + submenu = GetSubMenu(PluginConfig.g_hMenuContext, 3); GetWindowRect(GetDlgItem(hwndDlg, IDOK), &rc); CheckMenuItem(submenu, ID_SENDMENU_SENDTOMULTIPLEUSERS, MF_BYCOMMAND | (dat->sendMode & SMODE_MULTIPLE ? MF_CHECKED : MF_UNCHECKED)); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 7a4b859407..c62da21742 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -863,7 +863,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM (dat && dat->bType == SESSIONTYPE_CHAT && hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY))) {
POINT pt;
int selection;
- HMENU hMenu = GetSubMenu(dat->pContainer->hMenuContext, 12);
+ HMENU hMenu = GetSubMenu(PluginConfig.g_hMenuContext, 12);
LONG messagePos = GetMessagePos();
GetClientRect(hwnd, &rc);
@@ -2527,7 +2527,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l menuID = MENU_PICMENU;
if ((menuID == MENU_PICMENU && ((dat->ace ? dat->ace->hbmPic : PluginConfig.g_hbmUnknown) || dat->hOwnPic) && dat->bShowAvatar != 0)) {
- HMENU submenu = GetSubMenu(m_pContainer->hMenuContext, 1);
+ HMENU submenu = GetSubMenu(PluginConfig.g_hMenuContext, 1);
GetCursorPos(&pt);
MsgWindowUpdateMenu(dat, submenu, menuID);
int iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
@@ -2535,7 +2535,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l break;
}
- HMENU subMenu = GetSubMenu(m_pContainer->hMenuContext, 0);
+ HMENU subMenu = GetSubMenu(PluginConfig.g_hMenuContext, 0);
MsgWindowUpdateMenu(dat, subMenu, MENU_TABCONTEXT);
int iSelection = TrackPopupMenu(subMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 0e5bc78714..2756aeef53 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -345,21 +345,21 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) case ID_VISIBILITY_DEFAULT:
case ID_VISIBILITY_HIDDENFORTHISCONTACT:
case ID_VISIBILITY_VISIBLEFORTHISCONTACT:
- {
- BYTE avOverrideMode;
- if (selection == ID_VISIBILITY_DEFAULT)
- avOverrideMode = -1;
- else if (selection == ID_VISIBILITY_VISIBLEFORTHISCONTACT)
- avOverrideMode = 1;
- else
- avOverrideMode = 0;
- db_set_b(dat->hContact, SRMSGMOD_T, "hideavatar", avOverrideMode);
- }
+ {
+ BYTE avOverrideMode;
+ if (selection == ID_VISIBILITY_DEFAULT)
+ avOverrideMode = -1;
+ else if (selection == ID_VISIBILITY_VISIBLEFORTHISCONTACT)
+ avOverrideMode = 1;
+ else
+ avOverrideMode = 0;
+ db_set_b(dat->hContact, SRMSGMOD_T, "hideavatar", avOverrideMode);
+ }
- ShowPicture(dat, FALSE);
- SendMessage(hwndDlg, WM_SIZE, 0, 0);
- DM_ScrollToBottom(dat, 0, 1);
- return 1;
+ ShowPicture(dat, FALSE);
+ SendMessage(hwndDlg, WM_SIZE, 0, 0);
+ DM_ScrollToBottom(dat, 0, 1);
+ return 1;
case ID_PICMENU_ALWAYSKEEPTHEBUTTONBARATFULLWIDTH:
PluginConfig.m_bAlwaysFullToolbarWidth = !PluginConfig.m_bAlwaysFullToolbarWidth;
@@ -400,14 +400,14 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) else if (menuId == MENU_LOGMENU) {
switch (selection) {
case ID_MESSAGELOGSETTINGS_GLOBAL:
- {
- OPENOPTIONSDIALOG ood = { sizeof(ood) };
- ood.pszPage = "Message sessions";
- ood.pszGroup = NULL;
- ood.pszTab = "Message log";
- Options_Open(&ood);
- }
- return 1;
+ {
+ OPENOPTIONSDIALOG ood = { sizeof(ood) };
+ ood.pszPage = "Message sessions";
+ ood.pszGroup = NULL;
+ ood.pszTab = "Message log";
+ Options_Open(&ood);
+ }
+ return 1;
case ID_MESSAGELOGSETTINGS_FORTHISCONTACT:
CallService(MS_TABMSG_SETUSERPREFS, dat->hContact, 0);
@@ -596,7 +596,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) switch (bAvatarMode) {
case 0: // globally on
dat->bShowAvatar = true;
- LBL_Check:
+LBL_Check:
if (!dat->hwndContactPic)
dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
break;
@@ -918,7 +918,7 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors res.AppendChar(0xA0);
p += 2; break;
}
-
+
if (!_tcsncmp(p, _T("\\cf"), 3)) { // foreground color
int iCol = _ttoi(p + 3);
int iInd = GetRtfIndex(iCol, iNumColors, pIndex);
@@ -1940,7 +1940,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp) CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_TCHAR);
int totalCount = 0;
- TCHAR** ppFiles = NULL;
+ TCHAR **ppFiles = NULL;
Utils::AddToFileList(&ppFiles, &totalCount, filename);
wchar_t* _t = mir_tstrdup(filename);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 601fdc5000..8adcaadc52 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -217,7 +217,7 @@ static INT_PTR ReloadSkin(WPARAM, LPARAM) static INT_PTR ReloadSettings(WPARAM, LPARAM lParam)
{
- PluginConfig.reloadSettings(lParam);
+ PluginConfig.reloadSettings(lParam != 0);
return 0;
}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index afcfbc0df3..c2e9059467 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -181,7 +181,6 @@ struct TContainerData int iChilds;
int iContainerIndex;
bool fHidden;
- HMENU hMenuContext;
HWND hwndTip; // tab - tooltips...
BOOL bDontSmartClose; // if set, do not search and select the next possible tab after closing one.
DWORD dwFlags;
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index e1880dd96a..732ac88563 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3
#define __MINOR_VERSION 4
#define __RELEASE_NUM 0
-#define __BUILD_NUM 11
+#define __BUILD_NUM 12
#include <stdver.h>
|