diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-27 12:49:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-27 12:49:25 +0000 |
commit | 5db9b527e95334d103a7804f31fe95f97b5687a7 (patch) | |
tree | d3926c45164e86d57f0282760c303b1c4fd4578e /plugins/TabSRMM | |
parent | c014bd45e4761fd8da881e4f726022fc918624b2 (diff) |
ansi functionality removed from tabSRMM
only utf8 remained
git-svn-id: http://svn.miranda-ng.org/main/trunk@13856 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/res/resource.rc | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 11 | ||||
-rw-r--r-- | plugins/TabSRMM/src/functions.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 114 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 33 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/resource.h | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/userprefs.cpp | 40 | ||||
-rw-r--r-- | plugins/TabSRMM/src/version.h | 2 |
13 files changed, 51 insertions, 177 deletions
diff --git a/plugins/TabSRMM/res/resource.rc b/plugins/TabSRMM/res/resource.rc index 3c3b94dc5c..d33d32ea4c 100644 --- a/plugins/TabSRMM/res/resource.rc +++ b/plugins/TabSRMM/res/resource.rc @@ -159,9 +159,7 @@ BEGIN GROUPBOX "Send text formatting method",IDC_STATIC,4,45,310,33
COMBOBOX IDC_TEXTFORMATTING,8,57,128,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "You can override the global setting for text formatting here. Use ""Force off"" to never send formatting info for this contact.",IDC_STATIC,143,52,164,24
- GROUPBOX "ANSI codepage",IDC_STATIC,4,82,310,32
- COMBOBOX IDC_CODEPAGES,8,94,128,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Codepage for ANSI encoding/decoding when sending or receiving non-Unicode messages.",IDC_STATIC,143,87,164,24
+
GROUPBOX "Other options",IDC_STATIC,4,118,310,142
LTEXT "Info panel mode",IDC_STATIC,12,128,128,8
COMBOBOX IDC_INFOPANEL,9,138,130,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@@ -170,7 +168,6 @@ BEGIN CONTROL "Use private splitter position",IDC_PRIVATESPLITTER,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,187,296,12
CONTROL "Contact is a favorite contact",IDC_ISFAVORITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,199,297,12
- CONTROL "Force ANSI send / receive",IDC_FORCEANSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,142,164,12
CONTROL "Ignore sending timeouts",IDC_IGNORETIMEOUTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,154,164,12
CONTROL "Load only actual history",IDC_LOADONLYACTUAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,166,164,12
CONTROL "Always trim message log to",IDC_ALWAYSTRIM2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,214,163,12
@@ -783,7 +780,6 @@ BEGIN MENUITEM "Send to &container", ID_SENDMENU_SENDTOCONTAINER
MENUITEM "Send &later", ID_SENDMENU_SENDLATER
MENUITEM SEPARATOR
- MENUITEM "Force &ANSI", ID_SENDMENU_FORCEANSISEND
MENUITEM "Send unsafe (ignore timeouts)", ID_SENDMENU_SENDWITHOUTTIMEOUTS
MENUITEM SEPARATOR
MENUITEM "Send nudge", ID_SENDMENU_SENDNUDGE
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index a7e2b8e29b..1610fa672a 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1780,7 +1780,6 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar SetTimer(hwndDlg, TIMERID_TYPE, 1000, NULL); } - dat->codePage = M.GetDword(dat->hContact, "ANSIcodepage", CP_ACP); dat->Panel->getVisibility(); dat->Panel->Configure(); M.AddWindow(hwndDlg, dat->hContact); @@ -2544,15 +2543,7 @@ LABEL_SHOWWINDOW: HMENU hMenu = 0; UINT uID = CreateGCMenu(hwndDlg, &hMenu, 1, pt, si, NULL, pszWord); - if ((uID > 800 && uID < 1400) || uID == CP_UTF8 || uID == 20866) { - dat->codePage = uID; - db_set_dw(dat->hContact, SRMSGMOD_T, "ANSIcodepage", dat->codePage); - } - else if (uID == 500) { - dat->codePage = CP_ACP; - db_unset(dat->hContact, SRMSGMOD_T, "ANSIcodepage"); - } - else switch (uID) { + switch (uID) { case 0: PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0); break; diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index 83c7f532ee..948d555843 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -93,7 +93,6 @@ void TSAPI DeleteContainer(int iIndex); void TSAPI RenameContainer(int iIndex, const TCHAR *newName);
int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iNameLen);
HMENU TSAPI BuildContainerMenu();
-void TSAPI BuildCodePageList();
void TSAPI PreTranslateDates();
void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT mode, bool fForceResize);
void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam, BYTE iType = 0);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 16cf2b8b38..7536ab5c76 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -440,7 +440,6 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, CheckMenuItem(submenu, ID_SENDMENU_SENDTOMULTIPLEUSERS, MF_BYCOMMAND | (dat->sendMode & SMODE_MULTIPLE ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(submenu, ID_SENDMENU_SENDDEFAULT, MF_BYCOMMAND | (dat->sendMode == 0 ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(submenu, ID_SENDMENU_SENDTOCONTAINER, MF_BYCOMMAND | (dat->sendMode & SMODE_CONTAINER ? MF_CHECKED : MF_UNCHECKED)); - CheckMenuItem(submenu, ID_SENDMENU_FORCEANSISEND, MF_BYCOMMAND | (dat->sendMode & SMODE_FORCEANSI ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(submenu, ID_SENDMENU_SENDLATER, MF_BYCOMMAND | (dat->sendMode & SMODE_SENDLATER ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(submenu, ID_SENDMENU_SENDWITHOUTTIMEOUTS, MF_BYCOMMAND | (dat->sendMode & SMODE_NOACK ? MF_CHECKED : MF_UNCHECKED)); @@ -469,9 +468,6 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, dat->sendMode ^= SMODE_CONTAINER; RedrawWindow(hwndDlg, 0, 0, RDW_ERASENOW | RDW_UPDATENOW); break; - case ID_SENDMENU_FORCEANSISEND: - dat->sendMode ^= SMODE_FORCEANSI; - break; case ID_SENDMENU_SENDLATER: if (sendLater->isAvail()) dat->sendMode ^= SMODE_SENDLATER; @@ -487,7 +483,6 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, break; } db_set_b(dat->hContact, SRMSGMOD_T, "no_ack", (BYTE)(dat->sendMode & SMODE_NOACK ? 1 : 0)); - db_set_b(dat->hContact, SRMSGMOD_T, "forceansi", (BYTE)(dat->sendMode & SMODE_FORCEANSI ? 1 : 0)); SetWindowPos(GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE); if (dat->sendMode & SMODE_MULTIPLE || dat->sendMode & SMODE_CONTAINER) { SetWindowPos(GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 0, 0, 0, 0, SWP_DRAWFRAME | SWP_FRAMECHANGED | SWP_NOZORDER | diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 3444094437..7893c21309 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -75,7 +75,7 @@ public: HICON g_IconMsgEvent, g_IconTypingEvent, g_IconFileEvent, g_IconSend;
HICON g_IconMsgEventBig, g_IconTypingEventBig;
HICON g_IconGroupOpen, g_IconGroupClose, g_IconChecked, g_IconUnchecked;
- HMENU g_hMenuContext, g_hMenuContainer, g_hMenuEncoding, g_hMenuTrayUnread;
+ HMENU g_hMenuContext, g_hMenuContainer, g_hMenuTrayUnread;
HMENU g_hMenuFavorites, g_hMenuRecent, g_hMenuTrayContext;
HICON g_buttonBarIcons[NR_BUTTONBARICONS];
HICON g_sideBarIcons[NR_SIDEBARICONS];
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 559023dd4b..6472b31a61 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -82,7 +82,6 @@ static void _clrMsgFilter(LPARAM lParam) static void ShowPopupMenu(TWindowData *dat, int idFrom, HWND hwndFrom, POINT pt)
{
CHARRANGE sel, all = { 0, -1 };
- int oldCodepage = dat->codePage;
HWND hwndDlg = dat->hwnd;
HMENU hSubMenu, hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
@@ -105,16 +104,7 @@ static void ShowPopupMenu(TWindowData *dat, int idFrom, HWND hwndFrom, POINT pt) }
if (idFrom == IDC_LOG) {
- InsertMenuA(hSubMenu, 6/*5*/, MF_BYPOSITION | MF_SEPARATOR, 0, 0);
- InsertMenu(hSubMenu, 7/*6*/, MF_BYPOSITION | MF_POPUP, (UINT_PTR)PluginConfig.g_hMenuEncoding, TranslateT("Character encoding"));
- for (int i = 0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
- CheckMenuItem(PluginConfig.g_hMenuEncoding, i, MF_BYPOSITION | MF_UNCHECKED);
-
- if (dat->codePage == CP_ACP)
- CheckMenuItem(PluginConfig.g_hMenuEncoding, 0, MF_BYPOSITION | MF_CHECKED);
- else
- CheckMenuItem(PluginConfig.g_hMenuEncoding, dat->codePage, MF_BYCOMMAND | MF_CHECKED);
-
+ InsertMenuA(hSubMenu, 6, MF_BYPOSITION | MF_SEPARATOR, 0, 0);
CheckMenuItem(hSubMenu, ID_LOG_FREEZELOG, MF_BYCOMMAND | (dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED ? MF_CHECKED : MF_UNCHECKED));
}
@@ -141,64 +131,51 @@ static void ShowPopupMenu(TWindowData *dat, int idFrom, HWND hwndFrom, POINT pt) NotifyEventHooks(PluginConfig.m_event_MsgPopup, 0, (LPARAM)&mwpd);
}
- if (((iSelection > 800 && iSelection < 1400) || iSelection == 20866) && idFrom == IDC_LOG) {
- dat->codePage = iSelection;
- db_set_dw(dat->hContact, SRMSGMOD_T, "ANSIcodepage", dat->codePage);
- }
- else if (iSelection == 500 && idFrom == IDC_LOG) {
- dat->codePage = CP_ACP;
- db_unset(dat->hContact, SRMSGMOD_T, "ANSIcodepage");
- }
- else {
- switch (iSelection) {
- case IDM_COPY:
- SendMessage(hwndFrom, WM_COPY, 0, 0);
- break;
- case IDM_CUT:
- SendMessage(hwndFrom, WM_CUT, 0, 0);
- break;
- case IDM_PASTE:
- case IDM_PASTEFORMATTED:
- if (idFrom == IDC_MESSAGE)
- SendMessage(hwndFrom, EM_PASTESPECIAL, (iSelection == IDM_PASTE) ? CF_UNICODETEXT : 0, 0);
- break;
- case IDM_COPYALL:
- SendMessage(hwndFrom, EM_EXSETSEL, 0, (LPARAM)&all);
- SendMessage(hwndFrom, WM_COPY, 0, 0);
- SendMessage(hwndFrom, EM_EXSETSEL, 0, (LPARAM)&sel);
- break;
- case IDM_QUOTE:
- SendMessage(hwndDlg, WM_COMMAND, IDC_QUOTE, 0);
- break;
- case IDM_SELECTALL:
- SendMessage(hwndFrom, EM_EXSETSEL, 0, (LPARAM)&all);
- break;
- case IDM_CLEAR:
- ClearLog(dat);
- break;
- case ID_LOG_FREEZELOG:
- SendDlgItemMessage(hwndDlg, IDC_LOG, WM_KEYDOWN, VK_F12, 0);
- break;
- case ID_EDITOR_SHOWMESSAGELENGTHINDICATOR:
- PluginConfig.m_visualMessageSizeIndicator = !PluginConfig.m_visualMessageSizeIndicator;
- db_set_b(0, SRMSGMOD_T, "msgsizebar", (BYTE)PluginConfig.m_visualMessageSizeIndicator);
- M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 0);
- SendMessage(hwndDlg, WM_SIZE, 0, 0);
- if (dat->pContainer->hwndStatus)
- RedrawWindow(dat->pContainer->hwndStatus, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
- break;
- case ID_EDITOR_PASTEANDSENDIMMEDIATELY:
- HandlePasteAndSend(dat);
- break;
- }
+ switch (iSelection) {
+ case IDM_COPY:
+ SendMessage(hwndFrom, WM_COPY, 0, 0);
+ break;
+ case IDM_CUT:
+ SendMessage(hwndFrom, WM_CUT, 0, 0);
+ break;
+ case IDM_PASTE:
+ case IDM_PASTEFORMATTED:
+ if (idFrom == IDC_MESSAGE)
+ SendMessage(hwndFrom, EM_PASTESPECIAL, (iSelection == IDM_PASTE) ? CF_UNICODETEXT : 0, 0);
+ break;
+ case IDM_COPYALL:
+ SendMessage(hwndFrom, EM_EXSETSEL, 0, (LPARAM)&all);
+ SendMessage(hwndFrom, WM_COPY, 0, 0);
+ SendMessage(hwndFrom, EM_EXSETSEL, 0, (LPARAM)&sel);
+ break;
+ case IDM_QUOTE:
+ SendMessage(hwndDlg, WM_COMMAND, IDC_QUOTE, 0);
+ break;
+ case IDM_SELECTALL:
+ SendMessage(hwndFrom, EM_EXSETSEL, 0, (LPARAM)&all);
+ break;
+ case IDM_CLEAR:
+ ClearLog(dat);
+ break;
+ case ID_LOG_FREEZELOG:
+ SendDlgItemMessage(hwndDlg, IDC_LOG, WM_KEYDOWN, VK_F12, 0);
+ break;
+ case ID_EDITOR_SHOWMESSAGELENGTHINDICATOR:
+ PluginConfig.m_visualMessageSizeIndicator = !PluginConfig.m_visualMessageSizeIndicator;
+ db_set_b(0, SRMSGMOD_T, "msgsizebar", (BYTE)PluginConfig.m_visualMessageSizeIndicator);
+ M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 0);
+ SendMessage(hwndDlg, WM_SIZE, 0, 0);
+ if (dat->pContainer->hwndStatus)
+ RedrawWindow(dat->pContainer->hwndStatus, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
+ break;
+ case ID_EDITOR_PASTEANDSENDIMMEDIATELY:
+ HandlePasteAndSend(dat);
+ break;
}
+
if (idFrom == IDC_LOG)
RemoveMenu(hSubMenu, 7, MF_BYPOSITION);
DestroyMenu(hMenu);
- if (dat->codePage != (UINT)oldCodepage) {
- SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
- SendMessage(hwndDlg, DM_UPDATETITLE, 0, 1);
- }
}
static void ResizeIeView(const TWindowData *dat)
@@ -1202,8 +1179,6 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->cache->setWindowData(hwndDlg, dat);
M.AddWindow(hwndDlg, dat->hContact);
BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
- dat->pWnd = 0;
- dat->sbCustom = 0;
CProxyWindow::add(dat);
dat->szProto = const_cast<char *>(dat->cache->getProto());
dat->bIsMeta = dat->cache->isMeta();
@@ -1230,7 +1205,6 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP mir_subclassWindow(dat->hwndPanelPicParent, CInfoPanel::avatarParentSubclass);
dat->bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
- dat->sendMode |= M.GetByte(dat->hContact, "forceansi", 0) ? SMODE_FORCEANSI : 0;
dat->sendMode |= dat->hContact == 0 ? SMODE_MULTIPLE : 0;
dat->sendMode |= M.GetByte(dat->hContact, "no_ack", 0) ? SMODE_NOACK : 0;
@@ -1274,10 +1248,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->bIsAutosizingInput = IsAutoSplitEnabled(dat);
dat->iInputAreaHeight = -1;
SetMessageLog(dat);
- if (dat->hContact) {
- dat->codePage = M.GetDword(dat->hContact, "ANSIcodepage", CP_ACP);
+ if (dat->hContact)
dat->Panel->loadHeight();
- }
dat->bShowAvatar = GetAvatarVisibility(hwndDlg, dat);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 689892e4b0..35a9a75544 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -421,7 +421,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, dat->cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
TCHAR *formatted = NULL;
- TCHAR *msg = DbGetEventTextT(&dbei, dat->codePage);
+ TCHAR *msg = DbGetEventTextT(&dbei, CP_UTF8);
if (!msg) {
mir_free(dbei.pBlob);
return NULL;
@@ -1175,6 +1175,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp const char *pszService;
IEVIEWEVENT event = { 0 };
event.cbSize = sizeof(IEVIEWEVENT);
+ event.hContact = dat->hContact;
if (dat->hwndIEView != NULL) {
event.pszProto = dat->szProto;
event.hwnd = dat->hwndIEView;
@@ -1185,13 +1186,8 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp pszService = MS_HPP_EG_EVENT;
}
- event.hContact = dat->hContact;
- event.dwFlags = (dat->dwFlags & MWF_LOG_RTL) ? IEEF_RTL : 0;
- if (dat->sendMode & SMODE_FORCEANSI) {
- event.dwFlags |= IEEF_NO_UNICODE;
- event.codepage = dat->codePage;
- }
- else event.codepage = 0;
+ if (dat->dwFlags & MWF_LOG_RTL)
+ event.dwFlags = IEEF_RTL;
if (!fAppend) {
event.iType = IEE_CLEAR_LOG;
@@ -1320,24 +1316,3 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp EnableWindow(GetDlgItem(hwndDlg, IDC_QUOTE), dat->hDbEventLast != NULL);
mir_free(streamData.buffer);
}
-
-// NLS functions (for unicode version only) encoding stuff..
-static BOOL CALLBACK LangAddCallback(LPTSTR str)
-{
- UINT cp = _ttoi(str);
- for (int i = 0; i < SIZEOF(cpTable); i++)
- if (cpTable[i].cpId == cp) {
- AppendMenu(PluginConfig.g_hMenuEncoding, MF_STRING, cp, TranslateTS(cpTable[i].cpName));
- break;
- }
-
- return TRUE;
-}
-
-void TSAPI BuildCodePageList()
-{
- PluginConfig.g_hMenuEncoding = CreateMenu();
- AppendMenu(PluginConfig.g_hMenuEncoding, MF_STRING, 500, TranslateT("Use default codepage"));
- AppendMenuA(PluginConfig.g_hMenuEncoding, MF_SEPARATOR, 0, 0);
- EnumSystemCodePages(LangAddCallback, CP_INSTALLED);
-}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 5e83a533bc..bc36b138cb 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -368,8 +368,6 @@ int SplitmsgShutdown(void) DestroyMenu(PluginConfig.g_hMenuContext);
if (PluginConfig.g_hMenuContainer)
DestroyMenu(PluginConfig.g_hMenuContainer);
- if (PluginConfig.g_hMenuEncoding)
- DestroyMenu(PluginConfig.g_hMenuEncoding);
UnloadIcons();
FreeTabConfig();
@@ -981,8 +979,6 @@ int LoadSendRecvMessageModule(void) db_set_b(0, TEMPLATES_MODULE, "setup", 2);
LoadDefaultTemplates();
-
- BuildCodePageList();
return 0;
}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index b56df6d3c1..94077b891e 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -88,7 +88,6 @@ #define SMODE_DEFAULT 0
#define SMODE_MULTIPLE 1
#define SMODE_CONTAINER 2
-#define SMODE_FORCEANSI 4
#define SMODE_SENDLATER 8
#define SMODE_NOACK 16
@@ -280,7 +279,6 @@ struct TWindowData bool bShowAvatar, bShowInfoAvatar, bShowSmileys, bShowUIElements;
bool bUseOffset;
bool bIsHistory, bIsMeta, bNotOnList;
- UINT codePage;
HICON hSmileyIcon;
int iLastEventType;
time_t lastEventTime;
diff --git a/plugins/TabSRMM/src/resource.h b/plugins/TabSRMM/src/resource.h index 5f7e67df17..ceec52ff51 100644 --- a/plugins/TabSRMM/src/resource.h +++ b/plugins/TabSRMM/src/resource.h @@ -334,7 +334,6 @@ #define IDC_TABBORDERSPINOUTERBOTTOM 1265
#define IDC_TEXTFORMATTING 1266
#define IDC_AVATARMODE 1267
-#define IDC_CODEPAGES 1268
#define IDC_OWNAVATARMODE 1268
#define IDC_EMPTYLINEFIX 1272
#define IDC_SPLITTERSTATICEDGES 1273
@@ -434,7 +433,6 @@ #define IDC_COLOR3 1368
#define IDC_COLOR4 1369
#define IDC_COLOR5 1370
-#define IDC_FORCEANSI 1371
#define IDC_TEMPLOVERRIDE 1372
#define IDC_IGNORETIMEOUTS 1372
#define IDC_RTLTEMPLOVERRIDE 1373
@@ -691,7 +689,6 @@ #define ID_SENDMENU_SENDDEFAULT 40135
#define ID_SENDMENU_SENDTOMULTIPLEUSERS 40136
#define ID_SENDMENU_SENDTOCONTAINER 40137
-#define ID_SENDMENU_FORCEANSISEND 40138
#define ID_VIEW_VERTICALMAXIMIZE 40143
#define ID_SENDMENU_SENDLATER 40144
#define ID_PROTOMENU_SPLITTER 40145
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 82b37b01fd..f6eab10f4b 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -268,11 +268,6 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) dat->nMax = dat->cache->getMaxMessageLength(); // refresh length info - if (dat->sendMode & SMODE_FORCEANSI && db_get_b(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "UnicodeSend", 1)) - db_set_b(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "UnicodeSend", 0); - else if (!(dat->sendMode & SMODE_FORCEANSI) && !db_get_b(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "UnicodeSend", 0)) - db_set_b(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "UnicodeSend", 1); - if (M.GetByte("autosplit", 0) && !(dat->sendMode & SMODE_SENDLATER)) { // determine send buffer length BOOL fSplit = FALSE; diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 0548632126..efc5854703 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -35,20 +35,6 @@ #define UPREF_ACTION_REMAKELOG 2
#define UPREF_ACTION_SWITCHLOGVIEWER 4
-static HWND hCpCombo;
-
-static BOOL CALLBACK FillCpCombo(LPCTSTR str)
-{
- int i;
- UINT cp = _ttoi(str);
- for (i = 0; cpTable[i].cpName != NULL && cpTable[i].cpId != cp; i++);
- if (cpTable[i].cpName != NULL) {
- LRESULT iIndex = SendMessage(hCpCombo, CB_ADDSTRING, -1, (LPARAM)TranslateTS(cpTable[i].cpName));
- SendMessage(hCpCombo, CB_SETITEMDATA, (WPARAM)iIndex, cpTable[i].cpId);
- }
- return TRUE;
-}
-
static int have_ieview = 0, have_hpp = 0;
static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -132,18 +118,6 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, Utils::enableDlgControl(hwndDlg, IDC_TRIM, maxhist != 0);
CheckDlgButton(hwndDlg, IDC_ALWAYSTRIM2, maxhist != 0 ? BST_CHECKED : BST_UNCHECKED);
- hCpCombo = GetDlgItem(hwndDlg, IDC_CODEPAGES);
- DWORD sCodePage = M.GetDword(hContact, "ANSIcodepage", 0);
- EnumSystemCodePages((CODEPAGE_ENUMPROC)FillCpCombo, CP_INSTALLED);
- SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_INSERTSTRING, 0, (LPARAM)TranslateT("Use default codepage"));
- if (sCodePage == 0)
- SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_SETCURSEL, 0, 0);
- else {
- for (int i = 0; i < SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETCOUNT, 0, 0); i++)
- if (SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETITEMDATA, i, 0) == (LRESULT)sCodePage)
- SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_SETCURSEL, i, 0);
- }
- CheckDlgButton(hwndDlg, IDC_FORCEANSI, M.GetByte(hContact, "forceansi", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_IGNORETIMEOUTS, M.GetByte(hContact, "no_ack", 0) ? BST_CHECKED : BST_UNCHECKED);
ShowWindow(hwndDlg, SW_SHOW);
@@ -207,20 +181,6 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, db_set_dw(hContact, SRMSGMOD_T, "sendformat", iIndex == 2 ? -1 : 1);
}
- iIndex = SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETCURSEL, 0, 0);
- DWORD newCodePage = (DWORD)SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETITEMDATA, iIndex, 0);
- if (newCodePage != sCodePage) {
- db_set_dw(hContact, SRMSGMOD_T, "ANSIcodepage", newCodePage);
- if (hWnd && dat) {
- dat->codePage = newCodePage;
- SendMessage(hWnd, DM_UPDATETITLE, 0, 1);
- }
- }
- if ((IsDlgButtonChecked(hwndDlg, IDC_FORCEANSI) ? 1 : 0) != M.GetByte(hContact, "forceansi", 0)) {
- db_set_b(hContact, SRMSGMOD_T, "forceansi", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_FORCEANSI) ? 1 : 0));
- if (hWnd && dat)
- dat->sendMode = IsDlgButtonChecked(hwndDlg, IDC_FORCEANSI) ? dat->sendMode | SMODE_FORCEANSI : dat->sendMode & ~SMODE_FORCEANSI;
- }
if (IsDlgButtonChecked(hwndDlg, IDC_ISFAVORITE)) {
if (!M.GetByte(hContact, "isFavorite", 0))
AddContactToFavorites(hContact, NULL, NULL, NULL, 0, 0, 1, PluginConfig.g_hMenuFavorites);
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 639fb59ad0..185a4914b6 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 10
+#define __BUILD_NUM 11
#include <stdver.h>
|