summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/SimpleStatusMsg/res/resource.rc10
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp23
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp52
-rw-r--r--plugins/SimpleStatusMsg/src/resource.h6
4 files changed, 39 insertions, 52 deletions
diff --git a/plugins/SimpleStatusMsg/res/resource.rc b/plugins/SimpleStatusMsg/res/resource.rc
index 65186cbccf..9de2325ca3 100644
--- a/plugins/SimpleStatusMsg/res/resource.rc
+++ b/plugins/SimpleStatusMsg/res/resource.rc
@@ -151,7 +151,7 @@ BEGIN
LTEXT "Buttons:",IDC_STATIC,154,16,58,8
COMBOBOX IDC_CBOPTBUTTONS,154,28,144,100,CBS_DROPDOWNLIST | WS_TABSTOP
CONTROL "Show icons in message list",IDC_CICONS2,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,154,44,140,10
- GROUPBOX "Other",IDC_STATIC,4,62,300,112,WS_GROUP
+ GROUPBOX "Other",IDC_STATIC,4,62,300,84,WS_GROUP
CONTROL "Store up to",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP,12,76,45,8
EDITTEXT IDC_EMAXHIST,58,74,28,12,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Spin2",IDC_SMAXHIST,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,76,73,11,14
@@ -165,15 +165,11 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,104,222,8
CONTROL "Remove Carriage Return (CR = '\\r' = #0D) chars from status messages",IDC_CREMOVECR,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,287,8
- CONTROL "Show 'Copy Away message' item in contact menu",IDC_CSHOWCOPY,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,132,287,8
- CONTROL "Show 'Go to URL in Away message' item in contact menu",IDC_CSHOWGURL,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,146,287,8
CONTROL "Show 'Status message...' item in status menu",IDC_CSHOWSMSG,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,160,287,8
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,132,287,8
CONTROL "Clear History",IDC_BOPTHIST,"MButtonClass",WS_TABSTOP,236,73,61,14,WS_EX_NOACTIVATE | 0x10000000L
CONTROL "Clear Predefined",IDC_BOPTDEF,"MButtonClass",WS_TABSTOP,236,90,61,14,WS_EX_NOACTIVATE | 0x10000000L
- LTEXT "* This feature is available only when using StartupStatus plugin.",IDC_NOTE1,11,177,287,8,NOT WS_VISIBLE
+ LTEXT "* This feature is available only when using StartupStatus plugin.",IDC_NOTE1,11,149,287,8,NOT WS_VISIBLE
END
IDD_OPT_STATUS DIALOGEX 0, 0, 241, 162
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 28521dd14c..f918e447db 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -364,8 +364,8 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM lParam)
if (!iHidden) {
iHidden = 1;
iStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) {
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
iHidden = 0;
clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
clmi.hIcon = LoadSkinnedProtoIcon(szProto, iStatus);
@@ -381,22 +381,17 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM lParam)
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden && szMsg != NULL) {
- if (db_get_b(NULL, "SimpleStatusMsg", "ShowCopy", 1)) {
- clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
- mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
- clmi.ptszName = str;
- }
+ clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
+ mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
+ clmi.ptszName = str;
}
Menu_ModifyItem(hCopyMsgMenuItem, &clmi);
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
- if (!iHidden && szMsg != NULL) {
- if (db_get_b(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) && StrFindURL(szMsg) != NULL) {
- clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
- mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
- clmi.ptszName = str;
- }
-
+ if (!iHidden && szMsg != NULL && StrFindURL(szMsg) != NULL) {
+ clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
+ mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
+ clmi.ptszName = str;
}
Menu_ModifyItem(hGoToURLMenuItem, &clmi);
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index 5f8044216d..251f005a99 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -1237,8 +1237,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
CheckDlgButton(hwndDlg, IDC_CICONS1, settingValue & DLG_SHOW_STATUS_ICONS ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CICONS2, settingValue & DLG_SHOW_LIST_ICONS ? BST_CHECKED : BST_UNCHECKED);
- if (!(settingValue & DLG_SHOW_STATUS))
- {
+ if (!(settingValue & DLG_SHOW_STATUS)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS1), FALSE);
}
@@ -1252,8 +1251,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
else
SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btnhide, 0);
- if (!ServiceExists(MS_SS_GETPROFILECOUNT))
- {
+ if (!ServiceExists(MS_SS_GETPROFILECOUNT)) {
TCHAR szText[100];
mir_sntprintf(szText, SIZEOF(szText), _T("%s *"), TranslateT("Show status profiles in status list"));
SetDlgItemText(hwndDlg, IDC_CPROFILES, szText);
@@ -1283,8 +1281,6 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
CheckDlgButton(hwndDlg, IDC_CCLOSEWND, db_get_b(NULL, "SimpleStatusMsg", "AutoClose", 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CRPOSWND, !db_get_b(NULL, "SimpleStatusMsg", "WinCentered", 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CREMOVECR, db_get_b(NULL, "SimpleStatusMsg", "RemoveCR", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CSHOWCOPY, db_get_b(NULL, "SimpleStatusMsg", "ShowCopy", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CSHOWGURL, db_get_b(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CSHOWSMSG, db_get_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1) ? BST_CHECKED : BST_UNCHECKED);
SendMessage(hwndDlg, WM_USER + 2, 0, 0);
@@ -1300,8 +1296,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
}
case WM_COMMAND:
- switch (LOWORD(wParam))
- {
+ switch (LOWORD(wParam)) {
case IDC_CSTATUSLIST:
{
BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED;
@@ -1311,12 +1306,14 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
}
case IDC_CBOPTBUTTONS:
- if ((HWND)lParam != GetFocus() || HIWORD(wParam) != CBN_SELCHANGE) return 0;
+ if ((HWND)lParam != GetFocus() || HIWORD(wParam) != CBN_SELCHANGE)
+ return 0;
break;
case IDC_EMAXHIST:
{
- if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0;
+ if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE)
+ return 0;
int val = GetDlgItemInt(hwndDlg, IDC_EMAXHIST, NULL, FALSE);
if (val > 25)
SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETPOS, 0, MAKELONG((short)25, 0));
@@ -1330,7 +1327,8 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
case IDC_ETIMEOUT:
{
- if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0;
+ if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE)
+ return 0;
int val = GetDlgItemInt(hwndDlg, IDC_ETIMEOUT, NULL, FALSE);
if (val == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_ETIMEOUT)))
SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)1, 0));
@@ -1345,17 +1343,16 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
int i, max_hist_msgs;
char text[8], setting[80];
- if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog);
+ if (hwndSAMsgDialog)
+ DestroyWindow(hwndSAMsgDialog);
max_hist_msgs = db_get_b(NULL, "SimpleStatusMsg", "MaxHist", 10);
- for (i = 1; i <= max_hist_msgs; i++)
- {
+ for (i = 1; i <= max_hist_msgs; i++) {
mir_snprintf(text, SIZEOF(text), "SMsg%d", i);
db_set_ts(NULL, "SimpleStatusMsg", text, _T(""));
}
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
- for (i = 0; i < accounts->count; i++)
- {
+ for (i = 0; i < accounts->count; i++) {
if (!IsAccountEnabled(accounts->pa[i]))
continue;
@@ -1379,11 +1376,11 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
char szSetting[16];
int nDefMSgCount;
- if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog);
+ if (hwndSAMsgDialog)
+ DestroyWindow(hwndSAMsgDialog);
nDefMSgCount = db_get_w(NULL, "SimpleStatusMsg", "DefMsgCount", 0);
- for (int i = 1; i <= nDefMSgCount; i++)
- {
+ for (int i = 1; i <= nDefMSgCount; i++) {
mir_snprintf(szSetting, SIZEOF(szSetting), "DefMsg%d", i);
db_unset(NULL, "SimpleStatusMsg", szSetting);
}
@@ -1396,15 +1393,18 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
break;
case WM_NOTIFY:
- if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY)
- {
+ if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) {
// Layout
int flags = 0, curSel;
- if (IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED) flags |= DLG_SHOW_STATUS;
- if (IsDlgButtonChecked(hwndDlg, IDC_CICONS1) == BST_CHECKED) flags |= DLG_SHOW_STATUS_ICONS;
- if (IsDlgButtonChecked(hwndDlg, IDC_CICONS2) == BST_CHECKED) flags |= DLG_SHOW_LIST_ICONS;
- if (IsDlgButtonChecked(hwndDlg, IDC_CPROFILES) == BST_CHECKED) flags |= DLG_SHOW_STATUS_PROFILES;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED)
+ flags |= DLG_SHOW_STATUS;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CICONS1) == BST_CHECKED)
+ flags |= DLG_SHOW_STATUS_ICONS;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CICONS2) == BST_CHECKED)
+ flags |= DLG_SHOW_LIST_ICONS;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CPROFILES) == BST_CHECKED)
+ flags |= DLG_SHOW_STATUS_PROFILES;
curSel = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_GETCURSEL, 0, 0);
if (curSel != CB_ERR)
@@ -1418,8 +1418,6 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
db_set_b(NULL, "SimpleStatusMsg", "DlgTime", (BYTE)GetDlgItemInt(hwndDlg, IDC_ETIMEOUT, NULL, FALSE));
db_set_b(NULL, "SimpleStatusMsg", "WinCentered", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CRPOSWND) != BST_CHECKED));
db_set_b(NULL, "SimpleStatusMsg", "RemoveCR", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CREMOVECR) == BST_CHECKED));
- db_set_b(NULL, "SimpleStatusMsg", "ShowCopy", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWCOPY) == BST_CHECKED));
- db_set_b(NULL, "SimpleStatusMsg", "ShowGoToURL", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWGURL) == BST_CHECKED));
db_set_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWSMSG) == BST_CHECKED));
RebuildStatusMenu();
diff --git a/plugins/SimpleStatusMsg/src/resource.h b/plugins/SimpleStatusMsg/src/resource.h
index 137327acac..6646093446 100644
--- a/plugins/SimpleStatusMsg/src/resource.h
+++ b/plugins/SimpleStatusMsg/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by resource.rc
+// Microsoft Visual C++ generated include file.
+// Used by ..\res\resource.rc
//
#define IDD_COPY 101
#define IDD_AWAYMSGBOX 102
@@ -39,7 +39,6 @@
#define IDC_CPROFILES 1018
#define IDC_EMAXHIST 1019
#define IDC_ETIMEOUT 1020
-#define IDC_CSHOWGURL 1021
#define IDC_SMAXHIST 1022
#define IDC_CCLOSEWND 1023
#define IDC_STIMEOUT 1024
@@ -51,7 +50,6 @@
#define IDC_ROPTPROTO2 1030
#define IDC_ROPTPROTO3 1031
#define IDC_CREMOVECR 1032
-#define IDC_CSHOWCOPY 1033
#define IDC_EMAXLENGTH 1034
#define IDC_SMAXLENGTH 1035
#define IDC_COPTMSG2 1036