summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-13 11:48:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-13 11:48:48 +0000
commita87fb51fd8597af4909892f0e12010594e935586 (patch)
tree4a35250809ab8f1a7f099cd4fc6be97b04b89ebc /plugins/TopToolBar
parent938729b37ce78da2d8b2b8d583955b68977cd71f (diff)
don't warn about missing frames every time
git-svn-id: http://svn.miranda-ng.org/main/trunk@946 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar')
-rw-r--r--plugins/TopToolBar/toolbar.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index cdb4b04883..58b28040b9 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -593,11 +593,6 @@ int OnPluginUnload(WPARAM wParam, LPARAM lParam)
int OnModulesLoad(WPARAM wParam, LPARAM lParam)
{
- if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
- MessageBox(0, TranslateT("Frames Services not found - plugin disabled.You need MultiWindow plugin."), _T("TopToolBar"), 0);
- return 0;
- }
-
LoadAllSeparators();
LoadAllLButs();
@@ -632,6 +627,13 @@ static LRESULT CALLBACK TTBButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
int LoadToolbarModule()
{
+ if ( !ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
+ if ( !db_get_b(NULL, TTB_OPTDIR, "WarningDone", 0))
+ MessageBox(0, TranslateT("Frames Services not found - plugin disabled.You need MultiWindow plugin."), _T("TopToolBar"), 0);
+ db_set_b(NULL, TTB_OPTDIR, "WarningDone", 1);
+ return 1;
+ }
+
g_ctrl = (TTBCtrl*)mir_calloc( sizeof(TTBCtrl));
g_ctrl->nButtonHeight = db_get_dw(0, TTB_OPTDIR, "BUTTHEIGHT", DEFBUTTHEIGHT);
g_ctrl->nButtonWidth = db_get_dw(0, TTB_OPTDIR, "BUTTWIDTH", DEFBUTTWIDTH);
@@ -642,6 +644,8 @@ int LoadToolbarModule()
g_ctrl->bSingleLine = db_get_b(0, TTB_OPTDIR, "SingleLine", false);
g_ctrl->bAutoSize = db_get_b(0, TTB_OPTDIR, "AutoSize", true);
+ db_unset(NULL, TTB_OPTDIR, "WarningDone");
+
InitializeCriticalSection(&csButtonsHook);
hBmpSeparator = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_SEP));