diff options
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/res/resource.rc | 13 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 11 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.h | 86 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 8 | ||||
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 11 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 488 | ||||
-rw-r--r-- | plugins/Scriver/src/resource.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/richutil.cpp | 25 |
8 files changed, 323 insertions, 320 deletions
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc index 61cc5a7c0c..bc31d2f3bd 100644 --- a/plugins/Scriver/res/resource.rc +++ b/plugins/Scriver/res/resource.rc @@ -122,7 +122,6 @@ BEGIN CONTROL "Start message text on a new line",IDC_MESSAGEONNEWLINE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,58,140,10
CONTROL "Show lines between messages",IDC_DRAWLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,69,120,10
- CONTROL "",IDC_LINECOLOUR,"ColourPicker",WS_TABSTOP,280,69,16,11
CONTROL "Indent text",IDC_INDENTTEXT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,80,102,10
EDITTEXT IDC_INDENTSIZE,262,79,33,12,ES_RIGHT | ES_NUMBER | WS_DISABLED
CONTROL "Spin1",IDC_INDENTSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK | WS_DISABLED,290,79,10,12
@@ -394,6 +393,14 @@ BEGIN BOTTOMMARGIN, 105
END
+ IDD_MSGWIN, DIALOG
+ BEGIN
+ END
+
+ IDD_INFOBAR, DIALOG
+ BEGIN
+ END
+
IDD_MSG, DIALOG
BEGIN
LEFTMARGIN, 5
@@ -402,6 +409,10 @@ BEGIN HORZGUIDE, 16
HORZGUIDE, 53
END
+
+ IDD_CONFIRM_SENDALL, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 29ecedf337..e717c8536e 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -392,7 +392,7 @@ void ReloadGlobals() static int ackevent(WPARAM wParam, LPARAM lParam)
{
- ACKDATA *pAck = (ACKDATA*)lParam;
+ ACKDATA *pAck = (ACKDATA *)lParam;
if (!pAck)
return 0;
@@ -415,14 +415,15 @@ static int ackevent(WPARAM wParam, LPARAM lParam) if (hwndSender != NULL) {
ErrorWindowData *ewd = (ErrorWindowData *)mir_alloc(sizeof(ErrorWindowData));
ewd->szName = GetNickname(item->hContact, item->proto);
- ewd->szDescription = mir_a2t((char*)pAck->lParam);
+ ewd->szDescription = mir_a2t((char *)pAck->lParam);
ewd->szText = GetSendBufferMsg(item);
ewd->hwndParent = hwndSender;
ewd->queueItem = item;
SendMessage(hwndSender, DM_STOPMESSAGESENDING, 0, 0);
SendMessage(hwndSender, DM_SHOWERRORMESSAGE, 0, (LPARAM)ewd);
}
- else RemoveSendQueueItem(item);
+ else
+ RemoveSendQueueItem(item);
}
return 0;
}
@@ -436,13 +437,13 @@ static int ackevent(WPARAM wParam, LPARAM lParam) dbei.timestamp = time(NULL);
dbei.cbBlob = lstrlenA(item->sendBuffer) + 1;
if (!(item->flags & PREF_UTF))
- dbei.cbBlob *= sizeof(TCHAR)+1;
+ dbei.cbBlob *= sizeof(TCHAR) + 1;
dbei.pBlob = (PBYTE)item->sendBuffer;
MessageWindowEvent evt = { sizeof(evt), (int)item->hSendId, item->hContact, &dbei };
NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
- item->sendBuffer = (char*)dbei.pBlob;
+ item->sendBuffer = (char *)dbei.pBlob;
db_event_add(item->hContact, &dbei);
if (item->hwndErrorDlg != NULL)
diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h index 9fce7a273c..58c94545c7 100644 --- a/plugins/Scriver/src/globals.h +++ b/plugins/Scriver/src/globals.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef SRMM_GLOBALS_H
#define SRMM_GLOBALS_H
-#define SMF_AUTOPOPUP 0x00000001
+#define SMF_AUTOPOPUP 0x00000001
#define SMF_STAYMINIMIZED 0x00000002
#define SMF_CLOSEONSEND 0x00000004
#define SMF_MINIMIZEONSEND 0x00000008
@@ -32,14 +32,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SMF_SENDONENTER 0x00000100
#define SMF_SENDONDBLENTER 0x00000200
#define SMF_SHOWPROGRESS 0x00000400
-#define SMF_AVATAR 0x00000800
+#define SMF_AVATAR 0x00000800
#define SMF_STATUSICON 0x00002000
#define SMF_RTL 0x00004000
#define SMF_USEIEVIEW 0x00010000
-#define SMF_SHOWICONS 0x00020000
-#define SMF_HIDENAMES 0x00040000
-#define SMF_SHOWTIME 0x00080000
-#define SMF_SHOWDATE 0x00100000
+#define SMF_SHOWICONS 0x00020000
+#define SMF_HIDENAMES 0x00040000
+#define SMF_SHOWTIME 0x00080000
+#define SMF_SHOWDATE 0x00100000
#define SMF_LONGDATE 0x00200000
#define SMF_RELATIVEDATE 0x00400000
#define SMF_SHOWSECONDS 0x00800000
@@ -54,27 +54,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SMF2_HIDEONETAB 0x00000002
#define SMF2_TABSATBOTTOM 0x00000004
#define SMF2_LIMITNAMES 0x00000008
-#define SMF2_SWITCHTOACTIVE 0x00000010
-#define SMF2_SEPARATECHATSCONTAINERS 0x00000020
-#define SMF2_TABCLOSEBUTTON 0x00000040
+#define SMF2_SWITCHTOACTIVE 0x00000010
+#define SMF2_SEPARATECHATSCONTAINERS 0x00000020
+#define SMF2_TABCLOSEBUTTON 0x00000040
#define SMF2_LIMITTABS 0x00000080
#define SMF2_LIMITCHATSTABS 0x00000100
-#define SMF2_HIDECONTAINERS 0x00000200
+#define SMF2_HIDECONTAINERS 0x00000200
#define SMF2_SHOWINFOBAR 0x00000400
#define SMF2_SHOWSTATUSBAR 0x00010000
#define SMF2_SHOWTITLEBAR 0x00020000
#define SMF2_SHOWTOOLBAR 0x00040000
-#define SMF2_USETRANSPARENCY 0x00080000
-#define SMF2_SHOWTYPING 0x01000000
-#define SMF2_SHOWTYPINGWIN 0x02000000
-#define SMF2_SHOWTYPINGTRAY 0x04000000
-#define SMF2_SHOWTYPINGCLIST 0x08000000
+#define SMF2_USETRANSPARENCY 0x00080000
+#define SMF2_SHOWTYPING 0x01000000
+#define SMF2_SHOWTYPINGWIN 0x02000000
+#define SMF2_SHOWTYPINGTRAY 0x04000000
+#define SMF2_SHOWTYPINGCLIST 0x08000000
#define SMF2_SHOWTYPINGSWITCH 0x10000000
typedef struct ImageListUsageEntry_tag
{
- int index;
- int used;
+ int index;
+ int used;
} ImageListUsageEntry;
@@ -87,36 +87,36 @@ struct GlobalMessageData HANDLE hParentWindowList;
ParentWindowData *lastParent;
ParentWindowData *lastChatParent;
- int limitNamesLength;
- int activeAlpha;
- int inactiveAlpha;
- HMENU hMenuANSIEncoding;
- int tabIconListUsageSize;
- ImageListUsageEntry *tabIconListUsage;
+ int limitNamesLength;
+ int activeAlpha;
+ int inactiveAlpha;
+ HMENU hMenuANSIEncoding;
+ int tabIconListUsageSize;
+ ImageListUsageEntry *tabIconListUsage;
TCmdList *draftList;
- int smileyAddInstalled;
- int popupInstalled;
- int ieviewInstalled;
- int buttonVisibility;
- int chatBbuttonVisibility;
- int limitTabsNum;
- int limitChatsTabsNum;
- int indentSize;
+ int smileyAddInstalled;
+ int popupInstalled;
+ int ieviewInstalled;
+ int buttonVisibility;
+ int chatBbuttonVisibility;
+ int limitTabsNum;
+ int limitChatsTabsNum;
+ int indentSize;
HIMAGELIST hTabIconList;
HIMAGELIST hButtonIconList;
HIMAGELIST hChatButtonIconList;
HIMAGELIST hHelperIconList;
HIMAGELIST hSearchEngineIconList;
- HBRUSH hInfobarBrush;
- int toolbarPosition;
- HWND hFocusWnd;
- DWORD logLineColour;
- int logPixelSX;
- int logPixelSY;
- HICON hMsgIcon;
- HICON hMsgIconBig;
- HICON hIconChatBig;
- int minInputAreaHeight;
+ HBRUSH hInfobarBrush;
+ int toolbarPosition;
+ HWND hFocusWnd;
+ DWORD logLineColour;
+ int logPixelSX;
+ int logPixelSY;
+ HICON hMsgIcon;
+ HICON hMsgIconBig;
+ HICON hIconChatBig;
+ int minInputAreaHeight;
};
int IconsChanged(WPARAM wParam, LPARAM lParam);
@@ -129,12 +129,12 @@ void ReleaseIcons(); void LoadGlobalIcons();
HICON GetCachedIcon(const char *name);
void RegisterFontServiceFonts();
-int ScriverRestoreWindowPosition(HWND hwnd,MCONTACT hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd);
+int ScriverRestoreWindowPosition(HWND hwnd, MCONTACT hContact, const char *szModule, const char *szNamePrefix, int flags, int showCmd);
int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id);
int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon);
int ImageList_ReplaceIcon_Ex(HIMAGELIST hIml, int nIndex, int id);
-int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char* szProto, int status);
+int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char *szProto, int status);
void StreamInTestEvents(HWND hEditWnd, GlobalMessageData *gdat);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 2871ed490e..a72b25cd85 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -383,7 +383,7 @@ static char *CreateRTFHeader(SrmmWindowData *dat, struct GlobalMessageData *gdat AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
colour = db_get_dw(NULL, SRMMMOD, SRMSGSET_OUTGOINGBKGCOLOUR, SRMSGDEFSET_OUTGOINGBKGCOLOUR);
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
- colour = gdat->logLineColour;
+ colour = db_get_dw(NULL, SRMMMOD, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR);
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "}");
return buffer;
@@ -764,9 +764,9 @@ static char* CreateRTFFromEvent(SrmmWindowData *dat, EventData *evt, struct Glob return buffer;
}
-static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
+static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
- struct LogStreamData *dat = (struct LogStreamData *) dwCookie;
+ struct LogStreamData *dat = (struct LogStreamData *)dwCookie;
if (dat->buffer == NULL) {
dat->bufferOffset = 0;
@@ -835,7 +835,7 @@ void StreamInTestEvents(HWND hEditWnd, struct GlobalMessageData *gdat) EDITSTREAM stream = { 0 };
stream.pfnCallback = LogStreamInEvents;
- stream.dwCookie = (DWORD_PTR) & streamData;
+ stream.dwCookie = (DWORD_PTR)&streamData;
SendMessage(hEditWnd, EM_STREAMIN, SF_RTF, (LPARAM)&stream);
SendMessage(hEditWnd, EM_HIDESELECTION, FALSE, 0);
}
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 9ad6119688..521a088ec7 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -92,6 +92,7 @@ static const colourOptionsList[] = { { LPGENT("Incoming background"), SRMSGSET_INCOMINGBKGCOLOUR, 0, COLOR_WINDOW},
{ LPGENT("Outgoing background"), SRMSGSET_OUTGOINGBKGCOLOUR, 0, COLOR_WINDOW},
{ LPGENT("Info bar background"), SRMSGSET_INFOBARBKGCOLOUR, 0, COLOR_3DLIGHT},
+ { LPGENT("Line between messages"), SRMSGSET_LINECOLOUR, 0, COLOR_3DLIGHT},
};
int FontServiceFontsChanged(WPARAM wParam, LPARAM lParam)
@@ -631,7 +632,6 @@ static void ShowPreview(HWND hwndDlg) gdat.flags |= IsDlgButtonChecked(hwndDlg, IDC_MESSAGEONNEWLINE) ? SMF_MSGONNEWLINE : 0;
gdat.flags |= IsDlgButtonChecked(hwndDlg, IDC_DRAWLINES) ? SMF_DRAWLINES : 0;
gdat.flags |= IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT) ? SMF_INDENTTEXT : 0;
- gdat.logLineColour = SendDlgItemMessage(hwndDlg, IDC_LINECOLOUR, CPM_GETCOLOUR, 0, 0);
gdat.indentSize = (int)SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_GETPOS, 0, 0);
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_OFFSET;
@@ -691,7 +691,6 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, CheckDlgButton(hwndDlg, IDC_MARKFOLLOWUPS, db_get_b(NULL, SRMMMOD, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS));
CheckDlgButton(hwndDlg, IDC_MESSAGEONNEWLINE, db_get_b(NULL, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE));
CheckDlgButton(hwndDlg, IDC_DRAWLINES, db_get_b(NULL, SRMMMOD, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES));
- EnableWindow(GetDlgItem(hwndDlg, IDC_LINECOLOUR), IsDlgButtonChecked(hwndDlg, IDC_DRAWLINES));
CheckDlgButton(hwndDlg, IDC_INDENTTEXT, db_get_b(NULL, SRMMMOD, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT));
EnableWindow(GetDlgItem(hwndDlg, IDC_INDENTSIZE), IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT));
@@ -699,7 +698,6 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_SETPOS, 0, db_get_w(NULL, SRMMMOD, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE));
- SendDlgItemMessage(hwndDlg, IDC_LINECOLOUR, CPM_SETCOLOUR, 0, db_get_dw(NULL, SRMMMOD, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR));
{
PARAFORMAT2 pf2;
ZeroMemory(&pf2, sizeof(pf2));
@@ -748,20 +746,16 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case IDC_SHOWSECONDS:
case IDC_USELONGDATE:
case IDC_USERELATIVEDATE:
- case IDC_LINECOLOUR:
case IDC_MARKFOLLOWUPS:
case IDC_SHOWLOGICONS:
case IDC_MESSAGEONNEWLINE:
+ case IDC_DRAWLINES:
ShowPreview(hwndDlg);
break;
case IDC_GROUPMESSAGES:
EnableWindow(GetDlgItem(hwndDlg, IDC_MARKFOLLOWUPS), IsDlgButtonChecked(hwndDlg, IDC_GROUPMESSAGES));
ShowPreview(hwndDlg);
break;
- case IDC_DRAWLINES:
- EnableWindow(GetDlgItem(hwndDlg, IDC_LINECOLOUR), IsDlgButtonChecked(hwndDlg, IDC_DRAWLINES));
- ShowPreview(hwndDlg);
- break;
case IDC_INDENTTEXT:
EnableWindow(GetDlgItem(hwndDlg, IDC_INDENTSIZE), IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT));
EnableWindow(GetDlgItem(hwndDlg, IDC_INDENTSPIN), IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT));
@@ -807,7 +801,6 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, db_set_b(NULL, SRMMMOD, SRMSGSET_MARKFOLLOWUPS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MARKFOLLOWUPS));
db_set_b(NULL, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MESSAGEONNEWLINE));
db_set_b(NULL, SRMMMOD, SRMSGSET_DRAWLINES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAWLINES));
- db_set_dw(NULL, SRMMMOD, SRMSGSET_LINECOLOUR, SendDlgItemMessage(hwndDlg, IDC_LINECOLOUR, CPM_GETCOLOUR, 0, 0));
db_set_b(NULL, SRMMMOD, SRMSGSET_USEIEVIEW, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEIEVIEW));
db_set_b(NULL, SRMMMOD, SRMSGSET_INDENTTEXT, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT));
db_set_w(NULL, SRMMMOD, SRMSGSET_INDENTSIZE, (WORD)SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_GETPOS, 0, 0));
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 1eda0b84f3..3847619941 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -38,56 +38,56 @@ struct ToolbarButton struct ErrorWindowData
{
- TCHAR* szName;
- TCHAR* szDescription;
- TCHAR* szText;
- MessageSendQueueItem* queueItem;
- HWND hwndParent;
+ TCHAR *szName;
+ TCHAR *szDescription;
+ TCHAR *szText;
+ MessageSendQueueItem *queueItem;
+ HWND hwndParent;
};
struct TabCtrlData
{
- int lastClickTime;
- WPARAM clickWParam;
- LPARAM clickLParam;
- POINT mouseLBDownPos;
+ int lastClickTime;
+ WPARAM clickWParam;
+ LPARAM clickLParam;
+ POINT mouseLBDownPos;
HIMAGELIST hDragImageList;
- int bDragging;
- int bDragged;
- int destTab;
- int srcTab;
+ int bDragging;
+ int bDragged;
+ int destTab;
+ int srcTab;
};
struct ParentWindowData
{
- HWND hwnd;
+ HWND hwnd;
MCONTACT hContact;
- int childrenCount;
- HWND hwndActive;
- HWND hwndStatus;
- HWND hwndTabs;
- DWORD flags2;
- RECT childRect;
- POINT mouseLBDownPos;
- int mouseLBDown;
- int nFlash;
- int nFlashMax;
- int bMinimized;
- int bVMaximized;
- int bTopmost;
- int windowWasCascaded;
+ int childrenCount;
+ HWND hwndActive;
+ HWND hwndStatus;
+ HWND hwndTabs;
+ DWORD flags2;
+ RECT childRect;
+ POINT mouseLBDownPos;
+ int mouseLBDown;
+ int nFlash;
+ int nFlashMax;
+ int bMinimized;
+ int bVMaximized;
+ int bTopmost;
+ int windowWasCascaded;
TabCtrlData *tabCtrlDat;
- BOOL isChat;
+ BOOL isChat;
ParentWindowData *prev, *next;
};
struct MessageWindowTabData
{
- HWND hwnd;
+ HWND hwnd;
MCONTACT hContact;
- char *szProto;
+ char *szProto;
ParentWindowData *parent;
- HICON hIcon;
+ HICON hIcon;
};
#define NMWLP_INCOMING 1
@@ -106,17 +106,17 @@ struct NewMessageWindowLParam struct CommonWindowData
{
MCONTACT hContact;
- int codePage;
- DWORD flags;
- HWND hwndLog;
- int minLogBoxHeight, minEditBoxHeight;
+ int codePage;
+ DWORD flags;
+ HWND hwndLog;
+ int minLogBoxHeight, minEditBoxHeight;
TCmdList *cmdList, *cmdListCurrent;
};
struct SrmmWindowData
{
HWND hwnd;
- int tabId;
+ int tabId;
ParentWindowData *parent;
HWND hwndParent;
HANDLE hDbEventFirst, hDbEventLast, hDbUnreadEventFirst;
@@ -133,64 +133,64 @@ struct SrmmWindowData DWORD lastMessage;
char *szProto;
WORD wStatus;
- time_t startTime;
- time_t lastEventTime;
- int lastEventType;
- DWORD flags;
- int messagesInProgress;
+ time_t startTime;
+ time_t lastEventTime;
+ int lastEventType;
+ DWORD flags;
+ int messagesInProgress;
struct avatarCacheEntry *ace;
- int isMixed;
- int sendAllConfirm;
- HICON statusIcon;
- HICON statusIconBig;
- HICON statusIconOverlay;
+ int isMixed;
+ int sendAllConfirm;
+ HICON statusIcon;
+ HICON statusIconBig;
+ HICON statusIconOverlay;
CommonWindowData windowData;
- InfobarWindowData* infobarData;
+ InfobarWindowData *infobarData;
};
-#define HM_DBEVENTADDED (WM_USER+10)
-#define DM_REMAKELOG (WM_USER+11)
-#define DM_CASCADENEWWINDOW (WM_USER+13)
-#define DM_OPTIONSAPPLIED (WM_USER+14)
-#define DM_SPLITTERMOVED (WM_USER+15)
-#define DM_APPENDTOLOG (WM_USER+17)
-#define DM_ERRORDECIDED (WM_USER+18)
-#define DM_SCROLLLOGTOBOTTOM (WM_USER+19)
-#define DM_TYPING (WM_USER+20)
-#define DM_UPDATELASTMESSAGE (WM_USER+22)
-#define DM_USERNAMETOCLIP (WM_USER+23)
-#define DM_CHANGEICONS (WM_USER+24)
-#define DM_UPDATEICON (WM_USER+25)
-#define DM_GETAVATAR (WM_USER+27)
-#define HM_ACKEVENT (WM_USER+29)
-
-#define DM_SENDMESSAGE (WM_USER+30)
-#define DM_STARTMESSAGESENDING (WM_USER+31)
-#define DM_SHOWMESSAGESENDING (WM_USER+32)
-#define DM_STOPMESSAGESENDING (WM_USER+33)
-#define DM_SHOWERRORMESSAGE (WM_USER+34)
-
-#define DM_CLEARLOG (WM_USER+46)
-#define DM_SWITCHSTATUSBAR (WM_USER+47)
-#define DM_SWITCHTOOLBAR (WM_USER+48)
-#define DM_SWITCHTITLEBAR (WM_USER+49)
-#define DM_SWITCHINFOBAR (WM_USER+50)
-#define DM_SWITCHRTL (WM_USER+51)
-#define DM_SWITCHTYPING (WM_USER+53)
-#define DM_MESSAGESENDING (WM_USER+54)
-#define DM_GETWINDOWSTATE (WM_USER+55)
-#define DM_STATUSICONCHANGE (WM_USER+56)
-
-#define DM_MYAVATARCHANGED (WM_USER+62)
-#define DM_PROTOAVATARCHANGED (WM_USER+63)
-#define DM_AVATARCHANGED (WM_USER+64)
-
-#define EM_SUBCLASSED (WM_USER+0x101)
-#define EM_UNSUBCLASSED (WM_USER+0x102)
-
-#define EVENTTYPE_JABBER_CHATSTATES 2000
-#define EVENTTYPE_JABBER_PRESENCE 2001
+#define HM_DBEVENTADDED (WM_USER+10)
+#define DM_REMAKELOG (WM_USER+11)
+#define DM_CASCADENEWWINDOW (WM_USER+13)
+#define DM_OPTIONSAPPLIED (WM_USER+14)
+#define DM_SPLITTERMOVED (WM_USER+15)
+#define DM_APPENDTOLOG (WM_USER+17)
+#define DM_ERRORDECIDED (WM_USER+18)
+#define DM_SCROLLLOGTOBOTTOM (WM_USER+19)
+#define DM_TYPING (WM_USER+20)
+#define DM_UPDATELASTMESSAGE (WM_USER+22)
+#define DM_USERNAMETOCLIP (WM_USER+23)
+#define DM_CHANGEICONS (WM_USER+24)
+#define DM_UPDATEICON (WM_USER+25)
+#define DM_GETAVATAR (WM_USER+27)
+#define HM_ACKEVENT (WM_USER+29)
+
+#define DM_SENDMESSAGE (WM_USER+30)
+#define DM_STARTMESSAGESENDING (WM_USER+31)
+#define DM_SHOWMESSAGESENDING (WM_USER+32)
+#define DM_STOPMESSAGESENDING (WM_USER+33)
+#define DM_SHOWERRORMESSAGE (WM_USER+34)
+
+#define DM_CLEARLOG (WM_USER+46)
+#define DM_SWITCHSTATUSBAR (WM_USER+47)
+#define DM_SWITCHTOOLBAR (WM_USER+48)
+#define DM_SWITCHTITLEBAR (WM_USER+49)
+#define DM_SWITCHINFOBAR (WM_USER+50)
+#define DM_SWITCHRTL (WM_USER+51)
+#define DM_SWITCHTYPING (WM_USER+53)
+#define DM_MESSAGESENDING (WM_USER+54)
+#define DM_GETWINDOWSTATE (WM_USER+55)
+#define DM_STATUSICONCHANGE (WM_USER+56)
+
+#define DM_MYAVATARCHANGED (WM_USER+62)
+#define DM_PROTOAVATARCHANGED (WM_USER+63)
+#define DM_AVATARCHANGED (WM_USER+64)
+
+#define EM_SUBCLASSED (WM_USER+0x101)
+#define EM_UNSUBCLASSED (WM_USER+0x102)
+
+#define EVENTTYPE_JABBER_CHATSTATES 2000
+#define EVENTTYPE_JABBER_PRESENCE 2001
struct CREOleCallback : public IRichEditOleCallback
{
@@ -199,166 +199,164 @@ struct CREOleCallback : public IRichEditOleCallback IStorage *pictStg;
int nextStgId;
- STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * lplpObj);
- STDMETHOD_(ULONG,AddRef) (THIS);
- STDMETHOD_(ULONG,Release) (THIS);
+ STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR *lplpObj);
+ STDMETHOD_(ULONG,AddRef)(THIS);
+ STDMETHOD_(ULONG,Release)(THIS);
- STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);
- STDMETHOD(GetNewStorage) (LPSTORAGE FAR * lplpstg);
- STDMETHOD(GetInPlaceContext) (LPOLEINPLACEFRAME FAR * lplpFrame, LPOLEINPLACEUIWINDOW FAR * lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
- STDMETHOD(ShowContainerUI) (BOOL fShow);
- STDMETHOD(QueryInsertObject) (LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp);
- STDMETHOD(DeleteObject) (LPOLEOBJECT lpoleobj);
- STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
- STDMETHOD(GetClipboardData) (CHARRANGE FAR * lpchrg, DWORD reco, LPDATAOBJECT FAR * lplpdataobj);
- STDMETHOD(GetDragDropEffect) (BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect);
- STDMETHOD(GetContextMenu) (WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE FAR * lpchrg, HMENU FAR * lphmenu) ;
+ STDMETHOD(ContextSensitiveHelp) (BOOL fEnterMode);
+ STDMETHOD(GetNewStorage) (LPSTORAGE FAR *lplpstg);
+ STDMETHOD(GetInPlaceContext) (LPOLEINPLACEFRAME FAR *lplpFrame, LPOLEINPLACEUIWINDOW FAR *lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
+ STDMETHOD(ShowContainerUI) (BOOL fShow);
+ STDMETHOD(QueryInsertObject) (LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp);
+ STDMETHOD(DeleteObject) (LPOLEOBJECT lpoleobj);
+ STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR *lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
+ STDMETHOD(GetClipboardData) (CHARRANGE FAR *lpchrg, DWORD reco, LPDATAOBJECT FAR *lplpdataobj);
+ STDMETHOD(GetDragDropEffect) (BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect);
+ STDMETHOD(GetContextMenu) (WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE FAR *lpchrg, HMENU FAR *lphmenu);
};
struct CREOleCallback2 : public CREOleCallback
{
- STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
+ STDMETHOD(QueryAcceptData) (LPDATAOBJECT lpdataobj, CLIPFORMAT FAR *lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
};
INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat);
+int DbEventIsShown(DBEVENTINFO *dbei, SrmmWindowData *dat);
int DbEventIsCustomForMsgWindow(DBEVENTINFO *dbei);
int DbEventIsMessageOrCustom(DBEVENTINFO *dbei);
int safe_wcslen(wchar_t *msg, int maxLen);
void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
void LoadMsgLogIcons(void);
void FreeMsgLogIcons(void);
-TCHAR *GetNickname(MCONTACT hContact, const char* szProto);
+TCHAR *GetNickname(MCONTACT hContact, const char *szProto);
int IsAutoPopup(MCONTACT hContact);
-#define MSGFONTID_MYMSG 0
-#define MSGFONTID_YOURMSG 1
-#define MSGFONTID_MYNAME 2
-#define MSGFONTID_MYTIME 3
-#define MSGFONTID_MYCOLON 4
-#define MSGFONTID_YOURNAME 5
-#define MSGFONTID_YOURTIME 6
-#define MSGFONTID_YOURCOLON 7
-#define MSGFONTID_MESSAGEAREA 8
-#define MSGFONTID_NOTICE 9
-#define MSGFONTID_MYURL 10
-#define MSGFONTID_YOURURL 11
-#define MSGFONTID_INFOBAR_NAME 12
+#define MSGFONTID_MYMSG 0
+#define MSGFONTID_YOURMSG 1
+#define MSGFONTID_MYNAME 2
+#define MSGFONTID_MYTIME 3
+#define MSGFONTID_MYCOLON 4
+#define MSGFONTID_YOURNAME 5
+#define MSGFONTID_YOURTIME 6
+#define MSGFONTID_YOURCOLON 7
+#define MSGFONTID_MESSAGEAREA 8
+#define MSGFONTID_NOTICE 9
+#define MSGFONTID_MYURL 10
+#define MSGFONTID_YOURURL 11
+#define MSGFONTID_INFOBAR_NAME 12
#define MSGFONTID_INFOBAR_STATUS 13
void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour);
extern int fontOptionsListSize;
-#define LOADHISTORY_UNREAD 0
-#define LOADHISTORY_COUNT 1
-#define LOADHISTORY_TIME 2
-
-#define SRMMMOD "SRMM"
-
-#define SRMSGSET_USETABS "UseTabs"
-#define SRMSGDEFSET_USETABS 1
-#define SRMSGSET_TABSATBOTTOM "TabsPosition"
-#define SRMSGDEFSET_TABSATBOTTOM 0
-#define SRMSGSET_TABCLOSEBUTTON "TabCloseButton"
-#define SRMSGDEFSET_TABCLOSEBUTTON 0
-#define SRMSGSET_LIMITNAMES "LimitNamesOnTabs"
-#define SRMSGDEFSET_LIMITNAMES 1
-#define SRMSGSET_LIMITNAMESLEN "LimitNamesLength"
-#define SRMSGDEFSET_LIMITNAMESLEN 20
-#define SRMSGSET_LIMITNAMESLEN_MIN 0
-#define SRMSGSET_HIDEONETAB "HideOneTab"
-#define SRMSGDEFSET_HIDEONETAB 1
+#define LOADHISTORY_UNREAD 0
+#define LOADHISTORY_COUNT 1
+#define LOADHISTORY_TIME 2
+
+#define SRMMMOD "SRMM"
+
+#define SRMSGSET_USETABS "UseTabs"
+#define SRMSGDEFSET_USETABS 1
+#define SRMSGSET_TABSATBOTTOM "TabsPosition"
+#define SRMSGDEFSET_TABSATBOTTOM 0
+#define SRMSGSET_TABCLOSEBUTTON "TabCloseButton"
+#define SRMSGDEFSET_TABCLOSEBUTTON 0
+#define SRMSGSET_LIMITNAMES "LimitNamesOnTabs"
+#define SRMSGDEFSET_LIMITNAMES 1
+#define SRMSGSET_LIMITNAMESLEN "LimitNamesLength"
+#define SRMSGDEFSET_LIMITNAMESLEN 20
+#define SRMSGSET_LIMITNAMESLEN_MIN 0
+#define SRMSGSET_HIDEONETAB "HideOneTab"
+#define SRMSGDEFSET_HIDEONETAB 1
#define SRMSGSET_SEPARATECHATSCONTAINERS "SeparateChatsContainers"
#define SRMSGDEFSET_SEPARATECHATSCONTAINERS 0
-#define SRMSGSET_LIMITTABS "LimitTabs"
-#define SRMSGDEFSET_LIMITTABS 0
-#define SRMSGSET_LIMITTABSNUM "LimitTabsNum"
-#define SRMSGDEFSET_LIMITTABSNUM 10
-#define SRMSGSET_LIMITCHATSTABS "LimitChatsTabs"
-#define SRMSGDEFSET_LIMITCHATSTABS 0
-#define SRMSGSET_LIMITCHATSTABSNUM "LimitChatsTabsNum"
-#define SRMSGDEFSET_LIMITCHATSTABSNUM 10
-
-#define SRMSGSET_CASCADE "Cascade"
-#define SRMSGDEFSET_CASCADE 1
-#define SRMSGSET_SAVEPERCONTACT "SavePerContact"
-#define SRMSGDEFSET_SAVEPERCONTACT 0
-#define SRMSGSET_SHOWTITLEBAR "ShowTitleBar"
-#define SRMSGDEFSET_SHOWTITLEBAR 1
-#define SRMSGSET_SHOWSTATUSBAR "ShowStatusBar"
-#define SRMSGDEFSET_SHOWSTATUSBAR 1
-#define SRMSGSET_SHOWINFOBAR "ShowInfoBar"
-#define SRMSGDEFSET_SHOWINFOBAR 1
-#define SRMSGSET_TOPMOST "Topmost"
-#define SRMSGDEFSET_TOPMOST 0
-#define SRMSGSET_POPFLAGS "PopupFlags"
-#define SRMSGDEFSET_POPFLAGS 0
-#define SRMSGSET_SHOWBUTTONLINE "ShowButtonLine"
-#define SRMSGDEFSET_SHOWBUTTONLINE 1
-#define SRMSGSET_SHOWINFOLINE "ShowInfoLine"
-#define SRMSGDEFSET_SHOWINFOLINE 1
-#define SRMSGSET_SHOWPROGRESS "ShowProgress"
-#define SRMSGDEFSET_SHOWPROGRESS 0
-#define SRMSGSET_AUTOPOPUP "AutoPopupMsg"
-#define SRMSGDEFSET_AUTOPOPUP 0
-#define SRMSGSET_STAYMINIMIZED "StayMinimized"
-#define SRMSGDEFSET_STAYMINIMIZED 0
-#define SRMSGSET_SWITCHTOACTIVE "SwitchToActiveTab"
-#define SRMSGDEFSET_SWITCHTOACTIVE 0
-#define SRMSGSET_AUTOMIN "AutoMin"
-#define SRMSGDEFSET_AUTOMIN 0
-#define SRMSGSET_AUTOCLOSE "AutoClose"
-#define SRMSGDEFSET_AUTOCLOSE 0
-#define SRMSGSET_SENDONENTER "SendOnEnter"
-#define SRMSGDEFSET_SENDONENTER 1
-#define SRMSGSET_SENDONDBLENTER "SendOnDblEnter"
-#define SRMSGDEFSET_SENDONDBLENTER 0
-#define SRMSGSET_STATUSICON "UseStatusWinIcon"
-#define SRMSGDEFSET_STATUSICON 0
-#define SRMSGSET_SENDBUTTON "UseSendButton"
-#define SRMSGDEFSET_SENDBUTTON 0
-#define SRMSGSET_CHARCOUNT "ShowCharCount"
-#define SRMSGDEFSET_CHARCOUNT 0
-#define SRMSGSET_CTRLSUPPORT "SupportCtrlUpDn"
-#define SRMSGDEFSET_CTRLSUPPORT 1
-#define SRMSGSET_DELTEMP "DeleteTempCont"
-#define SRMSGDEFSET_DELTEMP 0
-#define SRMSGSET_MSGTIMEOUT "MessageTimeout"
-#define SRMSGDEFSET_MSGTIMEOUT 10000
-#define SRMSGSET_MSGTIMEOUT_MIN 4000 // minimum value (4 seconds)
-#define SRMSGSET_FLASHCOUNT "FlashMax"
-#define SRMSGDEFSET_FLASHCOUNT 3
-
-#define SRMSGSET_LOADHISTORY "LoadHistory"
-#define SRMSGDEFSET_LOADHISTORY LOADHISTORY_UNREAD
-#define SRMSGSET_LOADCOUNT "LoadCount"
-#define SRMSGDEFSET_LOADCOUNT 10
-#define SRMSGSET_LOADTIME "LoadTime"
-#define SRMSGDEFSET_LOADTIME 10
-
-#define SRMSGSET_USELONGDATE "UseLongDate"
-#define SRMSGDEFSET_USELONGDATE 0
-#define SRMSGSET_SHOWSECONDS "ShowSeconds"
-#define SRMSGDEFSET_SHOWSECONDS 1
-#define SRMSGSET_USERELATIVEDATE "UseRelativeDate"
-#define SRMSGDEFSET_USERELATIVEDATE 0
-
-#define SRMSGSET_GROUPMESSAGES "GroupMessages"
+#define SRMSGSET_LIMITTABS "LimitTabs"
+#define SRMSGDEFSET_LIMITTABS 0
+#define SRMSGSET_LIMITTABSNUM "LimitTabsNum"
+#define SRMSGDEFSET_LIMITTABSNUM 10
+#define SRMSGSET_LIMITCHATSTABS "LimitChatsTabs"
+#define SRMSGDEFSET_LIMITCHATSTABS 0
+#define SRMSGSET_LIMITCHATSTABSNUM "LimitChatsTabsNum"
+#define SRMSGDEFSET_LIMITCHATSTABSNUM 10
+
+#define SRMSGSET_CASCADE "Cascade"
+#define SRMSGDEFSET_CASCADE 1
+#define SRMSGSET_SAVEPERCONTACT "SavePerContact"
+#define SRMSGDEFSET_SAVEPERCONTACT 0
+#define SRMSGSET_SHOWTITLEBAR "ShowTitleBar"
+#define SRMSGDEFSET_SHOWTITLEBAR 1
+#define SRMSGSET_SHOWSTATUSBAR "ShowStatusBar"
+#define SRMSGDEFSET_SHOWSTATUSBAR 1
+#define SRMSGSET_SHOWINFOBAR "ShowInfoBar"
+#define SRMSGDEFSET_SHOWINFOBAR 1
+#define SRMSGSET_TOPMOST "Topmost"
+#define SRMSGDEFSET_TOPMOST 0
+#define SRMSGSET_POPFLAGS "PopupFlags"
+#define SRMSGDEFSET_POPFLAGS 0
+#define SRMSGSET_SHOWBUTTONLINE "ShowButtonLine"
+#define SRMSGDEFSET_SHOWBUTTONLINE 1
+#define SRMSGSET_SHOWINFOLINE "ShowInfoLine"
+#define SRMSGDEFSET_SHOWINFOLINE 1
+#define SRMSGSET_SHOWPROGRESS "ShowProgress"
+#define SRMSGDEFSET_SHOWPROGRESS 0
+#define SRMSGSET_AUTOPOPUP "AutoPopupMsg"
+#define SRMSGDEFSET_AUTOPOPUP 0
+#define SRMSGSET_STAYMINIMIZED "StayMinimized"
+#define SRMSGDEFSET_STAYMINIMIZED 0
+#define SRMSGSET_SWITCHTOACTIVE "SwitchToActiveTab"
+#define SRMSGDEFSET_SWITCHTOACTIVE 0
+#define SRMSGSET_AUTOMIN "AutoMin"
+#define SRMSGDEFSET_AUTOMIN 0
+#define SRMSGSET_AUTOCLOSE "AutoClose"
+#define SRMSGDEFSET_AUTOCLOSE 0
+#define SRMSGSET_SENDONENTER "SendOnEnter"
+#define SRMSGDEFSET_SENDONENTER 1
+#define SRMSGSET_SENDONDBLENTER "SendOnDblEnter"
+#define SRMSGDEFSET_SENDONDBLENTER 0
+#define SRMSGSET_STATUSICON "UseStatusWinIcon"
+#define SRMSGDEFSET_STATUSICON 0
+#define SRMSGSET_SENDBUTTON "UseSendButton"
+#define SRMSGDEFSET_SENDBUTTON 0
+#define SRMSGSET_CHARCOUNT "ShowCharCount"
+#define SRMSGDEFSET_CHARCOUNT 0
+#define SRMSGSET_CTRLSUPPORT "SupportCtrlUpDn"
+#define SRMSGDEFSET_CTRLSUPPORT 1
+#define SRMSGSET_DELTEMP "DeleteTempCont"
+#define SRMSGDEFSET_DELTEMP 0
+#define SRMSGSET_MSGTIMEOUT "MessageTimeout"
+#define SRMSGDEFSET_MSGTIMEOUT 10000
+#define SRMSGSET_MSGTIMEOUT_MIN 4000 // minimum value (4 seconds)
+#define SRMSGSET_FLASHCOUNT "FlashMax"
+#define SRMSGDEFSET_FLASHCOUNT 3
+
+#define SRMSGSET_LOADHISTORY "LoadHistory"
+#define SRMSGDEFSET_LOADHISTORY LOADHISTORY_UNREAD
+#define SRMSGSET_LOADCOUNT "LoadCount"
+#define SRMSGDEFSET_LOADCOUNT 10
+#define SRMSGSET_LOADTIME "LoadTime"
+#define SRMSGDEFSET_LOADTIME 10
+
+#define SRMSGSET_USELONGDATE "UseLongDate"
+#define SRMSGDEFSET_USELONGDATE 0
+#define SRMSGSET_SHOWSECONDS "ShowSeconds"
+#define SRMSGDEFSET_SHOWSECONDS 1
+#define SRMSGSET_USERELATIVEDATE "UseRelativeDate"
+#define SRMSGDEFSET_USERELATIVEDATE 0
+
+#define SRMSGSET_GROUPMESSAGES "GroupMessages"
#define SRMSGDEFSET_GROUPMESSAGES 0
#define SRMSGSET_MARKFOLLOWUPS "MarkFollowUps"
#define SRMSGDEFSET_MARKFOLLOWUPS 0
-#define SRMSGSET_MESSAGEONNEWLINE "MessageOnNewLine"
+#define SRMSGSET_MESSAGEONNEWLINE "MessageOnNewLine"
#define SRMSGDEFSET_MESSAGEONNEWLINE 0
#define SRMSGSET_DRAWLINES "DrawLines"
#define SRMSGDEFSET_DRAWLINES 0
-#define SRMSGSET_LINECOLOUR "LineColour"
-#define SRMSGDEFSET_LINECOLOUR GetSysColor(COLOR_WINDOW)
-#define SRMSGSET_INDENTTEXT "IndentText"
+#define SRMSGSET_INDENTTEXT "IndentText"
#define SRMSGDEFSET_INDENTTEXT 0
-#define SRMSGSET_INDENTSIZE "IndentSize"
+#define SRMSGSET_INDENTSIZE "IndentSize"
#define SRMSGDEFSET_INDENTSIZE 0
#define SRMSGSET_SHOWLOGICONS "ShowLogIcon"
@@ -378,33 +376,35 @@ extern int fontOptionsListSize; #define SRMSGSET_OUTGOINGBKGCOLOUR "OutgoingBkgColour"
#define SRMSGDEFSET_OUTGOINGBKGCOLOUR GetSysColor(COLOR_WINDOW)
#define SRMSGSET_INFOBARBKGCOLOUR "InfobarBkgColour"
-#define SRMSGDEFSET_INFOBARBKGCOLOUR GetSysColor(COLOR_BTNFACE)
-
-#define SRMSGSET_USEIEVIEW "UseIEView"
-#define SRMSGDEFSET_USEIEVIEW 1
-
-
-#define SRMSGSET_TYPING "SupportTyping"
-#define SRMSGSET_TYPINGNEW "DefaultTyping"
-#define SRMSGDEFSET_TYPINGNEW 1
-#define SRMSGSET_TYPINGUNKNOWN "UnknownTyping"
-#define SRMSGDEFSET_TYPINGUNKNOWN 0
-#define SRMSGSET_SHOWTYPING "ShowTyping"
-#define SRMSGDEFSET_SHOWTYPING 1
-#define SRMSGSET_SHOWTYPINGWIN "ShowTypingWin"
-#define SRMSGDEFSET_SHOWTYPINGWIN 1
-#define SRMSGSET_SHOWTYPINGNOWIN "ShowTypingTray"
-#define SRMSGDEFSET_SHOWTYPINGNOWIN 0
-#define SRMSGSET_SHOWTYPINGCLIST "ShowTypingClist"
-#define SRMSGDEFSET_SHOWTYPINGCLIST 1
-#define SRMSGSET_SHOWTYPINGSWITCH "ShowTypingSwitch"
+#define SRMSGDEFSET_INFOBARBKGCOLOUR GetSysColor(COLOR_3DLIGHT)
+#define SRMSGSET_LINECOLOUR "LineColour"
+#define SRMSGDEFSET_LINECOLOUR GetSysColor(COLOR_WINDOW)
+
+#define SRMSGSET_USEIEVIEW "UseIEView"
+#define SRMSGDEFSET_USEIEVIEW 1
+
+
+#define SRMSGSET_TYPING "SupportTyping"
+#define SRMSGSET_TYPINGNEW "DefaultTyping"
+#define SRMSGDEFSET_TYPINGNEW 1
+#define SRMSGSET_TYPINGUNKNOWN "UnknownTyping"
+#define SRMSGDEFSET_TYPINGUNKNOWN 0
+#define SRMSGSET_SHOWTYPING "ShowTyping"
+#define SRMSGDEFSET_SHOWTYPING 1
+#define SRMSGSET_SHOWTYPINGWIN "ShowTypingWin"
+#define SRMSGDEFSET_SHOWTYPINGWIN 1
+#define SRMSGSET_SHOWTYPINGNOWIN "ShowTypingTray"
+#define SRMSGDEFSET_SHOWTYPINGNOWIN 0
+#define SRMSGSET_SHOWTYPINGCLIST "ShowTypingClist"
+#define SRMSGDEFSET_SHOWTYPINGCLIST 1
+#define SRMSGSET_SHOWTYPINGSWITCH "ShowTypingSwitch"
#define SRMSGDEFSET_SHOWTYPINGSWITCH 1
-#define SRMSGSET_AVATARENABLE "AvatarEnable"
-#define SRMSGDEFSET_AVATARENABLE 1
+#define SRMSGSET_AVATARENABLE "AvatarEnable"
+#define SRMSGDEFSET_AVATARENABLE 1
#define SRMSGSET_USETRANSPARENCY "UseTransparency"
-#define SRMSGDEFSET_USETRANSPARENCY 0
+#define SRMSGDEFSET_USETRANSPARENCY 0
#define SRMSGSET_ACTIVEALPHA "ActiveAlpha"
#define SRMSGDEFSET_ACTIVEALPHA 0
#define SRMSGSET_INACTIVEALPHA "InactiveAlpha"
@@ -414,12 +414,12 @@ extern int fontOptionsListSize; #define SRMSGDEFSET_SAVEDRAFTS 0
#define SRMSGSET_BUTTONVISIBILITY "ButtonVisibility"
#define SRMSGDEFSET_BUTTONVISIBILITY 0xFFFF
-#define SRMSGSET_CHATBUTTONVISIBILITY "ChatButtonVisibility"
+#define SRMSGSET_CHATBUTTONVISIBILITY "ChatButtonVisibility"
#define SRMSGDEFSET_CHATBUTTONVISIBILITY 0xFFFF
#define SRMSGSET_HIDECONTAINERS "HideContainers"
-#define SRMSGDEFSET_HIDECONTAINERS 0
+#define SRMSGDEFSET_HIDECONTAINERS 0
-#define SRMSGSET_AUTORESIZELINES "AutoResizeLines"
-#define SRMSGDEFSET_AUTORESIZELINES 2
+#define SRMSGSET_AUTORESIZELINES "AutoResizeLines"
+#define SRMSGDEFSET_AUTORESIZELINES 2
#endif
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h index b3fbcafad0..f0582b93fb 100644 --- a/plugins/Scriver/src/resource.h +++ b/plugins/Scriver/src/resource.h @@ -253,7 +253,6 @@ #define ID_MESS 50001
#define ID_COPYALL 50006
#define ID_Menu 50026
-#define IDC_STATIC -1
// Next default values for new objects
//
diff --git a/plugins/Scriver/src/richutil.cpp b/plugins/Scriver/src/richutil.cpp index 8cd9eb4abc..9de434bc9e 100644 --- a/plugins/Scriver/src/richutil.cpp +++ b/plugins/Scriver/src/richutil.cpp @@ -40,8 +40,8 @@ static SortedList sListInt; static int RichUtil_CmpVal(void *p1, void *p2)
{
- TRichUtil *tp1 = (TRichUtil*)p1;
- TRichUtil *tp2 = (TRichUtil*)p2;
+ TRichUtil *tp1 = (TRichUtil *)p1;
+ TRichUtil *tp2 = (TRichUtil *)p2;
return (int)((INT_PTR)tp1->hwnd - (INT_PTR)tp2->hwnd);
}
@@ -69,7 +69,7 @@ int RichUtil_SubClass(HWND hwndEdit) if (IsWindow(hwndEdit)) {
int idx;
- TRichUtil *ru = (TRichUtil*)mir_calloc(sizeof(TRichUtil));
+ TRichUtil *ru = (TRichUtil *)mir_calloc(sizeof(TRichUtil));
ru->hwnd = hwndEdit;
ru->hasUglyBorder = 0;
@@ -96,10 +96,10 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM EnterCriticalSection(&csRich);
if (List_GetIndex(&sListInt, &tru, &idx))
- ru = (TRichUtil*)sListInt.items[idx];
+ ru = (TRichUtil *)sListInt.items[idx];
LeaveCriticalSection(&csRich);
- switch(msg) {
+ switch (msg) {
case WM_THEMECHANGED:
case WM_STYLECHANGED:
RichUtil_ClearUglyBorder(ru);
@@ -111,8 +111,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
HANDLE hTheme = OpenThemeData(ru->hwnd, L"EDIT");
- if (hTheme)
- {
+ if (hTheme) {
RECT rcBorder;
RECT rcClient;
int nState;
@@ -148,19 +147,19 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_NCCALCSIZE:
{
ret = mir_callNextSubclass(hwnd, RichUtil_Proc, msg, wParam, lParam);
- NCCALCSIZE_PARAMS *ncsParam = (NCCALCSIZE_PARAMS*)lParam;
+ NCCALCSIZE_PARAMS *ncsParam = (NCCALCSIZE_PARAMS *)lParam;
if (ru->hasUglyBorder && IsThemeActive()) {
HANDLE hTheme = OpenThemeData(hwnd, L"EDIT");
if (hTheme) {
- RECT rcClient ={0};
+ RECT rcClient = {0};
HDC hdc = GetDC(GetParent(hwnd));
if (GetThemeBackgroundContentRect(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &ncsParam->rgrc[0], &rcClient) == S_OK) {
- ru->rect.left = rcClient.left-ncsParam->rgrc[0].left;
- ru->rect.top = rcClient.top-ncsParam->rgrc[0].top;
- ru->rect.right = ncsParam->rgrc[0].right-rcClient.right;
- ru->rect.bottom = ncsParam->rgrc[0].bottom-rcClient.bottom;
+ ru->rect.left = rcClient.left - ncsParam->rgrc[0].left;
+ ru->rect.top = rcClient.top - ncsParam->rgrc[0].top;
+ ru->rect.right = ncsParam->rgrc[0].right - rcClient.right;
+ ru->rect.bottom = ncsParam->rgrc[0].bottom - rcClient.bottom;
ncsParam->rgrc[0] = rcClient;
CloseThemeData(hTheme);
|