diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-30 17:28:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-30 17:28:20 +0000 |
commit | c94076d3dab5538735393d4c97b057b3f7114fb0 (patch) | |
tree | cd17128be0f26e142820930561fc2c475eca54d5 /src/core | |
parent | d543321608763d1ec3b9db1368e6da9cfc73442e (diff) |
IDD_SETAWAYMSG moved to stdaway
git-svn-id: http://svn.miranda-ng.org/main/trunk@1279 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdaway/resource.rc | 18 | ||||
-rw-r--r-- | src/core/stdaway/sendmsg.cpp | 8 |
2 files changed, 22 insertions, 4 deletions
diff --git a/src/core/stdaway/resource.rc b/src/core/stdaway/resource.rc index 72824c871a..f2917f0f34 100644 --- a/src/core/stdaway/resource.rc +++ b/src/core/stdaway/resource.rc @@ -73,6 +73,16 @@ BEGIN LISTBOX IDC_LST_STATUS,10,13,90,95,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END
+IDD_SETAWAYMSG DIALOGEX 0, 0, 187, 72
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Change %s Message"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "Closing in %d",IDOK,61,53,65,14
+ EDITTEXT IDC_MSG,5,5,177,43,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
+END
+
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -108,6 +118,14 @@ BEGIN HORZGUIDE, 8
HORZGUIDE, 13
END
+
+ IDD_SETAWAYMSG, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 182
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 67
+ END
END
#endif // APSTUDIO_INVOKED
diff --git a/src/core/stdaway/sendmsg.cpp b/src/core/stdaway/sendmsg.cpp index d6b9cce901..763d3a41b1 100644 --- a/src/core/stdaway/sendmsg.cpp +++ b/src/core/stdaway/sendmsg.cpp @@ -78,9 +78,9 @@ static const char *StatusModeToDbSetting(int status, const char *suffix) return str;
}
-static bool GetStatusModeByte(int status, const char *suffix)
+static bool GetStatusModeByte(int status, const char *suffix, bool bDefault = false)
{
- return db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, suffix), 0) != 0;
+ return db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, suffix), bDefault) != 0;
}
static void SetStatusModeByte(int status, const char *suffix, BYTE value)
@@ -344,7 +344,7 @@ static int StatusModeChange(WPARAM wParam, LPARAM lParam) if (GetStatusModeByte(statusMode, "Ignore"))
ChangeAllProtoMessages(szProto, statusMode, NULL);
- else if (bScreenSaverRunning || ( !GetAsyncKeyState(VK_CONTROL) && GetStatusModeByte(statusMode, "NoDlg"))) {
+ else if (bScreenSaverRunning || ( !GetAsyncKeyState(VK_CONTROL) && GetStatusModeByte(statusMode, "NoDlg", true))) {
TCHAR *msg = GetAwayMessage(statusMode, szProto);
ChangeAllProtoMessages(szProto, statusMode, msg);
mir_free(msg);
@@ -409,7 +409,7 @@ static INT_PTR CALLBACK DlgProcAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam }
dat->info[j].ignore = GetStatusModeByte(statusModes[i], "Ignore");
- dat->info[j].noDialog = GetStatusModeByte(statusModes[i], "NoDlg");
+ dat->info[j].noDialog = GetStatusModeByte(statusModes[i], "NoDlg", true);
dat->info[j].usePrevious = GetStatusModeByte(statusModes[i], "UsePrev");
DBVARIANT dbv;
|