diff options
author | George Hazan <ghazan@miranda.im> | 2019-08-30 18:37:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-08-30 18:37:52 +0300 |
commit | 49a6631f2acb2f0078bf536322fae5d7aac0e1e3 (patch) | |
tree | e7a29e9b59e3601e9daa9197a5990365be62b06b /plugins/Scriver/src | |
parent | 1911373fab4414e3e9004ea00926414e23a91bf0 (diff) |
no more old-style settings in Scriver
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 8 | ||||
-rw-r--r-- | plugins/Scriver/src/input.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 11 | ||||
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 55 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 39 | ||||
-rw-r--r-- | plugins/Scriver/src/sendqueue.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/srmm.cpp | 10 | ||||
-rw-r--r-- | plugins/Scriver/src/stdafx.h | 5 | ||||
-rw-r--r-- | plugins/Scriver/src/tabs.cpp | 10 |
9 files changed, 57 insertions, 85 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 4ed0d44778..bf8c30f6d4 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -163,7 +163,7 @@ static int ackevent(WPARAM, LPARAM lParam) if (item->hwndErrorDlg != nullptr)
DestroyWindow(item->hwndErrorDlg);
- if (RemoveSendQueueItem(item) && g_plugin.getByte(SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
+ if (RemoveSendQueueItem(item) && g_plugin.bAutoClose) {
if (hwndSender != nullptr)
DestroyWindow(hwndSender);
}
@@ -367,7 +367,7 @@ void ReloadGlobals() g_dat.flags.bUseIeview = g_plugin.bUseIeview;
g_dat.sendMode = (SendMode)g_plugin.getByte(SRMSGSET_SENDMODE, SRMSGDEFSET_SENDMODE);
- g_dat.openFlags = g_plugin.getDword(SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS);
+ g_dat.openFlags = g_plugin.iPopFlags;
g_dat.indentSize = g_plugin.iIndentSize;
g_dat.logLineColour = g_plugin.getDword(SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR);
@@ -394,8 +394,8 @@ void ReloadGlobals() g_dat.flags2.bShowTypingClist = g_plugin.bShowTypingClist;
g_dat.flags2.bShowTypingSwitch = g_plugin.bShowTypingSwitch;
- g_dat.activeAlpha = g_plugin.getDword(SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA);
- g_dat.inactiveAlpha = g_plugin.getDword(SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA);
+ g_dat.activeAlpha = g_plugin.iActiveAlpha;
+ g_dat.inactiveAlpha = g_plugin.iInactiveAlpha;
g_dat.limitNamesLength = g_plugin.iLimitNames;
g_dat.limitTabsNum = g_plugin.iLimitTabs;
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index ca2123e6ef..81cedf22ca 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -224,7 +224,7 @@ int CScriverWindow::InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARA return FALSE;
}
- if ((wParam == VK_UP || wParam == VK_DOWN) && isCtrl && !g_plugin.getByte(SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
+ if ((wParam == VK_UP || wParam == VK_DOWN) && isCtrl && !g_plugin.bAutoClose) {
if (cmdList && hwnd == m_message.GetHwnd()) {
TCmdList *cmdListNew = nullptr;
if (wParam == VK_UP) {
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 93b09eea58..adcd1ac87b 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -288,7 +288,7 @@ bool CSrmmWindow::OnInitDialog() bool notifyUnread = false;
if (m_hContact) {
- int historyMode = g_plugin.getByte(SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY);
+ int historyMode = g_plugin.iHistoryMode;
// This finds the first message to display, it works like shit
m_hDbEventFirst = db_event_firstUnread(m_hContact);
if (m_hDbEventFirst != 0) {
@@ -620,7 +620,7 @@ bool CSrmmWindow::IsTypingNotificationSupported() bool CSrmmWindow::IsTypingNotificationEnabled()
{
- if (!g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)))
+ if (!g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew))
return FALSE;
DWORD protoStatus = Proto_GetStatus(m_szProto);
@@ -634,8 +634,7 @@ bool CSrmmWindow::IsTypingNotificationEnabled() if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
return FALSE;
- if (db_get_b(m_hContact, "CList", "NotOnList", 0)
- && !g_plugin.getByte(SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
+ if (db_get_b(m_hContact, "CList", "NotOnList", 0) && !g_plugin.bTypingUnknown)
return FALSE;
return TRUE;
}
@@ -772,7 +771,7 @@ void CSrmmWindow::UpdateStatusBar() Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 0, MBF_DISABLED);
if (IsTypingNotificationSupported() && g_dat.flags2.bShowTypingSwitch) {
- int mode = g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
+ int mode = g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew);
Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, mode ? 0 : MBF_DISABLED);
}
else Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, MBF_HIDDEN);
@@ -1269,7 +1268,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case DM_SWITCHTYPING:
if (IsTypingNotificationSupported()) {
- BYTE typingNotify = (g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)));
+ BYTE typingNotify = (g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew));
g_plugin.setByte(m_hContact, SRMSGSET_TYPING, (BYTE)!typingNotify);
Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, typingNotify ? MBF_DISABLED : 0);
}
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 8805ce6cee..45660ba6bc 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -63,17 +63,16 @@ struct {
const wchar_t *szName;
const char *szSettingName;
- COLORREF defColour;
int systemColor;
}
static const colourOptionsList[] =
{
- { LPGENW("Background"), SRMSGSET_BKGCOLOUR, 0, COLOR_WINDOW},
- { LPGENW("Input area background"), SRMSGSET_INPUTBKGCOLOUR, 0, COLOR_WINDOW},
- { LPGENW("Incoming background"), SRMSGSET_INCOMINGBKGCOLOUR, 0, COLOR_WINDOW},
- { LPGENW("Outgoing background"), SRMSGSET_OUTGOINGBKGCOLOUR, 0, COLOR_WINDOW},
- { LPGENW("Info bar background"), SRMSGSET_INFOBARBKGCOLOUR, 0, COLOR_3DLIGHT},
- { LPGENW("Line between messages"), SRMSGSET_LINECOLOUR, 0, COLOR_3DLIGHT},
+ { LPGENW("Background"), SRMSGSET_BKGCOLOUR, COLOR_WINDOW },
+ { LPGENW("Input area background"), SRMSGSET_INPUTBKGCOLOUR, COLOR_WINDOW },
+ { LPGENW("Incoming background"), SRMSGSET_INCOMINGBKGCOLOUR, COLOR_WINDOW },
+ { LPGENW("Outgoing background"), SRMSGSET_OUTGOINGBKGCOLOUR, COLOR_WINDOW },
+ { LPGENW("Info bar background"), SRMSGSET_INFOBARBKGCOLOUR, COLOR_3DLIGHT },
+ { LPGENW("Line between messages"), SRMSGSET_LINECOLOUR, COLOR_3DLIGHT },
};
int FontServiceFontsChanged(WPARAM, LPARAM)
@@ -114,12 +113,8 @@ void RegisterFontServiceFonts() for (int i = 0; i < _countof(colourOptionsList); i++) {
cid.order = i;
wcsncpy(cid.name, colourOptionsList[i].szName, _countof(cid.name));
- if (colourOptionsList[i].systemColor != -1)
- cid.defcolour = GetSysColor(colourOptionsList[i].systemColor);
- else
- cid.defcolour = colourOptionsList[i].defColour;
-
strncpy(cid.setting, colourOptionsList[i].szSettingName, _countof(cid.setting));
+ cid.defcolour = GetSysColor(colourOptionsList[i].systemColor);
g_plugin.addColor(&cid);
}
}
@@ -251,6 +246,7 @@ class CMainOptionsDlg : public CBaseOptionDlg return flags;
}
+ CCtrlSpin spinTimeout;
CCtrlCheck chkAutoMin, chkAutoPopup, chkCascade, chkSavePerContact, chkStayMinimized;
CCtrlCheck chkSaveDrafts, chkDelTemp, chkHideContainer;
CCtrlCombo cmbSendMode;
@@ -260,6 +256,7 @@ public: CMainOptionsDlg() :
CBaseOptionDlg(IDD_OPT_MSGDLG),
m_tree(this, IDC_POPLIST),
+ spinTimeout(this, IDC_SECONDSSPIN, 60, 4),
chkAutoMin(this, IDC_AUTOMIN),
chkCascade(this, IDC_CASCADE),
chkDelTemp(this, IDC_DELTEMP),
@@ -270,6 +267,7 @@ public: chkStayMinimized(this, IDC_STAYMINIMIZED),
chkSavePerContact(this, IDC_SAVEPERCONTACT)
{
+ CreateLink(spinTimeout, g_plugin.iMsgTimeout);
CreateLink(chkCascade, g_plugin.bCascade);
CreateLink(chkAutoMin, g_plugin.bAutoMin);
CreateLink(chkAutoPopup, g_plugin.bAutoPopup);
@@ -286,10 +284,7 @@ public: bool OnInitDialog() override
{
SetWindowLongPtr(m_tree.GetHwnd(), GWL_STYLE, (GetWindowLongPtr(m_tree.GetHwnd(), GWL_STYLE) & ~WS_BORDER) | TVS_NOHSCROLL | TVS_CHECKBOXES);
- FillCheckBoxTree(statusValues, _countof(statusValues), g_plugin.getDword(SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS));
-
- SendDlgItemMessage(m_hwnd, IDC_SECONDSSPIN, UDM_SETRANGE, 0, MAKELONG(60, 4));
- SendDlgItemMessage(m_hwnd, IDC_SECONDSSPIN, UDM_SETPOS, 0, g_plugin.getDword(SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT) / 1000);
+ FillCheckBoxTree(statusValues, _countof(statusValues), g_plugin.iPopFlags);
cmbSendMode.AddString(TranslateT("Enter"));
cmbSendMode.AddString(TranslateT("Double 'Enter'"));
@@ -303,9 +298,7 @@ public: bool OnApply() override
{
- g_plugin.setDword(SRMSGSET_POPFLAGS, MakeCheckBoxTreeFlags());
-
- g_plugin.setDword(SRMSGSET_MSGTIMEOUT, (DWORD)SendDlgItemMessage(m_hwnd, IDC_SECONDSSPIN, UDM_GETPOS, 0, 0) * 1000);
+ g_plugin.iPopFlags = MakeCheckBoxTreeFlags();
g_plugin.setByte(SRMSGSET_SENDMODE, cmbSendMode.GetCurSel());
return true;
@@ -464,9 +457,9 @@ public: SetWindowText(GetDlgItem(m_hwnd, IDC_TITLEFORMAT), g_dat.wszTitleFormat);
SendDlgItemMessage(m_hwnd, IDC_ATRANSPARENCYVALUE, TBM_SETRANGE, FALSE, MAKELONG(0, 255));
- SendDlgItemMessage(m_hwnd, IDC_ATRANSPARENCYVALUE, TBM_SETPOS, TRUE, g_plugin.getDword(SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA));
+ SendDlgItemMessage(m_hwnd, IDC_ATRANSPARENCYVALUE, TBM_SETPOS, TRUE, g_plugin.iActiveAlpha);
SendDlgItemMessage(m_hwnd, IDC_ITRANSPARENCYVALUE, TBM_SETRANGE, FALSE, MAKELONG(0, 255));
- SendDlgItemMessage(m_hwnd, IDC_ITRANSPARENCYVALUE, TBM_SETPOS, TRUE, g_plugin.getDword(SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA));
+ SendDlgItemMessage(m_hwnd, IDC_ITRANSPARENCYVALUE, TBM_SETPOS, TRUE, g_plugin.iInactiveAlpha);
char str[10];
mir_snprintf(str, "%d%%", (int)(100 * SendDlgItemMessage(m_hwnd, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0) / 255));
@@ -485,8 +478,8 @@ public: GetWindowText(GetDlgItem(m_hwnd, IDC_TITLEFORMAT), g_dat.wszTitleFormat, _countof(g_dat.wszTitleFormat));
g_plugin.setWString(SRMSGSET_WINDOWTITLE, g_dat.wszTitleFormat);
- g_plugin.setDword(SRMSGSET_ACTIVEALPHA, SendDlgItemMessage(m_hwnd, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0));
- g_plugin.setDword(SRMSGSET_INACTIVEALPHA, SendDlgItemMessage(m_hwnd, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0));
+ g_plugin.iActiveAlpha = SendDlgItemMessage(m_hwnd, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0);
+ g_plugin.iInactiveAlpha = SendDlgItemMessage(m_hwnd, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0);
LoadInfobarFonts();
return true;
@@ -618,7 +611,7 @@ public: bool OnInitDialog() override
{
- switch (g_plugin.getByte(SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY)) {
+ switch (g_plugin.iHistoryMode) {
case LOADHISTORY_UNREAD:
CheckDlgButton(m_hwnd, IDC_LOADUNREAD, BST_CHECKED);
break;
@@ -659,11 +652,11 @@ public: bool OnApply() override
{
if (IsDlgButtonChecked(m_hwnd, IDC_LOADCOUNT))
- g_plugin.setByte(SRMSGSET_LOADHISTORY, LOADHISTORY_COUNT);
+ g_plugin.iHistoryMode = LOADHISTORY_COUNT;
else if (IsDlgButtonChecked(m_hwnd, IDC_LOADTIME))
- g_plugin.setByte(SRMSGSET_LOADHISTORY, LOADHISTORY_TIME);
+ g_plugin.iHistoryMode = LOADHISTORY_TIME;
else
- g_plugin.setByte(SRMSGSET_LOADHISTORY, LOADHISTORY_UNREAD);
+ g_plugin.iHistoryMode = LOADHISTORY_UNREAD;
FreeMsgLogIcons();
LoadMsgLogIcons();
@@ -730,11 +723,11 @@ static void ResetCList(HWND hwndDlg) static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
{
- BYTE defType = g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW);
+ BYTE defType = g_plugin.bTypingNew;
if (hItemNew && defType)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemNew, 1);
- if (hItemUnknown && g_plugin.getByte(SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
+ if (hItemUnknown && g_plugin.bTypingUnknown)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
for (auto &hContact : Contacts()) {
@@ -747,10 +740,10 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
{
if (hItemNew)
- g_plugin.setByte(SRMSGSET_TYPINGNEW, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemNew, 0) ? 1 : 0));
+ g_plugin.bTypingNew = SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemNew, 0) != 0;
if (hItemUnknown)
- g_plugin.setByte(SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
+ g_plugin.bTypingUnknown = SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) != 0;
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 569b2d9238..6ae26e8c65 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -65,9 +65,10 @@ struct ParentWindowData int nFlashMax;
int bMinimized;
int bVMaximized;
- int bTopmost;
int iSplitterX, iSplitterY;
+ bool bTopmost;
+
int windowWasCascaded;
TabCtrlData *tabCtrlDat;
BOOL isChat;
@@ -319,28 +320,6 @@ extern int fontOptionsListSize; #define SRMM_MODULE "SRMM"
-#define SRMSGSET_TOPMOST "Topmost"
-#define SRMSGDEFSET_TOPMOST 0
-#define SRMSGSET_POPFLAGS "PopupFlags"
-#define SRMSGDEFSET_POPFLAGS 0
-#define SRMSGSET_SHOWINFOLINE "ShowInfoLine"
-#define SRMSGDEFSET_SHOWINFOLINE 1
-#define SRMSGSET_AUTOCLOSE "AutoClose"
-#define SRMSGDEFSET_AUTOCLOSE 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_MSGTIMEOUT "MessageTimeout"
-#define SRMSGDEFSET_MSGTIMEOUT 10000
-#define SRMSGSET_FLASHCOUNT "FlashMax"
-#define SRMSGDEFSET_FLASHCOUNT 3
-
-#define SRMSGSET_LOADHISTORY "LoadHistory"
-#define SRMSGDEFSET_LOADHISTORY LOADHISTORY_UNREAD
-
#define SRMSGSET_BKGCOLOUR "BkgColour"
#define SRMSGDEFSET_BKGCOLOUR GetSysColor(COLOR_WINDOW)
#define SRMSGSET_INPUTBKGCOLOUR "InputBkgColour"
@@ -355,20 +334,8 @@ extern int fontOptionsListSize; #define SRMSGDEFSET_LINECOLOUR GetSysColor(COLOR_WINDOW)
#define SRMSGSET_TYPING "SupportTyping"
-#define SRMSGSET_TYPINGNEW "DefaultTyping"
-#define SRMSGDEFSET_TYPINGNEW 1
-#define SRMSGSET_TYPINGUNKNOWN "UnknownTyping"
-#define SRMSGDEFSET_TYPINGUNKNOWN 0
-
-#define SRMSGSET_ACTIVEALPHA "ActiveAlpha"
-#define SRMSGDEFSET_ACTIVEALPHA 0
-#define SRMSGSET_INACTIVEALPHA "InactiveAlpha"
-#define SRMSGDEFSET_INACTIVEALPHA 0
+
#define SRMSGSET_WINDOWTITLE "WindowTitle"
-#define SRMSGSET_BUTTONVISIBILITY "ButtonVisibility"
-#define SRMSGDEFSET_BUTTONVISIBILITY 0xFFFF
-#define SRMSGSET_CHATBUTTONVISIBILITY "ChatButtonVisibility"
-#define SRMSGDEFSET_CHATBUTTONVISIBILITY 0xFFFF
#define SRMSGSET_SENDMODE "SendMode"
#define SRMSGDEFSET_SENDMODE 0
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp index 886dd1fc3c..1bc40938fc 100644 --- a/plugins/Scriver/src/sendqueue.cpp +++ b/plugins/Scriver/src/sendqueue.cpp @@ -73,7 +73,7 @@ bool RemoveSendQueueItem(MessageSendQueueItem *item) void ReportSendQueueTimeouts(HWND hwndSender)
{
- int timeout = g_plugin.getDword(SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT);
+ int timeout = g_plugin.iMsgTimeout * 1000;
mir_cslock lock(queueMutex);
diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp index 018b02fda1..cb054873c2 100644 --- a/plugins/Scriver/src/srmm.cpp +++ b/plugins/Scriver/src/srmm.cpp @@ -49,10 +49,14 @@ CMPlugin::CMPlugin() : PLUGIN<CMPlugin>(SRMM_MODULE, pluginInfoEx),
bCascade(SRMM_MODULE, "Cascade", 1),
bAutoMin(SRMM_MODULE, "AutoMin", 0),
+ bTopmost(SRMM_MODULE, "Topmost", 0),
bDelTemp(SRMM_MODULE, "DeleteTempCont", 0),
+ bTypingNew(SRMM_MODULE, "DefaultTyping", 1),
+ bAutoClose(SRMM_MODULE, "AutoClose", 0),
bAutoPopup(SRMM_MODULE, "AutoPopupMsg", 0),
bUseIeview(SRMM_MODULE, "UseIEView", 1),
bSaveDrafts(SRMM_MODULE, "SaveDrafts", 0),
+ bTypingUnknown(SRMM_MODULE, "UnknownTyping", 0),
bHideContainer(SRMM_MODULE, "HideContainers", 0),
bStayMinimized(SRMM_MODULE, "StayMinimized", 0),
bSavePerContact(SRMM_MODULE, "SavePerContact", 0),
@@ -99,7 +103,13 @@ CMPlugin::CMPlugin() : iLimitChatTabs(SRMM_MODULE, "LimitChatsTabsNum", 10),
iLoadCount(SRMM_MODULE, "LoadCount", 10),
iLoadTime(SRMM_MODULE, "LoadTime", 10),
+ iPopFlags(SRMM_MODULE, "PopupFlags", 0),
+ iFlashCount(SRMM_MODULE, "FlashMax", 3),
iIndentSize(SRMM_MODULE, "IndentSize", 0),
+ iActiveAlpha(SRMM_MODULE, "ActiveAlpha", 0),
+ iInactiveAlpha(SRMM_MODULE, "InactiveAlpha", 0),
+ iMsgTimeout(SRMM_MODULE, "MessageTimeout", 10),
+ iHistoryMode(SRMM_MODULE, "LoadHistory", LOADHISTORY_UNREAD),
iAutoResizeLines(SRMM_MODULE, "AutoResizeLines", 2)
{
}
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index 91e2b5068c..33164a84f1 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -70,13 +70,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMOption<BYTE> bSavePerContact, bCascade, bStayMinimized, bAutoMin, bSaveDrafts, bDelTemp, bHideContainer, bAutoPopup, bUseIeview, bUseTransparency;
+ CMOption<BYTE> bSavePerContact, bCascade, bStayMinimized, bAutoMin, bSaveDrafts, bDelTemp, bHideContainer, bAutoPopup;
+ CMOption<BYTE> bUseIeview, bUseTransparency, bTopmost, bAutoClose, bTypingNew, bTypingUnknown;
CMOption<BYTE> bShowTitleBar, bShowStatusBar, bShowToolBar, bShowInfoBar;
CMOption<BYTE> bShowAvatar, bShowProgress, bShowIcons, bShowTime, bShowSeconds, bShowDate, bLongDate, bRelativeDate;
CMOption<BYTE> bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText;
CMOption<BYTE> bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive;
CMOption<BYTE> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
+ CMOption<BYTE> iFlashCount, iHistoryMode;
CMOption<WORD> iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines;
+ CMOption<DWORD> iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha;
CMPlugin();
diff --git a/plugins/Scriver/src/tabs.cpp b/plugins/Scriver/src/tabs.cpp index f3722a02ff..8b24e91df9 100644 --- a/plugins/Scriver/src/tabs.cpp +++ b/plugins/Scriver/src/tabs.cpp @@ -590,7 +590,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara dat = (ParentWindowData *)mir_alloc(sizeof(ParentWindowData));
dat->hContact = newData->hContact;
dat->nFlash = 0;
- dat->nFlashMax = g_plugin.getByte(SRMSGSET_FLASHCOUNT, SRMSGDEFSET_FLASHCOUNT);
+ dat->nFlashMax = g_plugin.iFlashCount;
dat->childrenCount = 0;
dat->hwnd = hwndDlg;
dat->mouseLBDown = 0;
@@ -628,7 +628,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara SetContainerWindowStyle(dat);
MCONTACT hSContact = savePerContact ? dat->hContact : 0;
- dat->bTopmost = g_plugin.getByte(hSContact, SRMSGSET_TOPMOST, SRMSGDEFSET_TOPMOST);
+ dat->bTopmost = g_plugin.bTopmost;
if (Utils_RestoreWindowPosition(hwndDlg, hSContact, SRMM_MODULE, (newData->isChat && !savePerContact) ? "chat" : "", RWPF_HIDDEN))
SetWindowPos(hwndDlg, nullptr, 0, 0, 450, 300, SWP_NOZORDER | SWP_NOMOVE | SWP_HIDEWINDOW);
@@ -950,12 +950,12 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara if (dat->bTopmost) {
CheckMenuItem(hMenu, IDM_TOPMOST, MF_BYCOMMAND | MF_UNCHECKED);
SetWindowPos(hwndDlg, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- dat->bTopmost = FALSE;
+ dat->bTopmost = false;
}
else {
CheckMenuItem(hMenu, IDM_TOPMOST, MF_BYCOMMAND | MF_CHECKED);
SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- dat->bTopmost = TRUE;
+ dat->bTopmost = true;
}
}
break;
@@ -979,7 +979,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara int savePerContact = g_plugin.bSavePerContact && !dat->flags2.bUseTabs;
MCONTACT hContact = (savePerContact) ? dat->hContact : 0;
Utils_SaveWindowPosition(hwndDlg, hContact, SRMM_MODULE, (!savePerContact && dat->isChat) ? "chat" : "");
- g_plugin.setByte(hContact, SRMSGSET_TOPMOST, (BYTE)dat->bTopmost);
+ g_plugin.bTopmost = dat->bTopmost;
}
if (g_dat.lastParent == dat)
|