diff options
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/res/resource.rc | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 36 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 132 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 39 | ||||
-rw-r--r-- | plugins/Scriver/src/resource.h | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/srmm.cpp | 22 | ||||
-rw-r--r-- | plugins/Scriver/src/stdafx.h | 3 |
9 files changed, 109 insertions, 133 deletions
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc index 82bb4a1e78..810615b941 100644 --- a/plugins/Scriver/res/resource.rc +++ b/plugins/Scriver/res/resource.rc @@ -119,7 +119,7 @@ BEGIN CONTROL "Show date",IDC_SHOWDATES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,58,132,10
CONTROL "Long date format",IDC_USELONGDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,69,123,10
CONTROL "Relative date",IDC_USERELATIVEDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,80,123,10
- CONTROL "Show names",IDC_SHOWNAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,25,140,10
+ CONTROL "Hide names",IDC_HIDENAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,25,140,10
CONTROL "Enable message grouping",IDC_GROUPMESSAGES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,36,140,10
CONTROL "Mark follow-up messages with timestamp",IDC_MARKFOLLOWUPS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,47,132,10
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index cff6f593d4..9c2fc48bc3 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -345,20 +345,20 @@ void ReloadGlobals() g_dat.dwFlags = 0;
g_dat.dwFlags2 = 0;
- g_dat.flags.bShowAvatar = g_plugin.getBool(SRMSGSET_AVATARENABLE, SRMSGDEFSET_AVATARENABLE);
- g_dat.flags.bShowProgress = g_plugin.getBool(SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS);
- g_dat.flags.bShowIcons = g_plugin.getBool(SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS);
- g_dat.flags.bShowTime = g_plugin.getBool(SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME);
- g_dat.flags.bShowSeconds = g_plugin.getBool(SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS);
- g_dat.flags.bShowDate = g_plugin.getBool(SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE);
- g_dat.flags.bLongDate = g_plugin.getBool(SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE);
- g_dat.flags.bRelativeDate = g_plugin.getBool(SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE);
- g_dat.flags.bGroupMessages = g_plugin.getBool(SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES);
- g_dat.flags.bMarkFollowups = g_plugin.getBool(SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS);
- g_dat.flags.bMsgOnNewline = g_plugin.getBool(SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE);
- g_dat.flags.bDrawLines = g_plugin.getBool(SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES);
- g_dat.flags.bHideNames = g_plugin.getBool(SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES);
- g_dat.flags.bIndentText = g_plugin.getByte(SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT);
+ g_dat.flags.bShowAvatar = g_plugin.bShowAvatar;
+ g_dat.flags.bShowProgress = g_plugin.bShowProgress;
+ g_dat.flags.bShowIcons = g_plugin.bShowIcons;
+ g_dat.flags.bShowTime = g_plugin.bShowTime;
+ g_dat.flags.bShowSeconds = g_plugin.bShowSeconds;
+ g_dat.flags.bShowDate = g_plugin.bShowDate;
+ g_dat.flags.bLongDate = g_plugin.bLongDate;
+ g_dat.flags.bRelativeDate = g_plugin.bRelativeDate;
+ g_dat.flags.bGroupMessages = g_plugin.bGroupMessages;
+ g_dat.flags.bMarkFollowups = g_plugin.bMarkFollowups;
+ g_dat.flags.bMsgOnNewline = g_plugin.bMsgOnNewline;
+ g_dat.flags.bDrawLines = g_plugin.bDrawLines;
+ g_dat.flags.bHideNames = g_plugin.bHideNames;
+ g_dat.flags.bIndentText = g_plugin.bIndentText;
g_dat.flags.bAutoPopup = g_plugin.bAutoPopup;
g_dat.flags.bStayMinimized = g_plugin.bStayMinimized;
@@ -381,10 +381,10 @@ void ReloadGlobals() g_dat.flags2.bLimitChatTabs = g_plugin.bLimitChatTabs;
g_dat.flags2.bHideContainer = g_plugin.bHideContainer;
- g_dat.flags2.bShowStatusBar = g_plugin.getBool(SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR);
- g_dat.flags2.bShowTitleBar = g_plugin.getBool(SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR);
- g_dat.flags2.bShowToolBar = g_plugin.getBool(SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE);
- g_dat.flags2.bShowInfoBar = g_plugin.getBool(SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR);
+ g_dat.flags2.bShowStatusBar = g_plugin.bShowStatusBar;
+ g_dat.flags2.bShowTitleBar = g_plugin.bShowTitleBar;
+ g_dat.flags2.bShowToolBar = g_plugin.bShowToolBar;
+ g_dat.flags2.bShowInfoBar = g_plugin.bShowInfoBar;
g_dat.flags2.bShowTyping = g_plugin.getBool(SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING);
g_dat.flags2.bShowTypingWin = g_plugin.getBool(SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index d93d1498c1..0503bf29f8 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -849,7 +849,7 @@ void CSrmmWindow::MessageDialogResize(int w, int h) if (hSplitterMinBottom < g_dat.minInputAreaHeight)
hSplitterMinBottom = g_dat.minInputAreaHeight;
- if (!(pdat->flags2.bShowInfoBar)) {
+ if (!pdat->flags2.bShowInfoBar) {
infobarHeight = 0;
infobarInnerHeight = 0;
}
@@ -866,7 +866,7 @@ void CSrmmWindow::MessageDialogResize(int w, int h) if (hSplitterPos < hSplitterMinBottom)
hSplitterPos = hSplitterMinBottom;
- if (!(pdat->flags2.bShowInfoBar)) {
+ if (!pdat->flags2.bShowInfoBar) {
if (m_hbmpAvatarPic && g_dat.flags.bShowAvatar) {
avatarWidth = BOTTOM_RIGHT_AVATAR_HEIGHT;
avatarHeight = toolbarHeight + hSplitterPos - 2;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index f7bd6d435b..13722cbb7d 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -477,7 +477,7 @@ static char* CreateRTFFromEvent(CSrmmWindow *dat, EventData *evt, GlobalMessageD wchar_t *timestampString = nullptr;
if (gdat->flags.bGroupMessages && evt->eventType == EVENTTYPE_MESSAGE) {
if (isGroupBreak) {
- if (!(gdat->flags.bMarkFollowups))
+ if (!gdat->flags.bMarkFollowups)
timestampString = TimestampToString(gdat->flags, evt->time, 0);
else if (gdat->flags.bShowDate)
timestampString = TimestampToString(gdat->flags, evt->time, 1);
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 585c854807..e72e60d770 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -431,25 +431,33 @@ public: class CLayoutOptionsDlg : public CBaseOptionDlg
{
- CCtrlCheck chkTransparency, chkShowTitlebar;
+ CCtrlCheck chkTransparency, chkShowTitlebar, chkShowStatusBar, chkShowToolbar, chkShowInfobar, chkShowProgress, chkShowAvatar;
public:
CLayoutOptionsDlg() :
CBaseOptionDlg(IDD_OPT_LAYOUT),
chkTransparency(this, IDC_TRANSPARENCY),
- chkShowTitlebar(this, IDC_SHOWTITLEBAR)
- {
+ chkShowAvatar(this, IDC_AVATARSUPPORT),
+ chkShowInfobar(this, IDC_SHOWINFOBAR),
+ chkShowToolbar(this, IDC_SHOWTOOLBAR),
+ chkShowTitlebar(this, IDC_SHOWTITLEBAR),
+ chkShowProgress(this, IDC_SHOWPROGRESS),
+ chkShowStatusBar(this, IDC_SHOWSTATUSBAR)
+ {
+ CreateLink(chkShowAvatar, g_plugin.bShowAvatar);
+ CreateLink(chkShowInfobar, g_plugin.bShowInfoBar);
+ CreateLink(chkShowToolbar, g_plugin.bShowToolBar);
+ CreateLink(chkShowTitlebar, g_plugin.bShowTitleBar);
+ CreateLink(chkShowProgress, g_plugin.bShowProgress);
+ CreateLink(chkShowStatusBar, g_plugin.bShowStatusBar);
+
chkTransparency.OnChange = Callback(this, &CLayoutOptionsDlg::onChange_Transparency);
chkShowTitlebar.OnChange = Callback(this, &CLayoutOptionsDlg::onChange_ShowTitlebar);
}
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_SHOWSTATUSBAR, g_plugin.getByte(SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWTITLEBAR, g_plugin.getByte(SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR) ? BST_CHECKED : BST_UNCHECKED);
SetWindowText(GetDlgItem(m_hwnd, IDC_TITLEFORMAT), g_dat.wszTitleFormat);
- CheckDlgButton(m_hwnd, IDC_SHOWTOOLBAR, g_plugin.getByte(SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWINFOBAR, g_plugin.getByte(SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_TRANSPARENCY, g_plugin.getByte(SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY) ? BST_CHECKED : BST_UNCHECKED);
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));
@@ -469,7 +477,6 @@ public: onChange_Transparency(0);
onChange_ShowTitlebar(0);
- CheckDlgButton(m_hwnd, IDC_SHOWPROGRESS, g_plugin.getByte(SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_AVATARSUPPORT, g_dat.flags.bShowAvatar);
return true;
}
@@ -479,19 +486,10 @@ public: GetWindowText(GetDlgItem(m_hwnd, IDC_TITLEFORMAT), g_dat.wszTitleFormat, _countof(g_dat.wszTitleFormat));
g_plugin.setWString(SRMSGSET_WINDOWTITLE, g_dat.wszTitleFormat);
- g_plugin.setByte(SRMSGSET_SHOWSTATUSBAR, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWSTATUSBAR));
- g_plugin.setByte(SRMSGSET_SHOWTITLEBAR, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWTITLEBAR));
- g_plugin.setByte(SRMSGSET_SHOWBUTTONLINE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWTOOLBAR));
- g_plugin.setByte(SRMSGSET_SHOWINFOBAR, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWINFOBAR));
-
g_plugin.setByte(SRMSGSET_USETRANSPARENCY, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENCY));
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.setByte(SRMSGSET_SHOWPROGRESS, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWPROGRESS));
-
- g_plugin.setByte(SRMSGSET_AVATARENABLE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_AVATARSUPPORT));
-
g_plugin.setWord(SRMSGSET_AUTORESIZELINES, (WORD)SendDlgItemMessage(m_hwnd, IDC_INPUTLINESSPIN, UDM_GETPOS, 0, 0));
LoadInfobarFonts();
return true;
@@ -510,7 +508,7 @@ public: void onChange_ShowTitlebar(CCtrlCheck*)
{
- int bChecked = IsDlgButtonChecked(m_hwnd, IDC_SHOWTITLEBAR);
+ bool bChecked = chkShowTitlebar.GetState();
EnableWindow(GetDlgItem(m_hwnd, IDC_TITLEFORMAT), bChecked);
}
@@ -535,7 +533,8 @@ public: class CLogOptionsDlg : public CBaseOptionDlg
{
CCtrlCheck chkLoadUnread, chkLoadCount, chkLoadTime;
- CCtrlCheck chkShowTime, chkShowDate, chkGroupMsg, chkIndentText;
+ CCtrlCheck chkShowIcons, chkShowTime, chkShowSecs, chkShowDate, chkLongDate, chkRelativeDate;
+ CCtrlCheck chkGroupMsg, chkIndentText, chkHideNames, chkMarkFollowups, chkMsgOnNewline, chkDrawLines;
CCtrlRichEdit m_log;
CCtrlHyperlink m_fonts;
@@ -544,18 +543,18 @@ class CLogOptionsDlg : public CBaseOptionDlg m_log.SetText(L"");
struct GlobalMessageData gdat = {};
- gdat.flags.bShowIcons = IsDlgButtonChecked(m_hwnd, IDC_SHOWLOGICONS);
- gdat.flags.bHideNames = !IsDlgButtonChecked(m_hwnd, IDC_SHOWNAMES);
- gdat.flags.bShowTime = IsDlgButtonChecked(m_hwnd, IDC_SHOWTIMES);
- gdat.flags.bShowSeconds = IsDlgButtonChecked(m_hwnd, IDC_SHOWSECONDS);
- gdat.flags.bShowDate = IsDlgButtonChecked(m_hwnd, IDC_SHOWDATES);
- gdat.flags.bLongDate = IsDlgButtonChecked(m_hwnd, IDC_USELONGDATE);
- gdat.flags.bRelativeDate = IsDlgButtonChecked(m_hwnd, IDC_USERELATIVEDATE);
- gdat.flags.bGroupMessages = IsDlgButtonChecked(m_hwnd, IDC_GROUPMESSAGES);
- gdat.flags.bMarkFollowups = IsDlgButtonChecked(m_hwnd, IDC_MARKFOLLOWUPS);
- gdat.flags.bMsgOnNewline = IsDlgButtonChecked(m_hwnd, IDC_MESSAGEONNEWLINE);
- gdat.flags.bDrawLines = IsDlgButtonChecked(m_hwnd, IDC_DRAWLINES);
- gdat.flags.bIndentText = IsDlgButtonChecked(m_hwnd, IDC_INDENTTEXT);
+ gdat.flags.bShowIcons = chkShowIcons.GetState();
+ gdat.flags.bHideNames = chkHideNames.GetState();
+ gdat.flags.bShowTime = chkShowTime.GetState();
+ gdat.flags.bShowSeconds = chkShowSecs.GetState();
+ gdat.flags.bShowDate = chkShowDate.GetState();
+ gdat.flags.bLongDate = chkLongDate.GetState();
+ gdat.flags.bRelativeDate = chkRelativeDate.GetState();
+ gdat.flags.bGroupMessages = chkGroupMsg.GetState();
+ gdat.flags.bMarkFollowups = chkMarkFollowups.GetState();
+ gdat.flags.bMsgOnNewline = chkMsgOnNewline.GetState();
+ gdat.flags.bDrawLines = chkDrawLines.GetState();
+ gdat.flags.bIndentText = chkIndentText.GetState();
gdat.indentSize = (int)SendDlgItemMessage(m_hwnd, IDC_INDENTSPIN, UDM_GETPOS, 0, 0);
PARAFORMAT2 pf2;
@@ -573,15 +572,36 @@ public: m_log(this, IDC_SRMM_LOG),
m_fonts(this, IDC_FONTSCOLORS),
chkShowTime(this, IDC_SHOWTIMES),
+ chkShowSecs(this, IDC_SHOWSECONDS),
chkShowDate(this, IDC_SHOWDATES),
+ chkLongDate(this, IDC_USELONGDATE),
+ chkRelativeDate(this, IDC_USERELATIVEDATE),
chkGroupMsg(this, IDC_GROUPMESSAGES),
+ chkMarkFollowups(this, IDC_MARKFOLLOWUPS),
+ chkDrawLines(this, IDC_DRAWLINES),
+ chkShowIcons(this, IDC_SHOWLOGICONS),
chkIndentText(this, IDC_INDENTTEXT),
+ chkHideNames(this, IDC_HIDENAMES),
+ chkMsgOnNewline(this, IDC_MESSAGEONNEWLINE),
chkLoadTime(this, IDC_LOADTIME),
chkLoadCount(this, IDC_LOADCOUNT),
chkLoadUnread(this, IDC_LOADUNREAD)
{
m_fonts.OnClick = Callback(this, &CLogOptionsDlg::onClick_Fonts);
-
+
+ CreateLink(chkShowTime, g_plugin.bShowTime);
+ CreateLink(chkShowSecs, g_plugin.bShowSeconds);
+ CreateLink(chkShowDate, g_plugin.bShowDate);
+ CreateLink(chkLongDate, g_plugin.bLongDate);
+ CreateLink(chkGroupMsg, g_plugin.bGroupMessages);
+ CreateLink(chkShowIcons, g_plugin.bShowIcons);
+ CreateLink(chkHideNames, g_plugin.bHideNames);
+ CreateLink(chkDrawLines, g_plugin.bDrawLines);
+ CreateLink(chkIndentText, g_plugin.bIndentText);
+ CreateLink(chkMsgOnNewline, g_plugin.bMsgOnNewline);
+ CreateLink(chkRelativeDate, g_plugin.bRelativeDate);
+ CreateLink(chkMarkFollowups, g_plugin.bMarkFollowups);
+
chkLoadTime.OnChange = chkLoadCount.OnChange = chkLoadUnread.OnChange = Callback(this, &CLogOptionsDlg::onChange_Time);
chkShowDate.OnChange = Callback(this, &CLogOptionsDlg::onChange_Dates);
chkShowTime.OnChange = Callback(this, &CLogOptionsDlg::onChange_Times);
@@ -613,28 +633,11 @@ public: if (!g_dat.ieviewInstalled)
EnableWindow(GetDlgItem(m_hwnd, IDC_USEIEVIEW), FALSE);
- CheckDlgButton(m_hwnd, IDC_SHOWLOGICONS, g_plugin.getByte(SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWNAMES, !g_plugin.getByte(SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(m_hwnd, IDC_SHOWTIMES, g_plugin.getByte(SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME) ? BST_CHECKED : BST_UNCHECKED);
onChange_Times(0);
-
- CheckDlgButton(m_hwnd, IDC_SHOWSECONDS, g_plugin.getByte(SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWDATES, g_plugin.getByte(SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE) ? BST_CHECKED : BST_UNCHECKED);
onChange_Dates(0);
-
- CheckDlgButton(m_hwnd, IDC_USELONGDATE, g_plugin.getByte(SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_USERELATIVEDATE, g_plugin.getByte(SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(m_hwnd, IDC_GROUPMESSAGES, g_plugin.getByte(SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_MARKFOLLOWUPS, g_plugin.getByte(SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS) ? BST_CHECKED : BST_UNCHECKED);
onChange_GroupMsg(0);
-
- CheckDlgButton(m_hwnd, IDC_MESSAGEONNEWLINE, g_plugin.getByte(SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_DRAWLINES, g_plugin.getByte(SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(m_hwnd, IDC_INDENTTEXT, g_plugin.getByte(SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT) ? BST_CHECKED : BST_UNCHECKED);
onChange_IndentText(0);
+
SendDlgItemMessage(m_hwnd, IDC_INDENTSPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(m_hwnd, IDC_INDENTSPIN, UDM_SETPOS, 0, g_plugin.getWord(SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE));
@@ -664,19 +667,8 @@ public: g_plugin.setByte(SRMSGSET_LOADHISTORY, LOADHISTORY_UNREAD);
g_plugin.setWord(SRMSGSET_LOADCOUNT, (WORD)SendDlgItemMessage(m_hwnd, IDC_LOADCOUNTSPIN, UDM_GETPOS, 0, 0));
g_plugin.setWord(SRMSGSET_LOADTIME, (WORD)SendDlgItemMessage(m_hwnd, IDC_LOADTIMESPIN, UDM_GETPOS, 0, 0));
- g_plugin.setByte(SRMSGSET_SHOWLOGICONS, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWLOGICONS));
- g_plugin.setByte(SRMSGSET_HIDENAMES, (BYTE)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_SHOWNAMES));
- g_plugin.setByte(SRMSGSET_SHOWTIME, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWTIMES));
- g_plugin.setByte(SRMSGSET_SHOWSECONDS, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWSECONDS));
- g_plugin.setByte(SRMSGSET_SHOWDATE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_SHOWDATES));
- g_plugin.setByte(SRMSGSET_USELONGDATE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_USELONGDATE));
- g_plugin.setByte(SRMSGSET_USERELATIVEDATE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_USERELATIVEDATE));
- g_plugin.setByte(SRMSGSET_GROUPMESSAGES, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_GROUPMESSAGES));
- g_plugin.setByte(SRMSGSET_MARKFOLLOWUPS, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_MARKFOLLOWUPS));
- g_plugin.setByte(SRMSGSET_MESSAGEONNEWLINE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_MESSAGEONNEWLINE));
- g_plugin.setByte(SRMSGSET_DRAWLINES, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_DRAWLINES));
+
g_plugin.setByte(SRMSGSET_USEIEVIEW, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_USEIEVIEW));
- g_plugin.setByte(SRMSGSET_INDENTTEXT, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_INDENTTEXT));
g_plugin.setWord(SRMSGSET_INDENTSIZE, (WORD)SendDlgItemMessage(m_hwnd, IDC_INDENTSPIN, UDM_GETPOS, 0, 0));
FreeMsgLogIcons();
@@ -704,28 +696,28 @@ public: void onChange_Times(CCtrlCheck*)
{
- int bChecked = IsDlgButtonChecked(m_hwnd, IDC_SHOWTIMES);
- EnableWindow(GetDlgItem(m_hwnd, IDC_SHOWSECONDS), bChecked);
- EnableWindow(GetDlgItem(m_hwnd, IDC_SHOWDATES), bChecked);
+ int bChecked = chkShowTime.GetState();
+ chkShowSecs.Enable(bChecked);
+ chkShowDate.Enable(bChecked);
onChange_Dates(0);
}
void onChange_Dates(CCtrlCheck*)
{
- int bChecked = IsDlgButtonChecked(m_hwnd, IDC_SHOWDATES) && IsDlgButtonChecked(m_hwnd, IDC_SHOWTIMES);
- EnableWindow(GetDlgItem(m_hwnd, IDC_USELONGDATE), bChecked);
- EnableWindow(GetDlgItem(m_hwnd, IDC_USERELATIVEDATE), bChecked);
+ int bChecked = chkShowDate.GetState() && chkShowTime.GetState();
+ chkLongDate.Enable(bChecked);
+ chkRelativeDate.Enable(bChecked);
}
void onChange_GroupMsg(CCtrlCheck*)
{
- EnableWindow(GetDlgItem(m_hwnd, IDC_MARKFOLLOWUPS), IsDlgButtonChecked(m_hwnd, IDC_GROUPMESSAGES));
+ chkMarkFollowups.Enable(chkGroupMsg.GetState());
}
void onChange_IndentText(CCtrlCheck*)
{
- int bChecked = IsDlgButtonChecked(m_hwnd, IDC_INDENTTEXT);
+ int bChecked = chkIndentText.GetState();
EnableWindow(GetDlgItem(m_hwnd, IDC_INDENTSIZE), bChecked);
EnableWindow(GetDlgItem(m_hwnd, IDC_INDENTSPIN), bChecked);
}
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 52f87d1fa9..4159a556c0 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -319,22 +319,12 @@ extern int fontOptionsListSize; #define SRMM_MODULE "SRMM"
-#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_AUTOCLOSE "AutoClose"
#define SRMSGDEFSET_AUTOCLOSE 0
#define SRMSGSET_SENDBUTTON "UseSendButton"
@@ -355,35 +345,9 @@ extern int fontOptionsListSize; #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 SRMSGDEFSET_MESSAGEONNEWLINE 0
-#define SRMSGSET_DRAWLINES "DrawLines"
-#define SRMSGDEFSET_DRAWLINES 0
-
-#define SRMSGSET_INDENTTEXT "IndentText"
-#define SRMSGDEFSET_INDENTTEXT 0
#define SRMSGSET_INDENTSIZE "IndentSize"
#define SRMSGDEFSET_INDENTSIZE 0
-#define SRMSGSET_SHOWLOGICONS "ShowLogIcon"
-#define SRMSGDEFSET_SHOWLOGICONS 1
-#define SRMSGSET_HIDENAMES "HideNames"
-#define SRMSGDEFSET_HIDENAMES 1
-#define SRMSGSET_SHOWTIME "ShowTime"
-#define SRMSGDEFSET_SHOWTIME 1
-#define SRMSGSET_SHOWDATE "ShowDate"
-#define SRMSGDEFSET_SHOWDATE 0
#define SRMSGSET_BKGCOLOUR "BkgColour"
#define SRMSGDEFSET_BKGCOLOUR GetSysColor(COLOR_WINDOW)
#define SRMSGSET_INPUTBKGCOLOUR "InputBkgColour"
@@ -417,9 +381,6 @@ extern int fontOptionsListSize; #define SRMSGSET_SHOWTYPINGSWITCH "ShowTypingSwitch"
#define SRMSGDEFSET_SHOWTYPINGSWITCH 1
-#define SRMSGSET_AVATARENABLE "AvatarEnable"
-#define SRMSGDEFSET_AVATARENABLE 1
-
#define SRMSGSET_USETRANSPARENCY "UseTransparency"
#define SRMSGDEFSET_USETRANSPARENCY 0
#define SRMSGSET_ACTIVEALPHA "ActiveAlpha"
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h index ea22cf4228..902a55c782 100644 --- a/plugins/Scriver/src/resource.h +++ b/plugins/Scriver/src/resource.h @@ -87,7 +87,7 @@ #define IDC_LIMITCHATSTABSNUM 1014
#define IDC_LIMITCHATSTABSNUMSPIN 1015
#define IDC_SMILEY 1016
-#define IDC_SHOWNAMES 1020
+#define IDC_HIDENAMES 1020
#define IDC_USETABS 1022
#define IDC_SHOWSECONDS 1023
#define IDC_USELONGDATE 1024
diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp index cd13a56627..86886facc7 100644 --- a/plugins/Scriver/src/srmm.cpp +++ b/plugins/Scriver/src/srmm.cpp @@ -55,7 +55,27 @@ CMPlugin::CMPlugin() : bHideContainer(SRMM_MODULE, "HideContainers", 0),
bStayMinimized(SRMM_MODULE, "StayMinimized", 0),
bSavePerContact(SRMM_MODULE, "SavePerContact", 0),
-
+
+ bShowAvatar(SRMM_MODULE, "AvatarEnable", 1),
+ bShowProgress(SRMM_MODULE, "ShowProgress", 0),
+ bShowIcons(SRMM_MODULE, "ShowLogIcon", 1),
+ bShowTime(SRMM_MODULE, "ShowTime", 1),
+ bShowSeconds(SRMM_MODULE, "ShowSeconds", 1),
+ bShowDate(SRMM_MODULE, "ShowDate", 0),
+ bLongDate(SRMM_MODULE, "UseLongDate", 0),
+ bRelativeDate(SRMM_MODULE, "UseRelativeDate", 0),
+ bGroupMessages(SRMM_MODULE, "GroupMessages", 0),
+ bMarkFollowups(SRMM_MODULE, "MarkFollowUps", 0),
+ bMsgOnNewline(SRMM_MODULE, "MessageOnNewLine", 0),
+ bDrawLines(SRMM_MODULE, "DrawLines", 0),
+ bHideNames(SRMM_MODULE, "HideNames", 1),
+ bIndentText(SRMM_MODULE, "IndentText", 0),
+
+ bShowToolBar(SRMM_MODULE, "ShowButtonLine", 1),
+ bShowInfoBar(SRMM_MODULE, "ShowInfoBar", 1),
+ bShowTitleBar(SRMM_MODULE, "ShowTitleBar", 1),
+ bShowStatusBar(SRMM_MODULE, "ShowStatusBar", 1),
+
bUseTabs(SRMM_MODULE, "UseTabs", 1),
bLimitTabs(SRMM_MODULE, "LimitTabs", 0),
bLimitChatTabs(SRMM_MODULE, "LimitChatsTabs", 0),
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index 4165870743..bec34bb73c 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -71,6 +71,9 @@ 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;
+ 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<WORD> iLimitNames, iLimitTabs, iLimitChatTabs;
|