summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-18 06:35:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-18 06:35:08 +0000
commitadb62209557f243332a19dc49344bdeccbfdf3f3 (patch)
tree980885d20e60e0663afcd4c14e65b2ee0cf20f26 /plugins/Clist_nicer
parent258f06fe7bf89603a7233656d16e1e28c828c15a (diff)
fix for Clist_nicer+ skin editor
git-svn-id: http://svn.miranda-ng.org/main/trunk@4464 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/skineditor/src/main.cpp10
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Clist_nicer/skineditor/src/main.cpp b/plugins/Clist_nicer/skineditor/src/main.cpp
index e4a31f61df..929748d68a 100644
--- a/plugins/Clist_nicer/skineditor/src/main.cpp
+++ b/plugins/Clist_nicer/skineditor/src/main.cpp
@@ -623,7 +623,7 @@ static void FillItemList(HWND hwndDlg)
int n, iOff;
UINT item;
- for (n = 0; n <= ID_EXTBK_LAST - ID_EXTBK_FIRST; n++) {
+ for (n = 0; n < ID_EXTBK_LAST - ID_EXTBK_FIRST; n++) {
iOff = 0;
if (strstr(StatusItems[n]->szName, "{-}")) {
item = SendDlgItemMessageA(hwndDlg, IDC_ITEMS, LB_ADDSTRING, 0, (LPARAM)"------------------------");
@@ -666,7 +666,7 @@ static INT_PTR CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
AppendMenuA(psd->hMenuItems, MF_SEPARATOR, (UINT_PTR)0, NULL);
{
- for (int i = ID_EXTBK_FIRST; i <= ID_EXTBK_LAST; i++) {
+ for (int i = ID_EXTBK_FIRST; i < ID_EXTBK_LAST; i++) {
int iOff = StatusItems[i - ID_EXTBK_FIRST]->szName[0] == '{' ? 3 : 0;
if (iOff)
AppendMenuA(psd->hMenuItems, MF_SEPARATOR, (UINT_PTR)0, NULL);
@@ -701,7 +701,7 @@ static INT_PTR CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
SetBkMode(dis->hDC, TRANSPARENT);
FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_WINDOW));
- if (iItem >= ID_EXTBK_FIRST && iItem <= ID_EXTBK_LAST)
+ if (iItem >= ID_EXTBK_FIRST && iItem < ID_EXTBK_LAST)
item = StatusItems[iItem - ID_EXTBK_FIRST];
if (dis->itemState & ODS_SELECTED && iItem != ID_EXTBKSEPARATOR) {
@@ -748,11 +748,11 @@ static INT_PTR CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
if (PtInRect(&rc, pt)) {
int iSelection = (int)TrackPopupMenu(psd->hMenuItems, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
- if (iSelection >= ID_EXTBK_FIRST && iSelection <= ID_EXTBK_LAST) {
+ if (iSelection >= ID_EXTBK_FIRST && iSelection < ID_EXTBK_LAST) {
iSelection -= ID_EXTBK_FIRST;
StatusItems_t *pSel = StatusItems[iSelection];
- for(int i = ID_EXTBK_FIRST; i <= ID_EXTBK_LAST; i++) {
+ for(int i = ID_EXTBK_FIRST; i < ID_EXTBK_LAST; i++) {
if ( SendMessage(hwndList, LB_GETSEL, i - ID_EXTBK_FIRST, 0) <= 0)
continue;
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index b9a69e5e86..cf31a0747e 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -1615,7 +1615,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
sd.hWndParent = hwnd;
sd.hWndTab = GetDlgItem(hwnd, IDC_OPTIONSTAB);
sd.pfnSaveCompleteStruct = SaveCompleteStructToDB;
- sd.lastItem = ID_STATUS_OFFLINE + arStatusItems.getCount() + 1;
+ sd.lastItem = ID_STATUS_OFFLINE + arStatusItems.getCount();
sd.firstItem = ID_STATUS_OFFLINE;
sd.pfnClcOptionsChanged = pcli->pfnClcOptionsChanged;
sd.hwndCLUI = pcli->hwndContactList;