summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/jabber.cpp4
-rw-r--r--protocols/JabberG/jabber.h2
-rw-r--r--protocols/JabberG/jabber_menu.cpp35
3 files changed, 19 insertions, 22 deletions
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp
index 33674a3a9e..9c687789b3 100644
--- a/protocols/JabberG/jabber.cpp
+++ b/protocols/JabberG/jabber.cpp
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m_assocmgr.h"
#include "m_folders.h"
-#include "m_toolbar.h"
+#include "m_toptoolbar.h"
#include "m_extraicons.h"
HINSTANCE hInst;
@@ -258,7 +258,7 @@ extern "C" int __declspec( dllexport ) Load()
g_IconsInit();
g_MenuInit();
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- hModulesLoadedTB = HookEvent(ME_TB_MODULELOADED, g_OnModernToolbarInit);
+ hModulesLoadedTB = HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit);
JabberUserInfoInit();
return 0;
diff --git a/protocols/JabberG/jabber.h b/protocols/JabberG/jabber.h
index 4fd50d6d78..745650b8ce 100644
--- a/protocols/JabberG/jabber.h
+++ b/protocols/JabberG/jabber.h
@@ -653,7 +653,7 @@ int lstrcmp_null(const TCHAR *s1, const TCHAR *s2);
void g_MenuInit();
void g_MenuUninit();
-int g_OnModernToolbarInit(WPARAM, LPARAM);
+int g_OnToolbarInit(WPARAM, LPARAM);
//---- jabber_misc.c ------------------------------------------------
diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp
index 963d5d4219..0415b0a8ce 100644
--- a/protocols/JabberG/jabber_menu.cpp
+++ b/protocols/JabberG/jabber_menu.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_hotkeys.h>
#include <m_icolib.h>
-#include "m_toolbar.h"
+#include "m_toptoolbar.h"
#define MENUITEM_LASTSEEN 1
#define MENUITEM_SERVER 2
@@ -974,35 +974,32 @@ static INT_PTR g_ToolbarHandleServiceDiscovery(WPARAM w, LPARAM l)
return 0;
}
-int g_OnModernToolbarInit(WPARAM, LPARAM)
+int g_OnToolbarInit(WPARAM, LPARAM)
{
if ( g_Instances.getCount() == 0 )
return 0;
- TBButton button = {0};
+ TTBButton button = {0};
button.cbSize = sizeof(button);
- button.defPos = 1000;
- button.tbbFlags = TBBF_SHOWTOOLTIP|TBBF_VISIBLE;
+ button.dwFlags = TTBBF_SHOWTOOLTIP|TTBBF_VISIBLE;
List_InsertPtr( &arServices, CreateServiceFunction("JABBER/*/Groupchat", g_ToolbarHandleJoinGroupchat ));
- button.pszButtonID = button.pszServiceName = "JABBER/*/Groupchat";
- button.pszTooltipUp = button.pszTooltipUp = button.pszButtonName = "Join conference";
- button.hSecondaryIconHandle = button.hPrimaryIconHandle = (HANDLE)g_GetIconHandle(IDI_GROUP);
- JCallService(MS_TB_ADDBUTTON, 0, (LPARAM)&button);
+ button.pszService = "JABBER/*/Groupchat";
+ button.pszTooltipUp = button.pszTooltipUp = button.name = "Join conference";
+ button.hIconHandleDn = button.hIconHandleUp = (HANDLE)g_GetIconHandle(IDI_GROUP);
+ TopToolbar_AddButton(&button);
List_InsertPtr( &arServices, CreateServiceFunction("JABBER/*/Bookmarks", g_ToolbarHandleBookmarks ));
- button.pszButtonID = button.pszServiceName = "JABBER/*/Bookmarks";
- button.pszTooltipUp = button.pszTooltipUp = button.pszButtonName = "Open bookmarks";
- button.hSecondaryIconHandle = button.hPrimaryIconHandle = (HANDLE)g_GetIconHandle(IDI_BOOKMARKS);
- button.defPos++;
- JCallService(MS_TB_ADDBUTTON, 0, (LPARAM)&button);
+ button.pszService = "JABBER/*/Bookmarks";
+ button.pszTooltipUp = button.pszTooltipUp = button.name = "Open bookmarks";
+ button.hIconHandleDn = button.hIconHandleUp = (HANDLE)g_GetIconHandle(IDI_BOOKMARKS);
+ TopToolbar_AddButton(&button);
List_InsertPtr( &arServices, CreateServiceFunction("JABBER/*/ServiceDiscovery", g_ToolbarHandleServiceDiscovery ));
- button.pszButtonID = button.pszServiceName = "JABBER/*/ServiceDiscovery";
- button.pszTooltipUp = button.pszTooltipUp = button.pszButtonName = "Service discovery";
- button.hSecondaryIconHandle = button.hPrimaryIconHandle = (HANDLE)g_GetIconHandle(IDI_SERVICE_DISCOVERY);
- button.defPos++;
- JCallService(MS_TB_ADDBUTTON, 0, (LPARAM)&button);
+ button.pszService = "JABBER/*/ServiceDiscovery";
+ button.pszTooltipUp = button.pszTooltipUp = button.name = "Service discovery";
+ button.hIconHandleDn = button.hIconHandleUp = (HANDLE)g_GetIconHandle(IDI_SERVICE_DISCOVERY);
+ TopToolbar_AddButton(&button);
return 0;
}