diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-09 22:54:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-09 22:54:08 +0000 |
commit | 9a452de527d55caed4dfdb01f8fc3d549d9be5b3 (patch) | |
tree | 8b78e54d8f94fecf43208c595ee0cad271f53384 /plugins/TopToolBar/launchbt.cpp | |
parent | 6b2c624499dc8e6edf5ccd03403a6d4a05d65344 (diff) |
- fixes for Unicode;
- fixes for a hangup in nicer+;
- code redesign;
- CLCButton.cpp removed from project
git-svn-id: http://svn.miranda-ng.org/main/trunk@374 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar/launchbt.cpp')
-rw-r--r-- | plugins/TopToolBar/launchbt.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/TopToolBar/launchbt.cpp b/plugins/TopToolBar/launchbt.cpp index 378f92048d..3b5678386f 100644 --- a/plugins/TopToolBar/launchbt.cpp +++ b/plugins/TopToolBar/launchbt.cpp @@ -94,8 +94,7 @@ INT_PTR InsertLBut(int id) INT_PTR DeleteLBut(WPARAM id, LPARAM lParam)
{
- if (LBUTS[id].hframe != 0)
- {
+ if (LBUTS[id].hframe != 0) {
TTBRemoveButton(LBUTS[id].hframe, 0);
LBUTS[id].hframe = 0;
if (LBUTS[id].name != NULL){free(LBUTS[id].name);}
@@ -170,8 +169,7 @@ INT_PTR InsertNewFreeLBut(WPARAM wParam, LPARAM lParam) char buf[256];
if (LButCnt < MAXLBUTS) {
for (int i = 0;i<MAXLBUTS;i++) {
- if (LBUTS[i].hframe == 0)
- {
+ if (LBUTS[i].hframe == 0) {
wsprintfA(buf, "%s %d", Translate("Default"), i);
LBUTS[i].name = _strdup(buf);
LBUTS[i].lpath = _tcsdup( _T("Execute Path"));
@@ -187,17 +185,16 @@ INT_PTR InsertNewFreeLBut(WPARAM wParam, LPARAM lParam) int InitLBut()
{
- CreateServiceFunction(TTB_LAUNCHSERVICE, LaunchService);
- CreateServiceFunction(TTB_ADDLBUTTON, InsertNewFreeLBut);
- CreateServiceFunction(TTB_REMOVELBUTTON, DeleteLBut);
- CreateServiceFunction(TTB_MODIFYLBUTTON, ModifyLButton);
- CreateServiceFunction(TTB_GETLBUTTON, GetLButton);
-
-
+ arServices.insert( CreateServiceFunction(TTB_LAUNCHSERVICE, LaunchService));
+ arServices.insert( CreateServiceFunction(TTB_ADDLBUTTON, InsertNewFreeLBut));
+ arServices.insert( CreateServiceFunction(TTB_REMOVELBUTTON, DeleteLBut));
+ arServices.insert( CreateServiceFunction(TTB_MODIFYLBUTTON, ModifyLButton));
+ arServices.insert( CreateServiceFunction(TTB_GETLBUTTON, GetLButton));
LoadAllLButs();
return 0;
}
+
int UnInitLBut()
{
SaveAllLButs();
|