summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clist.h2
-rw-r--r--libs/win32/mir_app.libbin304322 -> 304322 bytes
-rw-r--r--libs/win64/mir_app.libbin304444 -> 304444 bytes
-rw-r--r--src/mir_app/src/menu_clist.cpp10
4 files changed, 9 insertions, 3 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index f4e74419e6..35578c7d91 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -78,7 +78,7 @@ EXTERN_C MIR_APP_DLL(bool) Clist_GetProtocolVisibility(const char *szModuleName)
// adds a new element into main menu
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi, const char *pszProto = nullptr);
// gets a handle to the main Miranda menu
// returns a HMENU. This need not to be freed since it's owned by clist
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 88414ff374..b72e0b328d 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 0eb7e4ede8..39ebcfbd91 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp
index 1114758ccd..55f4c11fee 100644
--- a/src/mir_app/src/menu_clist.cpp
+++ b/src/mir_app/src/menu_clist.cpp
@@ -112,13 +112,19 @@ MIR_APP_DLL(HMENU) Menu_GetMainMenu(void)
return hMainMenu;
}
-MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi)
+MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi, const char *pszProto)
{
MainMenuExecParam *mmep = (MainMenuExecParam*)mir_alloc(sizeof(MainMenuExecParam));
if (mmep == nullptr)
return nullptr;
- //we need just one parametr.
+ CMStringA szService;
+ if (pszProto) {
+ szService.Format("/%s/%s", pszProto, pmi->pszService);
+ pmi->pszService = szService;
+ }
+
+ // we need just one parametr.
mmep->szServiceName = mir_strdup(pmi->pszService);
mmep->szMenuName = pmi->name.w;