diff options
author | slotwin <slotwin@users.noreply.github.com> | 2014-06-03 19:10:06 +0000 |
---|---|---|
committer | slotwin <slotwin@users.noreply.github.com> | 2014-06-03 19:10:06 +0000 |
commit | a4ab8224c5ac160ccedb9f23b8c7eb687bd3a17c (patch) | |
tree | d4eaaba72cf10d5de289b7448d80912d2056efd9 /plugins | |
parent | d6ed0d2f7c7dd84f7320ab60e4a6cecead0100dc (diff) |
Tipper: use system checkboxes with TreeView controls instead of custom icons
some other minor changes on option pages
git-svn-id: http://svn.miranda-ng.org/main/trunk@9409 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TipperYM/res/resource.rc | 34 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 223 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.h | 29 | ||||
-rw-r--r-- | plugins/TipperYM/src/resource.h | 2 |
4 files changed, 107 insertions, 181 deletions
diff --git a/plugins/TipperYM/res/resource.rc b/plugins/TipperYM/res/resource.rc index ef4bcb576f..a3a10b3e41 100644 --- a/plugins/TipperYM/res/resource.rc +++ b/plugins/TipperYM/res/resource.rc @@ -13,10 +13,10 @@ #undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Czech (Czech Republic) resources
+// Neutral resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CSY)
-LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1250)
/////////////////////////////////////////////////////////////////////////////
@@ -89,7 +89,8 @@ BEGIN CONTROL "Status bar tips",IDC_CHK_SBAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,166,125,11
CONTROL "Avatar border",IDC_CHK_AVBORDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,179,125,11
CONTROL "Round corners (avatar)",IDC_CHK_ROUNDCORNERSAV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,192,125,11
- CONTROL "Keep original avatar size",IDC_CHK_ORIGINALAVSIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,204,125,11
+ CONTROL "Keep original avatar size",IDC_CHK_ORIGINALAVSIZE,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,204,125,11
END
IDD_SUBST DIALOGEX 0, 0, 225, 196
@@ -195,13 +196,13 @@ BEGIN CONTROL "",IDC_PIC_PREVIEW,"Static",SS_OWNERDRAW,119,24,159,92
CTEXT "No preview",IDC_ST_PREVIEW,172,63,56,8
GROUPBOX "Effects",IDC_STATIC,7,133,140,91
- COMBOBOX IDC_CMB_EFFECT,16,145,122,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,WS_EX_RIGHT
+ COMBOBOX IDC_CMB_EFFECT,16,145,122,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Animation speed:",IDC_STATIC,11,164,90,8,0,WS_EX_RIGHT
EDITTEXT IDC_ED_SPEED,105,162,33,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
CONTROL "",IDC_SPIN_SPEED,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,128,162,11,12
- CONTROL "Shadow",IDC_CHK_SHADOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,181,126,9,WS_EX_RIGHT
- CONTROL "Border",IDC_CHK_BORDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,194,126,9,WS_EX_RIGHT
- CONTROL "Round corners (window)",IDC_CHK_ROUNDCORNERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,207,126,9,WS_EX_RIGHT
+ CONTROL "Shadow",IDC_CHK_SHADOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,181,126,9
+ CONTROL "Border",IDC_CHK_BORDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,194,126,9
+ CONTROL "Round corners (window)",IDC_CHK_ROUNDCORNERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,207,126,9
GROUPBOX "Skin option",IDC_STATIC,152,133,142,49
CONTROL "Enable skin coloring",IDC_CHK_ENABLECOLORING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,159,144,130,10
CONTROL "Load tooltip proportions",IDC_CHK_LOADPROPORTIONS,
@@ -229,11 +230,11 @@ BEGIN CONTROL "",IDC_SPIN_EXPANDTIME,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,198,28,11,12
LTEXT "ms",IDC_STATIC,214,31,53,8
GROUPBOX "First level tooltip",IDC_STATIC,7,52,140,161
- CONTROL "",IDC_TREE_FIRST_PROTOS,"SysTreeView32",TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,17,66,120,60
- CONTROL "",IDC_TREE_FIRST_ITEMS,"SysTreeView32",TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,17,133,120,72
+ CONTROL "",IDC_TREE_FIRST_PROTOS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,17,66,120,60
+ CONTROL "",IDC_TREE_FIRST_ITEMS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,17,133,120,72
GROUPBOX "Second level tooltip",IDC_STATIC,152,52,140,161
- CONTROL "",IDC_TREE_SECOND_ITEMS,"SysTreeView32",TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,161,133,120,72
- CONTROL "",IDC_TREE_SECOND_PROTOS,"SysTreeView32",TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,161,66,120,60
+ CONTROL "",IDC_TREE_SECOND_ITEMS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,161,133,120,72
+ CONTROL "",IDC_TREE_SECOND_PROTOS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,161,66,120,60
PUSHBUTTON "Favorite contacts",IDC_BTN_FAVCONTACTS,93,218,113,12
END
@@ -339,7 +340,16 @@ IDI_DOWN ICON "arrow_down.ico" IDI_SEPARATOR ICON "separator.ico"
IDI_RELOAD ICON "reload.ico"
IDI_APPLY ICON "apply.ico"
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////
+// Czech (Czech Republic) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CSY)
+LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
+#pragma code_page(1250)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index f9aae7e2fd..e90a442037 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -110,7 +110,8 @@ bool LoadDS(DISPLAYSUBST *ds, int index) _tcsncpy(ds->swzName, dbv.ptszVal, SIZEOF(ds->swzName));
ds->swzName[SIZEOF(ds->swzName) - 1] = 0;
db_free(&dbv);
- } else
+ }
+ else
return false;
mir_snprintf(setting, SIZEOF(setting), "Type%d", index);
@@ -378,9 +379,7 @@ void LoadOptions() real_count++;
}
else
- {
mir_free(ds_node);
- }
}
opt.iDsCount = real_count;
@@ -402,9 +401,7 @@ void LoadOptions() opt.bWaitForStatusMsg = true;
}
else
- {
mir_free(di_node);
- }
}
opt.iDiCount = real_count;
@@ -427,7 +424,7 @@ void LoadOptions() // find end of list
di_node = opt.diList;
- while(di_node && di_node->next)
+ while (di_node && di_node->next)
di_node = di_node->next;
// last message item
@@ -455,7 +452,7 @@ void LoadOptions() // find end of list
di_node = opt.diList;
- while(di_node && di_node->next)
+ while (di_node && di_node->next)
di_node = di_node->next;
// status message item
@@ -505,7 +502,7 @@ void LoadOptions() DBVARIANT dbv;
// Load the icons order
- for(i = 0; i < EXICONS_COUNT; i++)
+ for (i = 0; i < EXICONS_COUNT; i++)
{
opt.exIconsOrder[i]=i;
opt.exIconsVis[i]=1;
@@ -523,7 +520,7 @@ void LoadOptions() db_free(&dbv);
}
- for(i = 0; i < EXICONS_COUNT; i++)
+ for (i = 0; i < EXICONS_COUNT; i++)
{
exIcons[i].order = opt.exIconsOrder[i];
exIcons[i].vis = opt.exIconsVis[i];
@@ -647,9 +644,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
}
else
- {
EndDialog(hwndDlg, IDOK);
- }
return TRUE;
}
@@ -710,7 +705,7 @@ INT_PTR CALLBACK DlgProcAddSubst(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SetDlgItemText(hwndDlg, IDC_ED_LABEL, ds->swzName);
- switch(ds->type)
+ switch (ds->type)
{
case DVT_PROTODB:
CheckDlgButton(hwndDlg, IDC_CHK_PROTOMOD, TRUE);
@@ -753,7 +748,7 @@ INT_PTR CALLBACK DlgProcAddSubst(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l {
if (HIWORD(wParam) == BN_CLICKED)
{
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_CHK_PROTOMOD:
{
@@ -770,9 +765,7 @@ INT_PTR CALLBACK DlgProcAddSubst(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
if (IsDlgButtonChecked(hwndDlg, IDC_CHK_PROTOMOD))
- {
ds->type = DVT_PROTODB;
- }
else
{
ds->type = DVT_DB;
@@ -795,9 +788,7 @@ INT_PTR CALLBACK DlgProcAddSubst(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
}
else if (HIWORD(wParam) == CBN_SELCHANGE)
- {
return TRUE;
- }
break;
}
@@ -816,13 +807,10 @@ static void SetTreeItemText(DIListNode *node, TCHAR **pszText) *pszText = TranslateT("<No Label>");
}
else
- {
*pszText = node->di.swzLabel;
- }
}
-static OPTBUTTON btns[9] =
-{
+static OPTBUTTON btns[9] = {
IDC_BTN_ADD, SKINICON_OTHER_ADDCONTACT, 0, LPGENT("Add item"),
IDC_BTN_SEPARATOR, 0, IDI_SEPARATOR, LPGENT("Add separator"),
IDC_BTN_EDIT, SKINICON_OTHER_RENAME, 0, LPGENT("Edit"),
@@ -847,9 +835,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(btns[i].swzTooltip), BATF_TCHAR);
if (btns[i].uintCoreIconId)
- {
SendDlgItemMessage(hwndDlg, btns[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(btns[i].uintCoreIconId));
- }
else
{
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(btns[i].uintResIconId));
@@ -858,11 +844,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
}
- HIMAGELIST himlStates = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 3, 0);
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_TICK));
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), himlStates, TVSIL_STATE);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), GWL_STYLE) | TVS_CHECKBOXES);
TVINSERTSTRUCT tvi = {0};
tvi.hInsertAfter = TVI_LAST;
@@ -932,17 +914,11 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case WM_COMMAND:
{
if (HIWORD(wParam) == LBN_SELCHANGE && LOWORD(wParam) == IDC_LST_SUBST)
- {
SendMessage(hwndDlg, WMU_ENABLE_LIST_BUTTONS, 0, 0);
- }
else if (HIWORD(wParam) == CBN_SELCHANGE)
- {
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
else if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
- {
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
else if (HIWORD(wParam) == LBN_DBLCLK && LOWORD(wParam) == IDC_LST_SUBST)
{
int sel = SendDlgItemMessage(hwndDlg, IDC_LST_SUBST, LB_GETCURSEL, 0, 0);
@@ -964,7 +940,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
else if (HIWORD(wParam) == BN_CLICKED)
{
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_BTN_ADD:
{
@@ -983,14 +959,17 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetTreeItemText(di_value, &tvi.item.pszText);
HTREEITEM hItem = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS));
- if (hItem) tvi.hInsertAfter = hItem;
- else tvi.hInsertAfter = TVI_LAST;
+ if (hItem)
+ tvi.hInsertAfter = hItem;
+ else
+ tvi.hInsertAfter = TVI_LAST;
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), &tvi);
if (hItem)
{
HTREEITEM hNewItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), hItem);
- if (hNewItem) TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), hNewItem);
+ if (hNewItem)
+ TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), hNewItem);
}
if (result >= IDPRESETITEM)
@@ -999,7 +978,8 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA {
PRESETSUBST *subst = GetPresetSubstByName(presetItems[result - IDPRESETITEM].szNeededSubst[i]);
- if (subst == NULL) break;
+ if (subst == NULL)
+ break;
if (SendDlgItemMessage(hwndDlg, IDC_LST_SUBST, LB_FINDSTRING, -1, (LPARAM)subst->swzName) == LB_ERR)
{
DSListNode *ds_value = (DSListNode *)mir_alloc(sizeof(DSListNode));
@@ -1044,8 +1024,10 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA tvi.item.pszText = _T("---------------------------------");
HTREEITEM hItem = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS));
- if (hItem) tvi.hInsertAfter = hItem;
- else tvi.hInsertAfter = TVI_LAST;
+ if (hItem)
+ tvi.hInsertAfter = hItem;
+ else
+ tvi.hInsertAfter = TVI_LAST;
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), &tvi);
SendMessage(hwndDlg, WMU_ENABLE_LIST_BUTTONS, 0, 0);
@@ -1297,15 +1279,9 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 1)
- {
- item.state = INDEXTOSTATEIMAGEMASK(2);
((DIListNode *)item.lParam)->di.bIsVisible = true;
- }
else
- {
- item.state = INDEXTOSTATEIMAGEMASK(1);
((DIListNode *)item.lParam)->di.bIsVisible = false;
- }
TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &item);
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
@@ -1348,7 +1324,6 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA mir_free(ds_value);
}
- ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), TVSIL_STATE));
break;
}
}
@@ -1537,27 +1512,27 @@ INT_PTR CALLBACK DlgProcOptsAppearance(HWND hwndDlg, UINT msg, WPARAM wParam, LP opt.bShowNoFocus = IsDlgButtonChecked(hwndDlg, IDC_CHK_NOFOCUS) ? true : false;
opt.bStatusBarTips = IsDlgButtonChecked(hwndDlg, IDC_CHK_SBAR) ? true : false;
- switch(SendDlgItemMessage(hwndDlg, IDC_CMB_LV, CB_GETCURSEL, 0, 0))
+ switch (SendDlgItemMessage(hwndDlg, IDC_CMB_LV, CB_GETCURSEL, 0, 0))
{
case 0: opt.iLabelValign = DT_TOP; break;
case 1: opt.iLabelValign = DT_VCENTER; break;
case 2: opt.iLabelValign = DT_BOTTOM; break;
}
- switch(SendDlgItemMessage(hwndDlg, IDC_CMB_VV, CB_GETCURSEL, 0, 0))
+ switch (SendDlgItemMessage(hwndDlg, IDC_CMB_VV, CB_GETCURSEL, 0, 0))
{
case 0: opt.iValueValign = DT_TOP; break;
case 1: opt.iValueValign = DT_VCENTER; break;
case 2: opt.iValueValign = DT_BOTTOM; break;
}
- switch(SendDlgItemMessage(hwndDlg, IDC_CMB_LH, CB_GETCURSEL, 0, 0))
+ switch (SendDlgItemMessage(hwndDlg, IDC_CMB_LH, CB_GETCURSEL, 0, 0))
{
case 0: opt.iLabelHalign = DT_LEFT; break;
case 1: opt.iLabelHalign = DT_RIGHT; break;
}
- switch(SendDlgItemMessage(hwndDlg, IDC_CMB_VH, CB_GETCURSEL, 0, 0))
+ switch (SendDlgItemMessage(hwndDlg, IDC_CMB_VH, CB_GETCURSEL, 0, 0))
{
case 0: opt.iValueHalign = DT_LEFT; break;
case 1: opt.iValueHalign = DT_RIGHT; break;
@@ -1604,12 +1579,6 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemInt(hwndDlg, IDC_ED_CHARCOUNT, opt.iLimitCharCount, FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_CHARCOUNT), opt.bLimitMsg);
- HIMAGELIST himlStates = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_TICK));
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), himlStates, TVSIL_STATE);
-
for (int i = 0; i < EXICONS_COUNT; i++)
{
exIcons[i].order = opt.exIconsOrder[i];
@@ -1619,16 +1588,16 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM dat = (EXTRAICONDATA *)mir_alloc(sizeof(EXTRAICONDATA));
dat->bDragging = false;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), GWL_STYLE) | TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
TVINSERTSTRUCT tvi = {0};
tvi.hParent = 0;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE;
tvi.item.stateMask = TVIS_STATEIMAGEMASK;
- for (int i = 0; i < SIZEOF(extraIconName); i++ )
+ for (int i = 0; i < SIZEOF(extraIconName); i++)
{
- tvi.item.lParam = (LPARAM)(&exIcons[i]);
+ tvi.item.lParam = (LPARAM)&exIcons[i];
tvi.item.pszText = TranslateTS(extraIconName[exIcons[i].order]);
tvi.item.state = INDEXTOSTATEIMAGEMASK(exIcons[i].vis ? 2 : 1);
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), &tvi);
@@ -1638,12 +1607,11 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
case WM_COMMAND:
{
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_CHK_ENABLESMILEYS:
{
- BOOL bEnable;
- bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLESMILEYS);
+ BOOL bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLESMILEYS);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_RESIZESMILEYS), bEnable);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_USEPROTOSMILEYS), bEnable);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_ONLYISOLATED), bEnable);
@@ -1683,27 +1651,19 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
item.mask = TVIF_HANDLE | TVIF_PARAM;
TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), &item);
- opt.exIconsOrder[i++] = ((ICONSTATE *)item.lParam)->order;
- item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg,IDC_TREE_EXTRAICONS), item.hItem);
- }
- db_set_blob(NULL, MODULE, "IconOrder", opt.exIconsOrder, SIZEOF(opt.exIconsOrder));
-
- i = 0;
- item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg,IDC_TREE_EXTRAICONS));
- while (item.hItem != NULL)
- {
- item.mask = TVIF_HANDLE | TVIF_PARAM;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), &item);
- opt.exIconsVis[i++] = ((ICONSTATE *)item.lParam)->vis;
+ opt.exIconsOrder[i] = ((ICONSTATE *)item.lParam)->order;
+ opt.exIconsVis[i] = ((ICONSTATE *)item.lParam)->vis;
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), item.hItem);
+ i++;
}
+ db_set_blob(NULL, MODULE, "IconOrder", opt.exIconsOrder, SIZEOF(opt.exIconsOrder));
db_set_blob(NULL, MODULE, "icons_vis", opt.exIconsVis, SIZEOF(opt.exIconsVis));
opt.iSmileyAddFlags = 0;
- opt.iSmileyAddFlags |= (IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLESMILEYS) ? SMILEYADD_ENABLE : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_CHK_USEPROTOSMILEYS) ? SMILEYADD_USEPROTO : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_CHK_ONLYISOLATED) ? SMILEYADD_ONLYISOLATED : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_CHK_RESIZESMILEYS) ? SMILEYADD_RESIZE : 0);
+ opt.iSmileyAddFlags |= (IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLESMILEYS) ? SMILEYADD_ENABLE : 0)
+ | (IsDlgButtonChecked(hwndDlg, IDC_CHK_USEPROTOSMILEYS) ? SMILEYADD_USEPROTO : 0)
+ | (IsDlgButtonChecked(hwndDlg, IDC_CHK_ONLYISOLATED) ? SMILEYADD_ONLYISOLATED : 0)
+ | (IsDlgButtonChecked(hwndDlg, IDC_CHK_RESIZESMILEYS) ? SMILEYADD_RESIZE : 0);
opt.bWaitForContent = IsDlgButtonChecked(hwndDlg, IDC_CHK_WAITFORCONTENT) ? true : false;
opt.bGetNewStatusMsg = IsDlgButtonChecked(hwndDlg, IDC_CHK_GETSTATUSMSG) ? true : false;
@@ -1748,20 +1708,14 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (hti.flags & TVHT_ONITEMSTATEICON)
{
TVITEMA item;
- item.mask = TVIF_HANDLE | TVIF_STATE;
+ item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
item.stateMask = TVIS_STATEIMAGEMASK;
item.hItem = hti.hItem;
TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 1)
- {
- item.state = INDEXTOSTATEIMAGEMASK(2);
((ICONSTATE *)item.lParam)->vis = 1;
- }
else
- {
- item.state = INDEXTOSTATEIMAGEMASK(1);
((ICONSTATE *)item.lParam)->vis = 0;
- }
TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &item);
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
@@ -1855,7 +1809,6 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
case WM_DESTROY:
{
- ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), TVSIL_STATE));
mir_free(dat);
break;
}
@@ -1876,18 +1829,18 @@ void EnableControls(HWND hwndDlg, bool bEnableSkin) if(!bEnableSkin)
{
CheckDlgButton(hwndDlg, IDC_CHK_ENABLECOLORING, FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_ENABLECOLORING),FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_ENABLECOLORING), FALSE);
}
else if (opt.iEnableColoring == -1)
{
CheckDlgButton(hwndDlg, IDC_CHK_ENABLECOLORING, TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_ENABLECOLORING),FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_ENABLECOLORING), FALSE);
}
else
{
CheckDlgButton(hwndDlg, IDC_CHK_ENABLECOLORING, opt.iEnableColoring ? 1 : 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_ENABLECOLORING), TRUE);
- }
+ }
}
int iLastSel;
@@ -2096,16 +2049,16 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg);
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM) FALSE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)FALSE, 0);
else
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM) TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
@@ -2122,18 +2075,19 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, int count = 0;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
db_set_b(hContact, MODULE, "FavouriteContact", isChecked);
- if (isChecked) count++;
+ if (isChecked)
+ count++;
}
}
db_set_dw(0, MODULE, "FavouriteContactsCount", count);
opt.iFavoriteContFlags = 0;
- opt.iFavoriteContFlags |= IsDlgButtonChecked(hwndDlg, IDC_CHK_HIDEOFFLINE) ? FAVCONT_HIDE_OFFLINE : 0 |
- IsDlgButtonChecked(hwndDlg, IDC_CHK_APPENDPROTO) ? FAVCONT_APPEND_PROTO : 0;
+ opt.iFavoriteContFlags |= IsDlgButtonChecked(hwndDlg, IDC_CHK_HIDEOFFLINE) ? FAVCONT_HIDE_OFFLINE : 0
+ | IsDlgButtonChecked(hwndDlg, IDC_CHK_APPENDPROTO) ? FAVCONT_APPEND_PROTO : 0;
db_set_dw(0, MODULE, "FavContFlags", opt.iFavoriteContFlags);
} // fall through
@@ -2167,21 +2121,10 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetDlgItemInt(hwndDlg, IDC_ED_EXPANDTIME, opt.iExpandTime, FALSE);
SendMessage(hwndDlg, WM_COMMAND, MAKELONG(IDC_CHK_ENABLETRAYTIP, 0), 0);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), GWL_STYLE) | TVS_NOHSCROLL);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), GWL_STYLE) | TVS_NOHSCROLL);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), GWL_STYLE) | TVS_NOHSCROLL);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), GWL_STYLE) | TVS_NOHSCROLL);
-
- HIMAGELIST himlCheckBoxes;
- himlCheckBoxes = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 3, 0);
- ImageList_AddIcon(himlCheckBoxes, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlCheckBoxes, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlCheckBoxes, LoadSkinnedIcon(SKINICON_OTHER_TICK));
-
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), himlCheckBoxes, TVSIL_STATE);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), himlCheckBoxes, TVSIL_STATE);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), himlCheckBoxes, TVSIL_STATE);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), himlCheckBoxes, TVSIL_STATE);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
TVINSERTSTRUCT tvi = {0};
tvi.hParent = 0;
@@ -2218,7 +2161,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
case WM_COMMAND:
{
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
UINT state;
case IDC_CHK_ENABLETRAYTIP:
@@ -2228,8 +2171,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA } // fall through
case IDC_CHK_HANDLEBYTIPPER:
{
- state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER) &
- IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP);
+ state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER) & IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_HIDEOFFLINE), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), state);
@@ -2239,9 +2181,9 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA } // fall through
case IDC_CHK_EXPAND:
{
- state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER) &
- IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP) &
- IsDlgButtonChecked(hwndDlg, IDC_CHK_EXPAND);
+ state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER)
+ & IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP)
+ & IsDlgButtonChecked(hwndDlg, IDC_CHK_EXPAND);
EnableWindow(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_EXPANDTIME), state);
@@ -2271,15 +2213,15 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TCHAR swzProtos[1024] = {0};
TVITEM item;
- item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg,IDC_TREE_FIRST_PROTOS));
+ item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS));
item.pszText = buff;
item.cchTextMax = 256;
item.mask = TVIF_HANDLE | TVIF_TEXT | TVIF_STATE;
item.stateMask = TVIS_STATEIMAGEMASK;
while (item.hItem != NULL)
{
- TreeView_GetItem(GetDlgItem(hwndDlg,IDC_TREE_FIRST_PROTOS), &item);
- if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2)
+ TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), &item);
+ if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2)
{
_tcscat(swzProtos, buff);
_tcscat(swzProtos, _T(" "));
@@ -2291,11 +2233,11 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA db_set_ts(0, MODULE, "TrayProtocols", swzProtos);
swzProtos[0] = 0;
- item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg,IDC_TREE_SECOND_PROTOS));
+ item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS));
item.pszText = buff;
while (item.hItem != NULL)
{
- TreeView_GetItem(GetDlgItem(hwndDlg,IDC_TREE_SECOND_PROTOS), &item);
+ TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2)
{
_tcscat(swzProtos, buff);
@@ -2309,12 +2251,12 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA int count = 0;
opt.iFirstItems = 0;
- item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg,IDC_TREE_FIRST_ITEMS));
+ item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS));
item.mask = TVIF_HANDLE | TVIF_STATE;
item.stateMask = TVIS_STATEIMAGEMASK;
while (item.hItem != NULL)
{
- TreeView_GetItem(GetDlgItem(hwndDlg,IDC_TREE_FIRST_ITEMS), &item);
+ TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2)
opt.iFirstItems |= (1 << count);
@@ -2324,10 +2266,10 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA count = 0;
opt.iSecondItems = 0;
- item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg,IDC_TREE_SECOND_ITEMS));
+ item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS));
while (item.hItem != NULL)
{
- TreeView_GetItem(GetDlgItem(hwndDlg,IDC_TREE_SECOND_ITEMS), &item);
+ TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2)
opt.iSecondItems |= (1 << count);
@@ -2364,35 +2306,14 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hti.pt.y = (short)HIWORD(GetMessagePos());
ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti))
- {
if (hti.flags & TVHT_ONITEMSTATEICON)
- {
- TVITEMA item = {0};
- item.hItem = hti.hItem;
- item.mask = TVIF_HANDLE | TVIF_STATE;
- item.stateMask = TVIS_STATEIMAGEMASK;
- TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &item);
-
- if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 1)
- item.state = INDEXTOSTATEIMAGEMASK(2);
- else
- item.state = INDEXTOSTATEIMAGEMASK(1);
-
- TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &item);
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
- }
}
break;
}
}
break;
}
- case WM_DESTROY:
- {
- ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), TVSIL_STATE));
- break;
- }
}
return FALSE;
@@ -2453,7 +2374,7 @@ void DeinitOptions() UnhookEvent(hEventOptInit);
DIListNode *di_node = opt.diList;
- while(opt.diList)
+ while (opt.diList)
{
di_node = opt.diList;
opt.diList = opt.diList->next;
@@ -2461,7 +2382,7 @@ void DeinitOptions() }
DSListNode *ds_node = opt.dsList;
- while(opt.dsList)
+ while (opt.dsList)
{
ds_node = opt.dsList;
opt.dsList = opt.dsList->next;
diff --git a/plugins/TipperYM/src/options.h b/plugins/TipperYM/src/options.h index ac61325b85..f75e828d89 100644 --- a/plugins/TipperYM/src/options.h +++ b/plugins/TipperYM/src/options.h @@ -29,9 +29,6 @@ Boston, MA 02111-1307, USA. #define MODULE_NAME_LEN 512
#define SETTING_NAME_LEN 512
-// chekcbox icons
-#define IDI_NOTICK 205
-#define IDI_TICK 206
#define IDPRESETITEM 1000
#define MS_TOOLTIP_SHOWTIP "mToolTip/ShowTip"
@@ -54,14 +51,14 @@ typedef struct { // display item types
static struct {
DisplayItemType type;
- TCHAR* title;
+ TCHAR *title;
} displayItemTypes[] = {
{ DIT_ALL, LPGENT("Show for all contact types") },
{ DIT_CONTACTS, LPGENT("Show only for contacts") },
{ DIT_CHATS, LPGENT("Show only for chatrooms") }
};
-typedef enum {DVT_DB = 0, DVT_PROTODB = 1} DisplaySubstType;
+typedef enum { DVT_DB = 0, DVT_PROTODB = 1 } DisplaySubstType;
typedef struct {
TCHAR swzName[LABEL_LEN];
DisplaySubstType type;
@@ -88,13 +85,12 @@ typedef struct { } MARGINS;
// tray tooltip items
-static TCHAR* trayTipItems[TRAYTIP_ITEMS_COUNT] =
-{
+static TCHAR *trayTipItems[TRAYTIP_ITEMS_COUNT] = {
LPGENT("Number of contacts"),
LPGENT("Protocol lock status"),
LPGENT("Logon time"),
LPGENT("Unread emails"),
- LPGENT("Status"),
+ LPGENT("Status"),
LPGENT("Status message"),
LPGENT("Extra status"),
LPGENT("Listening to"),
@@ -104,11 +100,10 @@ static TCHAR* trayTipItems[TRAYTIP_ITEMS_COUNT] = };
// extra icons
-static TCHAR* extraIconName[6] =
-{
+static TCHAR *extraIconName[6] = {
LPGENT("Status"),
- LPGENT("Extra status"),
- LPGENT("Jabber activity"),
+ LPGENT("Extra status"),
+ LPGENT("Jabber activity"),
LPGENT("Gender"),
LPGENT("Country flag"),
LPGENT("Client")
@@ -124,10 +119,10 @@ typedef struct { BYTE vis;
} ICONSTATE;
-typedef enum {PAV_NONE=0, PAV_LEFT=1, PAV_RIGHT=2} PopupAvLayout;
-typedef enum {PTL_NOICON=0, PTL_LEFTICON=1, PTL_RIGHTICON=2} PopupIconTitleLayout;
-typedef enum {PP_BOTTOMRIGHT=0, PP_BOTTOMLEFT=1, PP_TOPRIGHT=2, PP_TOPLEFT=3} PopupPosition;
-typedef enum {PSE_NONE=0, PSE_ANIMATE=1, PSE_FADE=2} PopupShowEffect;
+typedef enum { PAV_NONE = 0, PAV_LEFT = 1, PAV_RIGHT = 2 } PopupAvLayout;
+typedef enum { PTL_NOICON = 0, PTL_LEFTICON = 1, PTL_RIGHTICON = 2 } PopupIconTitleLayout;
+typedef enum { PP_BOTTOMRIGHT = 0, PP_BOTTOMLEFT = 1, PP_TOPRIGHT = 2, PP_TOPLEFT = 3 } PopupPosition;
+typedef enum { PSE_NONE = 0, PSE_ANIMATE = 1, PSE_FADE = 2 } PopupShowEffect;
typedef struct {
int iWinWidth, iWinMaxHeight, iAvatarSize; //tweety
@@ -190,7 +185,7 @@ typedef struct { int iLimitCharCount;
int iSmileyAddFlags;
BYTE exIconsOrder[EXICONS_COUNT];
- BYTE exIconsVis[EXICONS_COUNT];
+ BYTE exIconsVis[EXICONS_COUNT];
} OPTIONS;
diff --git a/plugins/TipperYM/src/resource.h b/plugins/TipperYM/src/resource.h index 2e2ae30fd7..e3f053db01 100644 --- a/plugins/TipperYM/src/resource.h +++ b/plugins/TipperYM/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by ..\res\resource.rc
//
#define IDD_OPT_APPEARANCE 101
#define IDD_SUBST 103
|