summaryrefslogtreecommitdiff
path: root/src/modules/clist
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-28 00:26:43 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-28 00:26:43 +0000
commit4410284da77786594d7009b6c515176de0d5a51e (patch)
tree949362dafe500e6ef07006ade5a9920d72d2c55e /src/modules/clist
parent2095a324e774565a588425ed4a4986063e3c08fa (diff)
Core:
-Some major and minor issues fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@12280 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist')
-rw-r--r--src/modules/clist/clistmenus.cpp5
-rw-r--r--src/modules/clist/genmenu.cpp8
2 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index f93fcab42b..c4e4eb7834 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -535,7 +535,6 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM)
}
else {
if (smep->status == 0 && smep->protoindex != 0 && smep->proto != NULL) {
- PMO_IntMenuItem pimi;
char *prot = smep->proto;
char szHumanName[64] = { 0 };
PROTOACCOUNT *acc = Proto_GetAccount(smep->proto);
@@ -543,7 +542,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM)
db_set_b(NULL, prot, "LockMainStatus", bIsLocked);
CallProtoServiceInt(NULL, smep->proto, PS_GETNAME, (WPARAM)SIZEOF(szHumanName), (LPARAM)szHumanName);
- pimi = MO_GetIntMenuItem((HGENMENU)smep->protoindex);
+ PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)smep->protoindex);
PMO_IntMenuItem root = (PMO_IntMenuItem)pimi->mi.root;
mir_free(pimi->mi.pszName);
mir_free(root->mi.pszName);
@@ -827,7 +826,7 @@ void RebuildMenuOrder(void)
hStatusMenuObject = MO_CreateMenuObject("StatusMenu", LPGEN("Status menu"), "StatusMenuCheckService", "StatusMenuExecService");
MO_SetOptionsMenuObject(hStatusMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataStatusMenu");
- hStatusMainMenuHandles = (PMO_IntMenuItem*)mir_calloc(SIZEOF(statusModeList) * sizeof(PMO_IntMenuItem*));
+ hStatusMainMenuHandles = (PMO_IntMenuItem*)mir_calloc(SIZEOF(statusModeList) * sizeof(PMO_IntMenuItem));
hStatusMainMenuHandlesCnt = SIZEOF(statusModeList);
hStatusMenuHandles = (tStatusMenuHandles*)mir_calloc(sizeof(tStatusMenuHandles)*accounts.getCount());
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp
index 436cecefde..9391a8693d 100644
--- a/src/modules/clist/genmenu.cpp
+++ b/src/modules/clist/genmenu.cpp
@@ -113,16 +113,16 @@ PMO_IntMenuItem MO_RecursiveWalkMenu(PMO_IntMenuItem parent, pfnWalkFunc func, v
//lparam = LPMEASUREITEMSTRUCT
int MO_MeasureMenuItem(LPMEASUREITEMSTRUCT mis)
{
- // prevent win9x from ugly menus displaying when there is no icon
- mis->itemWidth = 0;
- mis->itemHeight = 0;
-
if (!bIsGenMenuInited)
return -1;
if (mis == NULL)
return FALSE;
+ // prevent win9x from ugly menus displaying when there is no icon
+ mis->itemWidth = 0;
+ mis->itemHeight = 0;
+
PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)mis->itemData);
if (pimi == NULL)
return FALSE;