From 0518395399244e9611c33cd708cfb373c4ff3f2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Mar 2013 20:33:29 +0000 Subject: clearing Scriver git-svn-id: http://svn.miranda-ng.org/main/trunk@3988 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Scriver/src/chat/log.cpp | 12 ++++++------ plugins/Scriver/src/chat/options.cpp | 2 +- plugins/Scriver/src/chat/services.cpp | 24 ++++++++++++------------ plugins/Scriver/src/chat/tools.cpp | 2 +- plugins/Scriver/src/chat/window.cpp | 22 +++++++++++----------- 5 files changed, 31 insertions(+), 31 deletions(-) (limited to 'plugins/Scriver/src/chat') diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp index d3a73352fb..ad3b3092e6 100644 --- a/plugins/Scriver/src/chat/log.cpp +++ b/plugins/Scriver/src/chat/log.cpp @@ -88,7 +88,7 @@ static int EventToIcon(LOGINFO * lin) static char *Log_SetStyle(int style, int fontindex) { static char szStyle[128]; - mir_snprintf(szStyle, SIZEOF(szStyle), "\\f%u\\cf%u\\ul0\\highlight0\\b%d\\i%d\\fs%u", style, style+1, aFonts[fontindex].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[fontindex].lf.lfItalic, 2 * abs(aFonts[fontindex].lf.lfHeight) * 74 / g_dat->logPixelSY); + mir_snprintf(szStyle, SIZEOF(szStyle), "\\f%u\\cf%u\\ul0\\highlight0\\b%d\\i%d\\fs%u", style, style+1, aFonts[fontindex].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[fontindex].lf.lfItalic, 2 * abs(aFonts[fontindex].lf.lfHeight) * 74 / g_dat.logPixelSY); return szStyle; } @@ -655,13 +655,13 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData, BOOL ieviewMode) if (lin->ptszNick && lin->iType == GC_EVENT_MESSAGE) { iii = lin->bIsHighlighted?16:(lin->bIsMe ? 2 : 1); - mir_snprintf(szStyle, SIZEOF(szStyle), "\\f0\\cf%u\\ul0\\highlight0\\b%d\\i%d\\fs%u", iii+1, aFonts[0].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[0].lf.lfItalic, 2 * abs(aFonts[0].lf.lfHeight) * 74 / g_dat->logPixelSY); + mir_snprintf(szStyle, SIZEOF(szStyle), "\\f0\\cf%u\\ul0\\highlight0\\b%d\\i%d\\fs%u", iii+1, aFonts[0].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[0].lf.lfItalic, 2 * abs(aFonts[0].lf.lfHeight) * 74 / g_dat.logPixelSY); AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", szStyle); } else { iii = lin->bIsHighlighted?16:EventToIndex(lin); - mir_snprintf(szStyle, SIZEOF(szStyle), "\\f0\\cf%u\\ul0\\highlight0\\b%d\\i%d\\fs%u", iii+1, aFonts[0].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[0].lf.lfItalic, 2 * abs(aFonts[0].lf.lfHeight) * 74 / g_dat->logPixelSY); + mir_snprintf(szStyle, SIZEOF(szStyle), "\\f0\\cf%u\\ul0\\highlight0\\b%d\\i%d\\fs%u", iii+1, aFonts[0].lf.lfWeight >= FW_BOLD ? 1 : 0, aFonts[0].lf.lfItalic, 2 * abs(aFonts[0].lf.lfHeight) * 74 / g_dat.logPixelSY); AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", szStyle); } } @@ -813,7 +813,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO* si, BOOL bRedr SendMessage(hwndRich, EM_STREAMIN, wp, (LPARAM) & stream); // do smileys - if (g_dat->smileyAddInstalled && (bRedraw + if (g_dat.smileyAddInstalled && (bRedraw || (lin->ptszText && lin->iType != GC_EVENT_JOIN && lin->iType != GC_EVENT_NICK @@ -900,12 +900,12 @@ char * Log_CreateRtfHeader(MODULEINFO * mi, SESSION_INFO* si) if (g_Settings.dwIconFlags) { - iIndent += (14*1440)/g_dat->logPixelSX; + iIndent += (14*1440)/g_dat.logPixelSX; AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent); } if (g_Settings.ShowTime) { - int iSize = (g_Settings.LogTextIndent*1440)/g_dat->logPixelSX; + int iSize = (g_Settings.LogTextIndent*1440)/g_dat.logPixelSX; AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent + iSize ); if (g_Settings.LogIndentEnabled) iIndent += iSize; diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index a22618c363..86c21c65df 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -752,7 +752,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam static int OptionsInitialize(WPARAM wParam, LPARAM lParam) { - if (g_dat->popupInstalled) { + if (g_dat.popupInstalled) { OPTIONSDIALOGPAGE odp = {0}; odp.cbSize = sizeof(odp); odp.position = 910000002; diff --git a/plugins/Scriver/src/chat/services.cpp b/plugins/Scriver/src/chat/services.cpp index bd55310277..cb1375c491 100644 --- a/plugins/Scriver/src/chat/services.cpp +++ b/plugins/Scriver/src/chat/services.cpp @@ -636,22 +636,22 @@ static INT_PTR Service_GetAddEventPtr(WPARAM wParam, LPARAM lParam) void HookEvents(void) { - HookEvent_Ex(ME_CLIST_PREBUILDCONTACTMENU, CList_PrebuildContactMenu); + HookEvent(ME_CLIST_PREBUILDCONTACTMENU, CList_PrebuildContactMenu); } void CreateServiceFunctions(void) { - CreateServiceFunction_Ex(MS_GC_REGISTER, Service_Register); - CreateServiceFunction_Ex(MS_GC_NEWSESSION, Service_NewChat); - CreateServiceFunction_Ex(MS_GC_EVENT, Service_AddEvent); - CreateServiceFunction_Ex(MS_GC_GETEVENTPTR, Service_GetAddEventPtr); - CreateServiceFunction_Ex(MS_GC_GETINFO, Service_GetInfo); - CreateServiceFunction_Ex(MS_GC_GETSESSIONCOUNT, Service_GetCount); - - CreateServiceFunction_Ex("GChat/DblClickEvent", CList_EventDoubleclickedSvc); - CreateServiceFunction_Ex("GChat/PrebuildMenuEvent", CList_PrebuildContactMenuSvc); - CreateServiceFunction_Ex("GChat/JoinChat", CList_JoinChat); - CreateServiceFunction_Ex("GChat/LeaveChat", CList_LeaveChat); + CreateServiceFunction(MS_GC_REGISTER, Service_Register); + CreateServiceFunction(MS_GC_NEWSESSION, Service_NewChat); + CreateServiceFunction(MS_GC_EVENT, Service_AddEvent); + CreateServiceFunction(MS_GC_GETEVENTPTR, Service_GetAddEventPtr); + CreateServiceFunction(MS_GC_GETINFO, Service_GetInfo); + CreateServiceFunction(MS_GC_GETSESSIONCOUNT, Service_GetCount); + + CreateServiceFunction("GChat/DblClickEvent", CList_EventDoubleclickedSvc); + CreateServiceFunction("GChat/PrebuildMenuEvent", CList_PrebuildContactMenuSvc); + CreateServiceFunction("GChat/JoinChat", CList_JoinChat); + CreateServiceFunction("GChat/LeaveChat", CList_LeaveChat); } void CreateHookableEvents(void) diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index a25a436964..7d12ba29b9 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -683,7 +683,7 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO* s TCHAR szMenuText[4096]; mir_sntprintf( szMenuText, 4096, TranslateT("Look up \'%s\':"), pszWordText ); ModifyMenu( *hMenu, 4, MF_STRING|MF_BYPOSITION, 4, szMenuText ); - SetSearchEngineIcons(*hMenu, g_dat->hSearchEngineIconList); + SetSearchEngineIcons(*hMenu, g_dat.hSearchEngineIconList); } else ModifyMenu( *hMenu, 4, MF_STRING|MF_GRAYED|MF_BYPOSITION, 4, TranslateT( "No word to look up" )); gcmi.Type = MENU_ON_LOG; diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index e0e1bd68b5..f93129a25f 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -147,9 +147,9 @@ static void MessageDialogResize(HWND hwndDlg, SESSION_INFO *si, int w, int h) { HDWP hdwp; BOOL bNick = si->iType!=GCW_SERVER && si->bNicklistEnabled; BOOL bToolbar = SendMessage(GetParent(hwndDlg), CM_GETTOOLBARSTATUS, 0, 0); - int buttonVisibility = bToolbar ? g_dat->chatBbuttonVisibility : 0; + int buttonVisibility = bToolbar ? g_dat.chatBbuttonVisibility : 0; int hSplitterMinTop = TOOLBAR_HEIGHT + si->windowData.minLogBoxHeight, hSplitterMinBottom = si->windowData.minEditBoxHeight; - int toolbarHeight = bToolbar ? IsToolbarVisible(SIZEOF(toolbarButtons), g_dat->chatBbuttonVisibility) ? TOOLBAR_HEIGHT : TOOLBAR_HEIGHT / 3 : 0; + int toolbarHeight = bToolbar ? IsToolbarVisible(SIZEOF(toolbarButtons), g_dat.chatBbuttonVisibility) ? TOOLBAR_HEIGHT : TOOLBAR_HEIGHT / 3 : 0; si->iSplitterY = si->desiredInputAreaHeight + SPLITTER_HEIGHT + 3; @@ -1228,14 +1228,14 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) { TitleBarData tbd = {0}; TCHAR szTemp [100]; - if (g_dat->flags & SMF_STATUSICON) { + if (g_dat.flags & SMF_STATUSICON) { MODULEINFO* mi = MM_FindModule(si->pszModule); tbd.hIcon = (si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; tbd.hIconBig = (si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIconBig : mi->hOfflineIconBig; } else { tbd.hIcon = GetCachedIcon("chat_window"); - tbd.hIconBig = g_dat->hIconChatBig; + tbd.hIconBig = g_dat.hIconChatBig; } tbd.hIconNot = (si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? GetCachedIcon("chat_overlay") : NULL; @@ -1389,7 +1389,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) else hIcon = (si->wStatus==ID_STATUS_ONLINE) ? MM_FindModule(si->pszModule)->hOnlineIcon : MM_FindModule(si->pszModule)->hOfflineIcon; } else { - hIcon = g_dat->hMsgIcon; + hIcon = g_dat.hMsgIcon; } tcd.iFlags = TCDF_ICON; tcd.hIcon = hIcon; @@ -1725,8 +1725,8 @@ LABEL_SHOWWINDOW: if (pNmhdr->idFrom == IDC_CHAT_MESSAGE) { REQRESIZE *rr = (REQRESIZE *)lParam; int height = rr->rc.bottom - rr->rc.top + 1; - if (height < g_dat->minInputAreaHeight) { - height = g_dat->minInputAreaHeight; + if (height < g_dat.minInputAreaHeight) { + height = g_dat.minInputAreaHeight; } if (si->desiredInputAreaHeight != height) { si->desiredInputAreaHeight = height; @@ -2076,9 +2076,9 @@ LABEL_SHOWWINDOW: mii.cbSize = sizeof(mii); mii.fMask = MIIM_ID | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_BITMAP; mii.fType = MFT_STRING; - mii.fState = (g_dat->chatBbuttonVisibility & (1<< i)) ? MFS_CHECKED : MFS_UNCHECKED; + mii.fState = (g_dat.chatBbuttonVisibility & (1<< i)) ? MFS_CHECKED : MFS_UNCHECKED; mii.wID = i + 1; - mii.dwItemData = (ULONG_PTR)g_dat->hChatButtonIconList; + mii.dwItemData = (ULONG_PTR)g_dat.hChatButtonIconList; mii.hbmpItem = HBMMENU_CALLBACK; mii.dwTypeData = TranslateTS((toolbarButtons[i].name)); InsertMenuItem(hToolbarMenu, i, TRUE, &mii); @@ -2088,8 +2088,8 @@ LABEL_SHOWWINDOW: pt.y = (short) HIWORD(GetMessagePos()); i = TrackPopupMenu(hToolbarMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL); if (i > 0) { - g_dat->chatBbuttonVisibility ^= (1 << (i - 1)); - DBWriteContactSettingDword(NULL, SRMMMOD, SRMSGSET_CHATBUTTONVISIBILITY, g_dat->chatBbuttonVisibility); + g_dat.chatBbuttonVisibility ^= (1 << (i - 1)); + DBWriteContactSettingDword(NULL, SRMMMOD, SRMSGSET_CHATBUTTONVISIBILITY, g_dat.chatBbuttonVisibility); SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE); } DestroyMenu(hToolbarMenu); -- cgit v1.2.3