From a87fb51fd8597af4909892f0e12010594e935586 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Jul 2012 11:48:48 +0000 Subject: don't warn about missing frames every time git-svn-id: http://svn.miranda-ng.org/main/trunk@946 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/toolbar.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'plugins/TopToolBar') 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)); -- cgit v1.2.3