summaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-07-18 18:41:17 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-07-18 18:41:17 +0300
commita13bb5a76dc9f7e6161f9832fc1e4e9c72c00f8c (patch)
treedd8175d50295991af2ddee527d2593425474f93d /ui.cpp
parent5017949ed6a24c623c895b02673d2ff5272fc7bf (diff)
modified: init.cpp
modified: ui.cpp
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/ui.cpp b/ui.cpp
index 59fdab7..8cf4815 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -18,24 +18,21 @@
extern list <JabberAccount*> Accounts;
-int CreateButtons()
+int CreateButtons(WPARAM, LPARAM)
{
- if(ServiceExists(MS_BB_ADDBUTTON))
+ BBButton button = {0};
+ button.cbSize = sizeof(button);
+ button.pszModuleName = szModuleName;
+ button.ptszTooltip = _T("Test button");
+ button.bbbFlags = BBBF_HIDDEN;
+ button.dwDefPos = 500;
+ button.dwButtonID = TEST_BUTTONID;
+ CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&button);
+ button.bbbFlags -= BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISCHATBUTTON;
+ for(list <JabberAccount*>::iterator p = Accounts.begin(); p != Accounts.end(); p++)
{
- BBButton button = {0};
- button.cbSize = sizeof(button);
- button.pszModuleName = szModuleName;
- button.ptszTooltip = _T("Test button");
- button.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISCHATBUTTON | BBBF_HIDDEN;
- button.dwDefPos = 500;
- button.dwButtonID = TEST_BUTTONID;
- CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&button);
- button.bbbFlags -= BBBF_HIDDEN;
- for(list <JabberAccount*>::iterator p = Accounts.begin(); p != Accounts.end(); p++)
- {
- if((*p)->getJuickContact() != INVALID_HANDLE_VALUE)
- CallService(MS_BB_SETBUTTONSTATE, (WPARAM)(*p)->getJuickContact(), (LPARAM)&button); //add button for each juick contact in every jabber account
- }
+ if((*p)->getJuickContact() != INVALID_HANDLE_VALUE)
+ CallService(MS_BB_SETBUTTONSTATE, (WPARAM)(*p)->getJuickContact(), (LPARAM)&button); //add button for each juick contact in every jabber account
}
return 0;
}