diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-08 20:51:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-08 20:51:14 +0000 |
commit | 696f4ea57845f48d6d979ecd9d66bb22bd9f738d (patch) | |
tree | c32ac05d363bff47320c1b204561b966aa1c81fd /plugins/Svc_crshdmp | |
parent | 3b396a2da6b0b8e0f4d2c051aca133772d317820 (diff) |
TopToolbar usage fixed everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@861 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Svc_crshdmp')
-rw-r--r-- | plugins/Svc_crshdmp/crshdmp.cpp | 63 |
1 files changed, 26 insertions, 37 deletions
diff --git a/plugins/Svc_crshdmp/crshdmp.cpp b/plugins/Svc_crshdmp/crshdmp.cpp index 18b9f230da..4f0acab235 100644 --- a/plugins/Svc_crshdmp/crshdmp.cpp +++ b/plugins/Svc_crshdmp/crshdmp.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "utils.h"
#include <m_options.h>
#include "m_folders.h"
-#include "m_toolbar.h"
+#include "m_toptoolbar.h"
#include "version.h"
int hLangpack;
@@ -210,45 +210,34 @@ int OptionsInit(WPARAM wParam, LPARAM) static int ToolbarModulesLoaded(WPARAM, LPARAM)
{
- TBButton tbb = {0};
- tbb.cbSize = sizeof(TBButton);
+ TTBButton tbb = {0};
+ tbb.cbSize = sizeof(TTBButton);
- tbb.pszButtonID = "clipvi_btn";
- tbb.pszButtonName = LPGEN("Version Information To Clipboard");
- tbb.pszServiceName = MS_CRASHDUMPER_STORETOCLIP;
+ tbb.name = LPGEN("Version Information To Clipboard");
+ tbb.pszService = MS_CRASHDUMPER_STORETOCLIP;
tbb.pszTooltipUp = LPGEN("Version Information To Clipboard");
- tbb.hPrimaryIconHandle = GetIconHandle("storeToClip");
- tbb.tbbFlags = TBBF_VISIBLE;
- tbb.defPos = 10000;
- CallService(MS_TB_ADDBUTTON,0, (LPARAM)&tbb);
-
- tbb.pszButtonID = "filevi_btn";
- tbb.pszButtonName = LPGEN("Version Information To File");
- tbb.pszServiceName = MS_CRASHDUMPER_STORETOFILE;
+ tbb.hIconHandleUp = GetIconHandle("storeToClip");
+ tbb.dwFlags = TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ TopToolbar_AddButton(&tbb);
+
+ tbb.name = LPGEN("Version Information To File");
+ tbb.pszService = MS_CRASHDUMPER_STORETOFILE;
tbb.pszTooltipUp = LPGEN("Version Information To File");
- tbb.hPrimaryIconHandle = GetIconHandle("storeToFile");
- tbb.tbbFlags = 0;
- tbb.defPos = 10001;
- CallService(MS_TB_ADDBUTTON,0, (LPARAM)&tbb);
-
- tbb.pszButtonID = "showvi_btn";
- tbb.pszButtonName = LPGEN("Show Version Information");
- tbb.pszServiceName = MS_CRASHDUMPER_VIEWINFO;
+ tbb.hIconHandleUp = GetIconHandle("storeToFile");
+ tbb.dwFlags = TTBBF_ICONBYHANDLE;
+ TopToolbar_AddButton(&tbb);
+
+ tbb.name = LPGEN("Show Version Information");
+ tbb.pszService = MS_CRASHDUMPER_VIEWINFO;
tbb.pszTooltipUp = LPGEN("Show Version Information");
- tbb.hPrimaryIconHandle = GetIconHandle("showInfo");
- tbb.tbbFlags = 0;
- tbb.defPos = 10002;
- CallService(MS_TB_ADDBUTTON,0, (LPARAM)&tbb);
-
- tbb.pszButtonID = "upldvi_btn";
- tbb.pszButtonName = LPGEN("Upload Version Information");
- tbb.pszServiceName = MS_CRASHDUMPER_UPLOAD;
- tbb.pszTooltipUp = LPGEN("Upload Version Information");
- tbb.hPrimaryIconHandle = GetIconHandle("uploadInfo");
- tbb.tbbFlags = 0;
- tbb.defPos = 10003;
- CallService(MS_TB_ADDBUTTON,0, (LPARAM)&tbb);
+ tbb.hIconHandleUp = GetIconHandle("showInfo");
+ TopToolbar_AddButton(&tbb);
+ tbb.name = LPGEN("Upload Version Information");
+ tbb.pszService = MS_CRASHDUMPER_UPLOAD;
+ tbb.pszTooltipUp = LPGEN("Upload Version Information");
+ tbb.hIconHandleUp = GetIconHandle("uploadInfo");
+ TopToolbar_AddButton(&tbb);
return 0;
}
@@ -282,7 +271,7 @@ static int ModulesLoaded(WPARAM, LPARAM) hHooks[2] = HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersPathChanged);
- if (hHooks[3] == NULL) hHooks[3] = HookEvent(ME_TB_MODULELOADED, ToolbarModulesLoaded);
+ if (hHooks[3] == NULL) hHooks[3] = HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded);
UploadInit();
@@ -399,7 +388,7 @@ extern "C" int __declspec(dllexport) Load(void) hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
hHooks[1] = HookEvent(ME_OPT_INITIALISE, OptionsInit);
- hHooks[3] = HookEvent(ME_TB_MODULELOADED, ToolbarModulesLoaded);
+ hHooks[3] = HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded);
hHooks[4] = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
packlcid = (LCID)CallService(MS_LANGPACK_GETLOCALE, 0, 0);
|