From 3dd1a999c9e643fd92fd34301d9e65a7f07d8c54 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Mar 2017 14:28:10 +0300 Subject: various code cleaning & name conflict resolution --- plugins/Scriver/src/globals.cpp | 110 ++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 55 deletions(-) (limited to 'plugins/Scriver/src/globals.cpp') diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 4e0cb78bf4..d1bf90f4b6 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -160,7 +160,7 @@ static int ackevent(WPARAM, LPARAM lParam) if (item->hwndErrorDlg != nullptr) DestroyWindow(item->hwndErrorDlg); - if (RemoveSendQueueItem(item) && db_get_b(0, SRMMMOD, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) { + if (RemoveSendQueueItem(item) && db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) { if (hwndSender != nullptr) DestroyWindow(hwndSender); } @@ -275,11 +275,11 @@ void LoadInfobarFonts() { LOGFONT lf; LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, nullptr); - g_dat.minInputAreaHeight = db_get_dw(0, SRMMMOD, SRMSGSET_AUTORESIZELINES, SRMSGDEFSET_AUTORESIZELINES) * abs(lf.lfHeight) * g_dat.logPixelSY / 72; + g_dat.minInputAreaHeight = db_get_dw(0, SRMM_MODULE, SRMSGSET_AUTORESIZELINES, SRMSGDEFSET_AUTORESIZELINES) * abs(lf.lfHeight) * g_dat.logPixelSY / 72; if (g_dat.hInfobarBrush != nullptr) DeleteObject(g_dat.hInfobarBrush); - g_dat.hInfobarBrush = CreateSolidBrush(db_get_dw(0, SRMMMOD, SRMSGSET_INFOBARBKGCOLOUR, SRMSGDEFSET_INFOBARBKGCOLOUR)); + g_dat.hInfobarBrush = CreateSolidBrush(db_get_dw(0, SRMM_MODULE, SRMSGSET_INFOBARBKGCOLOUR, SRMSGDEFSET_INFOBARBKGCOLOUR)); } void InitGlobals() @@ -332,108 +332,108 @@ void ReloadGlobals() { g_dat.flags = 0; g_dat.flags2 = 0; - if (db_get_b(0, SRMMMOD, SRMSGSET_AVATARENABLE, SRMSGDEFSET_AVATARENABLE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_AVATARENABLE, SRMSGDEFSET_AVATARENABLE)) g_dat.flags |= SMF_AVATAR; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS)) g_dat.flags |= SMF_SHOWPROGRESS; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS)) g_dat.flags |= SMF_SHOWICONS; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME)) g_dat.flags |= SMF_SHOWTIME; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS)) g_dat.flags |= SMF_SHOWSECONDS; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE)) g_dat.flags |= SMF_SHOWDATE; - if (db_get_b(0, SRMMMOD, SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE)) g_dat.flags |= SMF_LONGDATE; - if (db_get_b(0, SRMMMOD, SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE)) g_dat.flags |= SMF_RELATIVEDATE; - if (db_get_b(0, SRMMMOD, SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES)) g_dat.flags |= SMF_GROUPMESSAGES; - if (db_get_b(0, SRMMMOD, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS)) g_dat.flags |= SMF_MARKFOLLOWUPS; - if (db_get_b(0, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE)) g_dat.flags |= SMF_MSGONNEWLINE; - if (db_get_b(0, SRMMMOD, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES)) g_dat.flags |= SMF_DRAWLINES; - if (db_get_b(0, SRMMMOD, SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES)) g_dat.flags |= SMF_HIDENAMES; - if (db_get_b(0, SRMMMOD, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP)) g_dat.flags |= SMF_AUTOPOPUP; - if (db_get_b(0, SRMMMOD, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED)) g_dat.flags |= SMF_STAYMINIMIZED; - if (db_get_b(0, SRMMMOD, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS)) g_dat.flags |= SMF_SAVEDRAFTS; - if (db_get_b(0, SRMMMOD, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP)) g_dat.flags |= SMF_DELTEMP; - if (db_get_b(0, SRMMMOD, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER)) g_dat.flags |= SMF_SENDONENTER; - if (db_get_b(0, SRMMMOD, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) g_dat.flags |= SMF_SENDONDBLENTER; - if (db_get_b(0, SRMMMOD, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON)) g_dat.flags |= SMF_STATUSICON; - if (db_get_b(0, SRMMMOD, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT)) g_dat.flags |= SMF_INDENTTEXT; - g_dat.openFlags = db_get_dw(0, SRMMMOD, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS); - g_dat.indentSize = db_get_w(0, SRMMMOD, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE); - g_dat.logLineColour = db_get_dw(0, SRMMMOD, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR); + g_dat.openFlags = db_get_dw(0, SRMM_MODULE, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS); + g_dat.indentSize = db_get_w(0, SRMM_MODULE, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE); + g_dat.logLineColour = db_get_dw(0, SRMM_MODULE, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR); - if (db_get_b(0, SRMMMOD, SRMSGSET_USETABS, SRMSGDEFSET_USETABS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_USETABS, SRMSGDEFSET_USETABS)) g_dat.flags2 |= SMF2_USETABS; - if (db_get_b(0, SRMMMOD, SRMSGSET_TABSATBOTTOM, SRMSGDEFSET_TABSATBOTTOM)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_TABSATBOTTOM, SRMSGDEFSET_TABSATBOTTOM)) g_dat.flags2 |= SMF2_TABSATBOTTOM; - if (db_get_b(0, SRMMMOD, SRMSGSET_SWITCHTOACTIVE, SRMSGDEFSET_SWITCHTOACTIVE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SWITCHTOACTIVE, SRMSGDEFSET_SWITCHTOACTIVE)) g_dat.flags2 |= SMF2_SWITCHTOACTIVE; - if (db_get_b(0, SRMMMOD, SRMSGSET_LIMITNAMES, SRMSGDEFSET_LIMITNAMES)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITNAMES, SRMSGDEFSET_LIMITNAMES)) g_dat.flags2 |= SMF2_LIMITNAMES; - if (db_get_b(0, SRMMMOD, SRMSGSET_HIDEONETAB, SRMSGDEFSET_HIDEONETAB)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_HIDEONETAB, SRMSGDEFSET_HIDEONETAB)) g_dat.flags2 |= SMF2_HIDEONETAB; - if (db_get_b(0, SRMMMOD, SRMSGSET_SEPARATECHATSCONTAINERS, SRMSGDEFSET_SEPARATECHATSCONTAINERS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SEPARATECHATSCONTAINERS, SRMSGDEFSET_SEPARATECHATSCONTAINERS)) g_dat.flags2 |= SMF2_SEPARATECHATSCONTAINERS; - if (db_get_b(0, SRMMMOD, SRMSGSET_TABCLOSEBUTTON, SRMSGDEFSET_TABCLOSEBUTTON)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_TABCLOSEBUTTON, SRMSGDEFSET_TABCLOSEBUTTON)) g_dat.flags2 |= SMF2_TABCLOSEBUTTON; - if (db_get_b(0, SRMMMOD, SRMSGSET_LIMITTABS, SRMSGDEFSET_LIMITTABS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITTABS, SRMSGDEFSET_LIMITTABS)) g_dat.flags2 |= SMF2_LIMITTABS; - if (db_get_b(0, SRMMMOD, SRMSGSET_LIMITCHATSTABS, SRMSGDEFSET_LIMITCHATSTABS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABS, SRMSGDEFSET_LIMITCHATSTABS)) g_dat.flags2 |= SMF2_LIMITCHATSTABS; - if (db_get_b(0, SRMMMOD, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS)) g_dat.flags2 |= SMF2_HIDECONTAINERS; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR)) g_dat.flags2 |= SMF2_SHOWSTATUSBAR; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR)) g_dat.flags2 |= SMF2_SHOWTITLEBAR; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE)) g_dat.flags2 |= SMF2_SHOWTOOLBAR; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR)) g_dat.flags2 |= SMF2_SHOWINFOBAR; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING)) g_dat.flags2 |= SMF2_SHOWTYPING; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN)) g_dat.flags2 |= SMF2_SHOWTYPINGWIN; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN)) g_dat.flags2 |= SMF2_SHOWTYPINGTRAY; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST)) g_dat.flags2 |= SMF2_SHOWTYPINGCLIST; - if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH)) g_dat.flags2 |= SMF2_SHOWTYPINGSWITCH; if (LOBYTE(LOWORD(GetVersion())) >= 5) { - if (db_get_b(0, SRMMMOD, SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY)) g_dat.flags2 |= SMF2_USETRANSPARENCY; - g_dat.activeAlpha = db_get_dw(0, SRMMMOD, SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA); - g_dat.inactiveAlpha = db_get_dw(0, SRMMMOD, SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA); + g_dat.activeAlpha = db_get_dw(0, SRMM_MODULE, SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA); + g_dat.inactiveAlpha = db_get_dw(0, SRMM_MODULE, SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA); } - if (db_get_b(0, SRMMMOD, SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW)) + if (db_get_b(0, SRMM_MODULE, SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW)) g_dat.flags |= SMF_USEIEVIEW; - g_dat.buttonVisibility = db_get_dw(0, SRMMMOD, SRMSGSET_BUTTONVISIBILITY, SRMSGDEFSET_BUTTONVISIBILITY); - g_dat.chatBbuttonVisibility = db_get_dw(0, SRMMMOD, SRMSGSET_CHATBUTTONVISIBILITY, SRMSGDEFSET_CHATBUTTONVISIBILITY); + g_dat.buttonVisibility = db_get_dw(0, SRMM_MODULE, SRMSGSET_BUTTONVISIBILITY, SRMSGDEFSET_BUTTONVISIBILITY); + g_dat.chatBbuttonVisibility = db_get_dw(0, SRMM_MODULE, SRMSGSET_CHATBUTTONVISIBILITY, SRMSGDEFSET_CHATBUTTONVISIBILITY); - g_dat.limitNamesLength = db_get_dw(0, SRMMMOD, SRMSGSET_LIMITNAMESLEN, SRMSGDEFSET_LIMITNAMESLEN); - g_dat.limitTabsNum = db_get_dw(0, SRMMMOD, SRMSGSET_LIMITTABSNUM, SRMSGDEFSET_LIMITTABSNUM); - g_dat.limitChatsTabsNum = db_get_dw(0, SRMMMOD, SRMSGSET_LIMITCHATSTABSNUM, SRMSGDEFSET_LIMITCHATSTABSNUM); + g_dat.limitNamesLength = db_get_dw(0, SRMM_MODULE, SRMSGSET_LIMITNAMESLEN, SRMSGDEFSET_LIMITNAMESLEN); + g_dat.limitTabsNum = db_get_dw(0, SRMM_MODULE, SRMSGSET_LIMITTABSNUM, SRMSGDEFSET_LIMITTABSNUM); + g_dat.limitChatsTabsNum = db_get_dw(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABSNUM, SRMSGDEFSET_LIMITCHATSTABSNUM); } -- cgit v1.2.3