summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_cluiframes.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-19 20:53:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-19 20:53:40 +0000
commitcf9da90f48c5d8b415c449eb42434d4843610c5d (patch)
treef512c19242a6c3fff8494fa0b3c8f4ac4a253c3a /plugins/Clist_modern/src/modern_cluiframes.cpp
parentc57feab63e9b3a3f087fa1bfee21be635d28ada8 (diff)
miranda hangs up when one of the standard modules is missing
git-svn-id: http://svn.miranda-ng.org/main/trunk@3645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_cluiframes.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_cluiframes.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/plugins/Clist_modern/src/modern_cluiframes.cpp b/plugins/Clist_modern/src/modern_cluiframes.cpp
index 55822c76be..2c7a1de338 100644
--- a/plugins/Clist_modern/src/modern_cluiframes.cpp
+++ b/plugins/Clist_modern/src/modern_cluiframes.cpp
@@ -69,20 +69,9 @@ static int _iNextFrameId = 100;
static HFONT _hTitleBarFont = NULL;
// menus
-static HGENMENU _hmiVisible = (HGENMENU)-1;
-static HGENMENU _hmiTBVisible = (HGENMENU)-1;
-static HGENMENU _hmiLock = (HGENMENU)-1;
-static HGENMENU _hmiColl = (HGENMENU)-1;
-static HGENMENU _hmiFloating = (HGENMENU)-1;
-static HGENMENU _hmiAlignRoot = (HGENMENU)-1;
-static HGENMENU _hmiAlignTop = (HGENMENU)-1;
-static HGENMENU _hmiAlignClient = (HGENMENU)-1;
-static HGENMENU _hmiAlignBottom = (HGENMENU)-1;
-static HGENMENU _hmiPosRoot = (HGENMENU)-1;
-static HGENMENU _hmiPosUp = (HGENMENU)-1;
-static HGENMENU _hmiPosDown = (HGENMENU)-1;
-static HGENMENU _hmiBorder = (HGENMENU)-1;
-static HGENMENU _hmiRoot = (HGENMENU)-1;
+static HGENMENU _hmiVisible, _hmiTBVisible, _hmiLock, _hmiColl;
+static HGENMENU _hmiFloating, _hmiAlignRoot, _hmiAlignTop, _hmiAlignClient, _hmiAlignBottom;
+static HGENMENU _hmiPosRoot, _hmiPosUp, _hmiPosDown, _hmiBorder, _hmiRoot;
// others
static int _nContactListHeight = 0;
@@ -3913,7 +3902,6 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam)
return 0;
}
-
int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
{
/* HOOK */
@@ -3921,11 +3909,14 @@ int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
CLUIFramesCreateMenuForFrame(-1,-1,000010000, Menu_AddContextFrameMenuItem);
return 0;
}
+
int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam)
{
- //
- //if (MirandaExiting()) return 0;
- if ( !_hmiVisible) return 0;
+ g_CluiData.bSTATE = STATE_PREPEARETOEXIT;
+
+ if ( !_hmiVisible)
+ return 0;
+
CallService( MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, (LPARAM)_hmiVisible, 1 );
CallService( MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, (LPARAM)_hmiTBVisible, 1 );
CallService( MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, (LPARAM)_hmiLock, 1 );