diff options
-rw-r--r-- | src/mir_app/src/ei_options.cpp | 9 | ||||
-rw-r--r-- | src/mir_app/src/ei_services.cpp | 5 | ||||
-rw-r--r-- | src/mir_app/src/extraicons.h | 1 |
3 files changed, 3 insertions, 12 deletions
diff --git a/src/mir_app/src/ei_options.cpp b/src/mir_app/src/ei_options.cpp index 02cec8571f..113c34c67a 100644 --- a/src/mir_app/src/ei_options.cpp +++ b/src/mir_app/src/ei_options.cpp @@ -251,7 +251,7 @@ public: virtual void OnInitDialog() { - int numSlots = GetNumberOfSlots(); + int numSlots = EXTRA_ICON_COUNT; if (numSlots < (int)registeredExtraIcons.getCount()) { HWND label = GetDlgItem(m_hwnd, IDC_MAX_ICONS_L); SetWindowText(label, CMStringW(FORMAT, TranslateT("*only the first %d icons will be shown"), numSlots)); @@ -307,7 +307,7 @@ public: oldSlots[i] = -1; lastUsedSlot = max(lastUsedSlot, registeredExtraIcons[i]->getSlot()); } - lastUsedSlot = min(lastUsedSlot, GetNumberOfSlots()); + lastUsedSlot = min(lastUsedSlot, EXTRA_ICON_COUNT); // Get user data and create new groups LIST<ExtraIconGroup> groups(1); @@ -328,7 +328,7 @@ public: bool enabled = ((tvi.state & INDEXTOSTATEIMAGEMASK(3)) == INDEXTOSTATEIMAGEMASK(2)); int slot = (enabled ? firstEmptySlot++ : -1); - if (slot >= GetNumberOfSlots()) + if (slot >= EXTRA_ICON_COUNT) slot = -1; if (ids->count == 1) { @@ -451,9 +451,6 @@ public: int InitOptionsCallback(WPARAM wParam, LPARAM) { - if (GetNumberOfSlots() < 1) - return 0; - OPTIONSDIALOGPAGE odp = { 0 }; odp.szGroup.a = LPGEN("Contact list"); odp.szTitle.a = LPGEN("Extra icons"); diff --git a/src/mir_app/src/ei_services.cpp b/src/mir_app/src/ei_services.cpp index 645327ad7d..98d53f0c9b 100644 --- a/src/mir_app/src/ei_services.cpp +++ b/src/mir_app/src/ei_services.cpp @@ -57,11 +57,6 @@ int ModulesLoaded(WPARAM, LPARAM) return 0; } -int GetNumberOfSlots() -{ - return EXTRA_ICON_COUNT; -} - int ConvertToClistSlot(int slot) { if (slot < 0) diff --git a/src/mir_app/src/extraicons.h b/src/mir_app/src/extraicons.h index 6df8be8b7d..8b3c50108a 100644 --- a/src/mir_app/src/extraicons.h +++ b/src/mir_app/src/extraicons.h @@ -190,7 +190,6 @@ extern LIST<ExtraIcon> extraIconsByHandle, extraIconsBySlot; void RebuildListsBasedOnGroups(LIST<ExtraIconGroup> &groups);
ExtraIcon * GetExtraIconBySlot(int slot);
-int GetNumberOfSlots();
int ConvertToClistSlot(int slot);
int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage);
|