diff options
166 files changed, 1272 insertions, 1503 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib Binary files differindex 211cb51642..6d4e7008fb 100644 --- a/bin10/lib/mir_app.lib +++ b/bin10/lib/mir_app.lib diff --git a/bin10/lib/mir_app64.lib b/bin10/lib/mir_app64.lib Binary files differindex 7c056aa6a6..93c804c28f 100644 --- a/bin10/lib/mir_app64.lib +++ b/bin10/lib/mir_app64.lib diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib Binary files differindex 211cb51642..6d4e7008fb 100644 --- a/bin12/lib/mir_app.lib +++ b/bin12/lib/mir_app.lib diff --git a/bin12/lib/mir_app64.lib b/bin12/lib/mir_app64.lib Binary files differindex 7c056aa6a6..93c804c28f 100644 --- a/bin12/lib/mir_app64.lib +++ b/bin12/lib/mir_app64.lib diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index 04af0877d9..0183450f3d 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -46,6 +46,19 @@ const }
MS_CLIST_GETSTATUSMODEDESCRIPTION:PAnsiChar = 'CList/GetStatusModeDescription';
+const
+ CMIF_GRAYED = 1;
+ CMIF_CHECKED = 2;
+ CMIF_HIDDEN = 4; // only works on contact menus
+ CMIF_NOTOFFLINE = 8; // item won't appear for contacts that are offline
+ CMIF_NOTONLINE = 16; // " online
+ CMIF_NOTONLIST = 32; // item won't appear on standard contacts
+ CMIF_NOTOFFLIST = 64; // item won't appear on contacts that have the 'NotOnList' setting
+ CMIF_UNICODE = 512; // will return TCHAR* instead of AnsiChar*
+ CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
+
+ CMIF_DEFAULT = 4096; // this menu item is the default one
+
type
// WARNING: do not use Translate(TS) for p(t)szName or p(t)szPopupName as they
// are translated by the core, which may lead to double translation.
@@ -53,67 +66,26 @@ type PCLISTMENUITEM = ^TCLISTMENUITEM;
TCLISTMENUITEM = record
szName : TChar; // [TRANSLATED-BY-CORE] text of the menu item
- flags : dword;
+ flags : dword; // combination of CMIF_*
position : int; // approx position on the menu, lower numbers go nearer the top
hIcon : THANDLE; // icon to put by the item, if this was *not* loaded from
// a resource, you can delete it straight after the call
pszService : PAnsiChar; // name of the service to call when the service is clicked
hParentMenu : THANDLE; // parent menu hamdle
-
- pszContactOwner: PAnsiChar; // contact menus only, the protocol module that owns
- // the contacts to which this to which this menu item
- // applies, NULL(0) if it applies to all contacts.
- // if it applies to multiple but not all protocols
- // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
hLangpack : int; // plugin's hLangpack (added automatically)
end;
-const
- CMIF_GRAYED = 1;
- CMIF_CHECKED = 2;
- CMIF_HIDDEN = 4; // only works on contact menus
- CMIF_NOTOFFLINE = 8; // item won't appear for contacts that are offline
- CMIF_NOTONLINE = 16; // " online
- CMIF_NOTONLIST = 32; // item won't appear on standard contacts
- CMIF_NOTOFFLIST = 64; // item won't appear on contacts that have the 'NotOnList' setting
- CMIF_ROOTHANDLE = 384; // means that hParentMenu member is set (since 0.8#26)
- CMIF_UNICODE = 512; // will return TCHAR* instead of AnsiChar*
- CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
-
- CMIF_DEFAULT = 4096; // this menu item is the default one
+function _AddMainMenuItem(mi:PCLISTMENUITEM; hlang:integer) : HGENMENU; stdcall;
+ external AppDll name 'Menu_AddMainMenuItem';
-// for compatibility. since 0.8.0 they both mean nothing
- CMIF_ROOTPOPUP = 128; // root item for new popup (save return id for childs)
- CMIF_CHILDPOPUP = 256; // child for rootpopup menu
+function _AddContactMenuItem(mi:PCLISTMENUITEM; pszProto:PAnsiChar; hlang:integer) : HGENMENU; stdcall;
+ external AppDll name 'Menu_AddContactMenuItem';
- {
- wParam : 0
- lParam : Pointer to a initalised TCLISTMENUITEM structure
- Affect : Add a new menu item to the main menu, see notes
- Returns: A handle to the new MENU item or NULL(0) on failure
- Notes : The given TCLISTMENUITEM.pszService in is called when the item
- get clicked with :
- -
- wParam = 0, lParam = hwndContactList
- }
- MS_CLIST_ADDMAINMENUITEM:PAnsiChar = 'CList/AddMainMenuItem';
+function _AddProtoMenuItem(mi:PCLISTMENUITEM; pszProto:PAnsiChar; hlang:integer) : HGENMENU; stdcall;
+ external AppDll name 'Menu_AddProtoMenuItem';
- {
- wParam : 0
- lParam : Pointer to a initalised TCLISTMENUITEM structure
- Affect : Add a new item to the user contact menus, see notes
- Notes : exactly the same as MS_CLIST_ADDMAINMENUITEM except when an item
- is selected, the service gets called with wParam=hContact,
- pszContactOwner is obeyed.
- -
- Popup menus are not supported, pszPopupName and popupPosition
- are ignored. If CTRL is held down when right clicking the menu
- position numbers will be displayed in brackets after the menu item
- text, this only works in debug builds!
- }
- MS_CLIST_ADDCONTACTMENUITEM:PAnsiChar = 'CList/AddContactMenuItem';
- MS_CLIST_ADDSTATUSMENUITEM :PAnsiChar = 'CList/AddStatusMenuItem';
- MS_CLIST_ADDPROTOMENUITEM :PAnsiChar = 'CList/AddProtoMenuItem';
+function _AddStatusMenuItem(mi:PCLISTMENUITEM; pszProto:PAnsiChar; hlang:integer) : HGENMENU; stdcall;
+ external AppDll name 'Menu_AddStatusMenuItem';
{
Affect : Modify an existing menu item, see notes
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index 1cf14f32b0..72a0b66103 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -392,26 +392,22 @@ end; function Menu_AddMainMenuItem(mi:PCLISTMENUITEM):HGENMENU;
begin
- mi^.hLangpack:=hLangpack;
- result:=CallService(MS_CLIST_ADDMAINMENUITEM, 0,LPARAM(mi));
+ result:=_AddMainMenuItem(mi, hLangpack);
end;
function Menu_AddContactMenuItem(mi:PCLISTMENUITEM):HGENMENU;
begin
- mi^.hLangpack:=hLangpack;
- result:=CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,LPARAM(mi));
+ result:=_AddContactMenuItem(mi, nil, hLangpack);
end;
function Menu_AddStatusMenuItem(mi:PCLISTMENUITEM):HGENMENU;
begin
- mi^.hLangpack:=hLangpack;
- result:=CallService(MS_CLIST_ADDSTATUSMENUITEM, 0,LPARAM(mi));
+ result:=_AddStatusMenuItem(mi, nil, hLangpack);
end;
function Menu_AddProtoMenuItem(mi:PCLISTMENUITEM):HGENMENU;
begin
- mi^.hLangpack:=hLangpack;
- result:=CallService(MS_CLIST_ADDPROTOMENUITEM, 0,LPARAM(mi));
+ result:=_AddProtoMenuItem(mi, nil, hLangpack);
end;
function Menu_AddTrayMenuItem(mi:PCLISTMENUITEM):HGENMENU;
diff --git a/include/m_clist.h b/include/m_clist.h index 7314f9f303..a8f9477de8 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -77,7 +77,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //the service that is called when the item is clicked is called with
//wParam = 0, lParam = hwndContactList
//dividers are inserted every 100000 positions
-//pszContactOwner is ignored for this service.
//there is a #define PUTPOSITIONSINMENU in clistmenus.c which, when set, will
//cause the position numbers to be placed in brackets after the menu items
@@ -87,25 +86,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CLISTMENUITEM
{
- union {
- char* pszName; // [TRANSLATED-BY-CORE] text of the menu item
- TCHAR* ptszName; // Unicode text of the menu item
- };
- DWORD flags; // set of CMIF_* flags
- int position; // approx position on the menu. lower numbers go nearer the top
- union {
- HICON hIcon; // icon to put by the item. If this was not loaded from
- // a resource, you can delete it straight after the call
- HANDLE icolibItem; // set CMIF_ICONFROMICOLIB to pass this value
- };
- char* pszService; // name of service to call when the item gets selected
- HGENMENU hParentMenu; // HGENMENU_ROOT or NULL means the root menu
-
- char *pszContactOwner; // contact menus only. The protocol module that owns
- // the contacts to which this menu item applies. NULL if it
- // applies to all contacts. If it applies to multiple but not all
- // protocols, add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
- int hLangpack; // plugin's hLangpack (added automatically)
+ MAllStrings name; // [TRANSLATED-BY-CORE] text of the menu item
+ DWORD flags; // set of CMIF_* flags
+ int position; // approx position on the menu. lower numbers go nearer the top
+ HANDLE icolibItem; // set CMIF_ICONFROMICOLIB to pass this value
+ char* pszService; // name of service to call when the item gets selected
+ HGENMENU hParentMenu; // HGENMENU_ROOT or NULL means the root menu
+ int hLangpack; // plugin's hLangpack (added automatically)
};
#define CMIF_GRAYED 1
@@ -126,10 +113,7 @@ struct CLISTMENUITEM #define CMIF_KEEPUNTRANSLATED 1024 // don't translate a menu item
#define CMIF_DEFAULT 4096 // this menu item is the default one
-__forceinline HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
-{ mi->hLangpack = hLangpack;
- return (HGENMENU)CallService("CList/AddMainMenuItem", 0, (LPARAM)mi);
-}
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(CLISTMENUITEM *mi, int = hLangpack);
//add a new item to the user contact menus
//identical to clist/addmainmenuitem except when item is selected the service
@@ -140,20 +124,11 @@ __forceinline HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi) //displayed in brackets after the menu item text. This only works in debug
//builds.
-__forceinline HGENMENU Menu_AddContactMenuItem(CLISTMENUITEM *mi)
-{ mi->hLangpack = hLangpack;
- return (HGENMENU)CallService("CList/AddContactMenuItem", 0, (LPARAM)mi);
-}
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(CLISTMENUITEM *mi, const char *pszProto = NULL, int = hLangpack);
-__forceinline HGENMENU Menu_AddStatusMenuItem(CLISTMENUITEM *mi)
-{ mi->hLangpack = hLangpack;
- return (HGENMENU)CallService("CList/AddStatusMenuItem", 0, (LPARAM)mi);
-}
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(CLISTMENUITEM *mi, const char *pszProto = NULL, int = hLangpack);
-__forceinline HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi)
-{ mi->hLangpack = hLangpack;
- return (HGENMENU)CallService("CList/AddProtoMenuItem", 0, (LPARAM)mi);
-}
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(CLISTMENUITEM *mi, const char *pszProto = NULL, int = hLangpack);
//the context menu for a contact is about to be built v0.1.0.1+
//wParam = (MCONTACT)hContact
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc index bd724bf406..a74e56425a 100644 --- a/plugins/Actman/ua/i_uaplaces.inc +++ b/plugins/Actman/ua/i_uaplaces.inc @@ -454,7 +454,6 @@ begin if UAMenuItem.hMenuRoot<>0 then
begin
- clmi.flags:=clmi.flags or CMIF_ROOTHANDLE;
clmi.hParentMenu:=UAMenuItem.hMenuRoot;
end;
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index 96fcff53bf..7345f16720 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -96,7 +96,7 @@ static int OnAccListChanged(WPARAM, LPARAM) mi.position = 500020001;
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
- mi.ptszName = LPGENT("&Add contact...");
+ mi.name.t = LPGENT("&Add contact...");
mi.pszService = MS_ADDCONTACTPLUS_SHOW;
hMainMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 5586cf4c0e..be6235ef2d 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -542,8 +542,8 @@ int CreateFrame() CreateServiceFunction(MODULE "/ShowHideReminders", ShowHideMenuFunc);
CLISTMENUITEM mi = { 0 };
- mi.hIcon = hIconMenuShowHide;
- mi.pszName = LPGEN("Show reminders");
+ mi.icolibItem = hIconMenuShowHide;
+ mi.name.a = LPGEN("Show reminders");
mi.pszService = MODULE "/ShowHideReminders";
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Alarms"), 0);
mi.position = 500010000;
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index 15df78706c..322c2d87e5 100644 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -694,7 +694,7 @@ void AddMenuItem() CLISTMENUITEM mi = { 0 };
mi.icolibItem = IcoLib_GetIconHandle("alarms_menu_set");
- mi.pszName = "Set alarm";
+ mi.name.a = "Set alarm";
mi.pszService = MODULE "/NewAlarm";
mi.position = 500010000;
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME))
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index 85636cc2f4..0915ba1ec0 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -200,7 +200,7 @@ extern "C" int __declspec(dllexport) Load(void) CLISTMENUITEM mi = { 0 };
mi.position = -1999901005;
mi.flags = CMIF_TCHAR;
- mi.ptszName = LPGENT("Enable AuthState icons");
+ mi.name.t = LPGENT("Enable AuthState icons");
mi.pszService = "AuthState/MenuItem";
hUserMenu = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 8d22bc2956..4e696ef1dc 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -441,24 +441,24 @@ void SetShutdownMenuItem(bool fActive) if (fActive)
{
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("Stop automatic &shutdown");
+ mi.name.t = LPGENT("Stop automatic &shutdown");
}
else
{
mi.icolibItem = iconList[2].hIcolib;
- mi.ptszName = LPGENT("Automatic &shutdown...");
+ mi.name.t = LPGENT("Automatic &shutdown...");
}
mi.pszService = "AutoShutdown/MenuCommand";
mi.flags = CMIF_TCHAR;
if (hMainMenuItem != NULL)
- Menu_ModifyItem(hMainMenuItem, mi.ptszName, mi.icolibItem);
+ Menu_ModifyItem(hMainMenuItem, mi.name.t, mi.icolibItem);
else
hMainMenuItem = Menu_AddMainMenuItem(&mi);
/* tray menu */
mi.position = 899999;
if (hTrayMenuItem != NULL)
- Menu_ModifyItem(hTrayMenuItem, mi.ptszName, mi.icolibItem);
+ Menu_ModifyItem(hTrayMenuItem, mi.name.t, mi.icolibItem);
else
hTrayMenuItem = Menu_AddTrayMenuItem(&mi);
}
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index da41894e42..67cefbd921 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -515,13 +515,13 @@ void InitMenuItem() CreateServiceFunction(MS_AVATARHISTORY_SHOWDIALOG, ShowDialogSvc);
CLISTMENUITEM mi = { 0 };
- mi.ptszName = LPGENT("View Avatar History");
+ mi.name.t = LPGENT("View Avatar History");
mi.flags = CMIF_TCHAR;
mi.position = 1000090010;
- mi.hIcon = createDefaultOverlayedIcon(FALSE);
+ mi.icolibItem = createDefaultOverlayedIcon(FALSE);
mi.pszService = MS_AVATARHISTORY_SHOWDIALOG;
hMenu = Menu_AddContactMenuItem(&mi);
- DestroyIcon(mi.hIcon);
+ DestroyIcon((HICON)mi.icolibItem);
}
static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index f95b352062..c1dce1dfdd 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -99,7 +99,7 @@ void InitMenuItems() CLISTMENUITEM mi = { 0 };
mi.position = 1000090000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
- mi.pszName = LPGEN("View &History");
+ mi.name.a = LPGEN("View &History");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
hContactMenu = Menu_AddContactMenuItem(&mi);
@@ -109,7 +109,7 @@ void InitMenuItems() mi.position = 1000090001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- mi.pszName = LPGEN("Delete All User History");
+ mi.name.a = LPGEN("Delete All User History");
mi.pszService = MS_HISTORY_DELETEALLCONTACTHISTORY;
hDeleteContactMenu = Menu_AddContactMenuItem(&mi);
@@ -123,7 +123,7 @@ void InitTaskMenuItems() CLISTMENUITEM mi = { 0 };
mi.position = 500060005;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
- mi.pszName = LPGEN("Execute history task");
+ mi.name.a = LPGEN("Execute history task");
hTaskMainMenu = Menu_AddMainMenuItem(&mi);
}
@@ -141,7 +141,7 @@ void InitTaskMenuItems() mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.hParentMenu = hTaskMainMenu;
- mi.ptszName = (TCHAR*)taskIt->taskName.c_str();
+ mi.name.t = (TCHAR*)taskIt->taskName.c_str();
HGENMENU menu = Menu_AddMainMenuItem(&mi);
Menu_ConfigureItem(menu, MCI_OPT_EXECPARAM, pos++);
taskMenus.push_back(menu);
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 3c77218d31..9c44fccd4a 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -599,19 +599,19 @@ extern "C" int __declspec(dllexport) Load(void) {
CLISTMENUITEM mi = { 0 };
mi.position = -50010002; //TODO: check the warning
- mi.pszName = BOLTUN_AUTO_CHAT;
+ mi.name.a = BOLTUN_AUTO_CHAT;
mi.pszService = SERV_CONTACT_AUTO_CHAT;
hMenuItemAutoChat = Menu_AddContactMenuItem(&mi);
mi.position = -50010001; //TODO: check the warning
- mi.pszName = BOLTUN_NOT_TO_CHAT;
+ mi.name.a = BOLTUN_NOT_TO_CHAT;
mi.pszService = SERV_CONTACT_NOT_TO_CHAT;
hMenuItemNotToChat = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_NOTOFFLINE;
mi.position = -50010000; //TODO: check the warning
- mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
- mi.pszName = BOLTUN_START_CHATTING;
+ mi.icolibItem = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
+ mi.name.a = BOLTUN_START_CHATTING;
mi.pszService = SERV_CONTACT_START_CHATTING;
hMenuItemStartChatting = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 2770a91569..96b73d6dbc 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -533,8 +533,8 @@ void BossKeyMenuItemInit(void) // Add menu item CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = 2000100000;
- mi.hIcon = IcoLib_GetIcon("hidemim");
- mi.ptszName = LPGENT("Hide");
+ mi.icolibItem = IcoLib_GetIcon("hidemim");
+ mi.name.t = LPGENT("Hide");
mi.pszService = MS_BOSSKEY_HIDE;
g_hMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index fa71165748..a05f1ff936 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -615,7 +615,7 @@ int ModulesLoaded(WPARAM, LPARAM) mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[2].hIcolib;
mi.position = 200000;
- mi.ptszName = LPGENT("Enable Miss You");
+ mi.name.t = LPGENT("Enable Miss You");
mi.pszService = "BuddyExpectator/actionMissYouClick";
hContactMenu = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 7278db9364..a8d2dc419a 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -44,13 +44,10 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) int MainInit(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { 0 };
- mi.position=10;
- mi.flags=0;
- mi.hIcon= LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
- mi.pszName=LPGEN("&Buddy Pounce");
- mi.pszService="BuddyPounce/MenuCommand";
- mi.pszContactOwner=NULL;
-
+ mi.position = 10;
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
+ mi.name.a = LPGEN("&Buddy Pounce");
+ mi.pszService = "BuddyPounce/MenuCommand";
Menu_AddContactMenuItem(&mi);
return 0;
}
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index a51e18c032..db3383d326 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -241,7 +241,7 @@ void addProtoStatusMenuItem(char *protoName) CLISTMENUITEM mi = { 0 }; mi.flags = CMIF_TCHAR; mi.icolibItem = forms[0].hIcoLibItem; - mi.ptszName = _T(MODULENAME); + mi.name.t = _T(MODULENAME); mi.position = 2000040000; mi.pszService = buf; mi.hParentMenu = hRoot; diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index d04add9b62..82d8f12ccd 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -331,9 +331,9 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam) mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.flags = CMIF_TCHAR;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
- mi.ptszName = LPGENT("Disable c&lient change notification");
+ mi.name.t = LPGENT("Disable c&lient change notification");
else
- mi.ptszName = LPGENT("Enable c&lient change notification");
+ mi.name.t = LPGENT("Enable c&lient change notification");
mi.pszService = MS_CCN_TOGGLEPOPUPS;
g_hTogglePopupsMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 989a515ea7..ca7f000fbc 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -69,7 +69,7 @@ static int _iNextFrameId = 100; static HFONT _hTitleBarFont = NULL;
// menus
-static FrameMenuHandles cont = { NULL }; +static FrameMenuHandles cont = { NULL };
// others
static int _nContactListHeight = 0;
@@ -101,7 +101,7 @@ static int sortfunc(const void *a, const void *b) sd1 = (SortData *)a;
sd2 = (SortData *)b;
if (sd1->order > sd2->order) { return(1); };
- if (sd1->order < sd2->order) { return(-1); };
+ if (sd1->order < sd2->order) return -1;;
return (0);
};
int CLUIFrames_OnMoving(HWND hwnd, RECT *r)
@@ -749,7 +749,17 @@ static int CLUIFramesGetalClientFrame(void) return -1;
}
-static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGENMENU(*pfnAdd)(CLISTMENUITEM*))
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static HGENMENU addFrameMenuItem(CLISTMENUITEM *pmi, int frameid, bool bMain)
+{
+ HGENMENU res = (bMain) ? Menu_AddMainMenuItem(pmi) : Menu_AddContextFrameMenuItem(pmi);
+ if (pmi->pszService != NULL)
+ Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, frameid);
+ return res;
+}
+
+static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, bool bMain)
{
if (_fCluiFramesModuleNotStarted)
return NULL;
@@ -760,92 +770,85 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp CLISTMENUITEM mi = { 0 };
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Visible");
+ mi.name.a = LPGEN("&Visible");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
- Menu_ConfigureItem(fmh.MIVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIVisible = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Show title");
+ mi.name.a = LPGEN("&Show title");
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
- Menu_ConfigureItem(fmh.MITBVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MITBVisible = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Locked");
+ mi.name.a = LPGEN("&Locked");
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
- Menu_ConfigureItem(fmh.MILock = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MILock = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Expanded");
+ mi.name.a = LPGEN("&Expanded");
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
- Menu_ConfigureItem(fmh.MIColl = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIColl = addFrameMenuItem(&mi, frameid, bMain);
// floating
mi.position = popuppos++;
- mi.pszName = LPGEN("&Floating mode");
+ mi.name.a = LPGEN("&Floating mode");
mi.flags = 0;
mi.pszService = "Set_Floating";
- Menu_ConfigureItem(fmh.MIFloating = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIFloating = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Border");
+ mi.name.a = LPGEN("&Border");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
- Menu_ConfigureItem(fmh.MIBorder = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIBorder = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
// alignment root
mi.position = popuppos++;
- mi.pszName = LPGEN("&Align");
+ mi.name.a = LPGEN("&Align");
mi.flags = 0;
- mi.pszService = "";
- fmh.MIAlignRoot = pfnAdd(&mi);
+ mi.pszService = NULL;
+ fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain);
// align top
mi.hParentMenu = fmh.MIAlignRoot;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Top");
+ mi.name.a = LPGEN("&Top");
mi.pszService = CLUIFRAMESSETALIGNALTOP;
- mi.pszContactOwner = (char*)alTop;
- Menu_ConfigureItem(fmh.MIAlignTop = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignTop = addFrameMenuItem(&mi, frameid, bMain);
// align client
mi.position = popuppos++;
- mi.pszName = LPGEN("&Client");
+ mi.name.a = LPGEN("&Client");
mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
- mi.pszContactOwner = (char*)alClient;
- Menu_ConfigureItem(fmh.MIAlignClient = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignClient = addFrameMenuItem(&mi, frameid, bMain);
// align bottom
mi.position = popuppos++;
- mi.pszName = LPGEN("&Bottom");
+ mi.name.a = LPGEN("&Bottom");
mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
- mi.pszContactOwner = (char*)alBottom;
- Menu_ConfigureItem(fmh.MIAlignBottom = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignBottom = addFrameMenuItem(&mi, frameid, bMain);
// position root
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Position");
- mi.pszService = "";
- mi.pszContactOwner = (char*)0;
- fmh.MIPosRoot = pfnAdd(&mi);
+ mi.name.a = LPGEN("&Position");
+ mi.pszService = NULL;
+ mi.hParentMenu = addFrameMenuItem(&mi, frameid, bMain);
- mi.hParentMenu = fmh.MIPosRoot;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Up");
+ mi.name.a = LPGEN("&Up");
mi.pszService = CLUIFRAMESMOVEUP;
- mi.pszContactOwner = (char*)1;
- Menu_ConfigureItem(fmh.MIPosUp = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Down");
+ mi.name.a = LPGEN("&Down");
mi.pszService = CLUIFRAMESMOVEDOWN;
- mi.pszContactOwner = (char*)-1;
- Menu_ConfigureItem(fmh.MIPosDown = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ addFrameMenuItem(&mi, frameid, bMain);
return 0;
}
@@ -916,81 +919,58 @@ static int CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM) static INT_PTR _us_DoGetFrameOptions(WPARAM wParam, LPARAM)
{
- INT_PTR retval;
- BOOL bUnicodeText = (LOWORD(wParam) & FO_UNICODETEXT) != 0;
- wParam = MAKEWPARAM((LOWORD(wParam)) & ~FO_UNICODETEXT, HIWORD(wParam));
-
- if (_fCluiFramesModuleNotStarted) return -1;
+ if (_fCluiFramesModuleNotStarted)
+ return -1;
int pos = id2pos(HIWORD(wParam));
if (pos < 0 || pos >= g_nFramesCount)
return -1;
- switch (LOWORD(wParam)) {
- case FO_FLAGS:
- retval = 0;
- if (g_pfwFrames[pos].visible) retval |= F_VISIBLE;
- if (!g_pfwFrames[pos].collapsed) retval |= F_UNCOLLAPSED;
- if (g_pfwFrames[pos].Locked) retval |= F_LOCKED;
- if (g_pfwFrames[pos].TitleBar.ShowTitleBar) retval |= F_SHOWTB;
- if (g_pfwFrames[pos].TitleBar.ShowTitleBarTip) retval |= F_SHOWTBTIP;
- if (!g_CluiData.fLayered) {
- if (!(GetWindowLongPtr(g_pfwFrames[pos].hWnd, GWL_STYLE)&WS_BORDER))
- retval |= F_NOBORDER;
- }
- else if (!g_pfwFrames[pos].UseBorder)
- retval |= F_NOBORDER;
- break;
-
+ switch (LOWORD(wParam) & ~FO_UNICODETEXT) {
case FO_NAME:
- if (bUnicodeText)
- retval = (INT_PTR)g_pfwFrames[pos].name;
- else
- retval = (INT_PTR)g_pfwFrames[pos].szName;
- break;
+ return (INT_PTR)g_pfwFrames[pos].name;
case FO_TBNAME:
- if (bUnicodeText)
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.tbname;
- else
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.sztbname;
- break;
+ return (INT_PTR)g_pfwFrames[pos].TitleBar.tbname;
case FO_TBTIPNAME:
- if (bUnicodeText)
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.tooltip;
- else
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.sztooltip;
- break;
+ return (INT_PTR)g_pfwFrames[pos].TitleBar.tooltip;
case FO_TBSTYLE:
- retval = GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_STYLE);
- break;
+ return GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_STYLE);
case FO_TBEXSTYLE:
- retval = GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_EXSTYLE);
- break;
+ return GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_EXSTYLE);
case FO_ICON:
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.hicon;
- break;
+ return (INT_PTR)g_pfwFrames[pos].TitleBar.hicon;
case FO_HEIGHT:
- retval = (INT_PTR)g_pfwFrames[pos].height;
- break;
+ return (INT_PTR)g_pfwFrames[pos].height;
case FO_ALIGN:
- retval = (INT_PTR)g_pfwFrames[pos].align;
- break;
+ return (INT_PTR)g_pfwFrames[pos].align;
+
case FO_FLOATING:
- retval = (INT_PTR)g_pfwFrames[pos].floating;
- break;
- default:
- retval = -1;
- break;
+ return (INT_PTR)g_pfwFrames[pos].floating;
+
+ case FO_FLAGS:
+ INT_PTR retval = 0;
+ if (g_pfwFrames[pos].visible) retval |= F_VISIBLE;
+ if (!g_pfwFrames[pos].collapsed) retval |= F_UNCOLLAPSED;
+ if (g_pfwFrames[pos].Locked) retval |= F_LOCKED;
+ if (g_pfwFrames[pos].TitleBar.ShowTitleBar) retval |= F_SHOWTB;
+ if (g_pfwFrames[pos].TitleBar.ShowTitleBarTip) retval |= F_SHOWTBTIP;
+ if (!g_CluiData.fLayered) {
+ if (!(GetWindowLongPtr(g_pfwFrames[pos].hWnd, GWL_STYLE)&WS_BORDER))
+ retval |= F_NOBORDER;
+ }
+ else if (!g_pfwFrames[pos].UseBorder)
+ retval |= F_NOBORDER;
+ return retval;
}
- return retval;
+ return -1;
}
static int UpdateTBToolTip(int framepos)
@@ -1059,47 +1039,37 @@ static int _us_DoSetFrameOptions(WPARAM wParam, LPARAM lParam) return -1;
mir_free(fw.name);
- mir_free(fw.szName);
- if (bUnicodeText) {
+ if (bUnicodeText)
fw.name = mir_tstrdup((LPTSTR)lParam);
- fw.szName = mir_t2a((LPTSTR)lParam);
- }
- else {
- fw.szName = mir_strdup((char*)lParam);
+ else
fw.name = mir_a2t((char *)lParam);
- }
return 0;
case FO_TBNAME:
- if (lParam == 0) { return(-1); }
+ if (lParam == 0)
+ return -1;
mir_free(fw.TitleBar.tbname);
- mir_free(fw.TitleBar.sztbname);
- if (bUnicodeText) {
+ if (bUnicodeText)
fw.TitleBar.tbname = mir_tstrdup((LPTSTR)lParam);
- fw.TitleBar.sztbname = mir_t2a((LPTSTR)lParam);
- }
- else {
- fw.TitleBar.sztbname = mir_strdup((char*)lParam);
+ else
fw.TitleBar.tbname = mir_a2t((char*)lParam);
- }
if (fw.floating && (fw.TitleBar.tbname != NULL))
SetWindowText(fw.ContainerWnd, fw.TitleBar.tbname);
return 0;
case FO_TBTIPNAME:
- if (lParam == 0) { return(-1); }
- if (fw.TitleBar.tooltip != NULL) mir_free_and_nil(fw.TitleBar.tooltip);
- if (fw.TitleBar.sztooltip != NULL) mir_free_and_nil(fw.TitleBar.sztooltip);
- if (bUnicodeText) {
+ if (lParam == 0)
+ return -1;
+
+ if (fw.TitleBar.tooltip != NULL)
+ mir_free_and_nil(fw.TitleBar.tooltip);
+ if (bUnicodeText)
fw.TitleBar.tooltip = mir_tstrdup((LPTSTR)lParam);
- fw.TitleBar.sztooltip = mir_t2a((LPTSTR)lParam);
- }
- else {
- fw.TitleBar.sztooltip = mir_strdup((char*)lParam);
+ else
fw.TitleBar.tooltip = mir_a2t((char*)lParam);
- }
+
UpdateTBToolTip(pos);
return 0;
@@ -1520,20 +1490,20 @@ static int CLUIFramesLoadMainMenu() CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
- mi.pszName = LPGEN("Frames");
+ mi.name.a = LPGEN("Frames");
cont.MainMenuItem = Menu_AddMainMenuItem(&mi);
// create frames menu
int separator = 3000200000;
for (int i = 0; i < g_nFramesCount; i++) {
- mi.hIcon = g_pfwFrames[i].TitleBar.hicon;
+ mi.icolibItem = g_pfwFrames[i].TitleBar.hicon;
mi.flags = CMIF_TCHAR;
mi.position = separator;
mi.hParentMenu = cont.MainMenuItem;
- mi.ptszName = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
+ mi.name.t = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
mi.pszService = 0;
g_pfwFrames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
- CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id, g_pfwFrames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
+ CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id, g_pfwFrames[i].MenuHandles.MainMenuItem, separator, true);
CLUIFramesModifyMainMenuItems(g_pfwFrames[i].id, 0);
CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)g_pfwFrames[i].id, (LPARAM)g_pfwFrames[i].MenuHandles.MainMenuItem);
separator++;
@@ -1542,23 +1512,23 @@ static int CLUIFramesLoadMainMenu() separator += 100000;
// create "show all frames" menu
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.flags = 0;
mi.position = separator++;
mi.hParentMenu = cont.MainMenuItem;
- mi.pszName = LPGEN("Show all frames");
+ mi.name.a = LPGEN("Show all frames");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES;
Menu_AddMainMenuItem(&mi);
// create "show all titlebars" menu
mi.position = separator++;
- mi.pszName = LPGEN("Show all title bars");
+ mi.name.a = LPGEN("Show all title bars");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
// create "hide all titlebars" menu
mi.position = separator++;
- mi.pszName = LPGEN("Hide all title bars");
+ mi.name.a = LPGEN("Hide all title bars");
mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
return 0;
@@ -1618,32 +1588,29 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM) g_pfwFrames[g_nFramesCount].name = (LPTSTR)mir_alloc(255 * sizeof(TCHAR));
GetClassName(g_pfwFrames[g_nFramesCount].hWnd, g_pfwFrames[g_nFramesCount].name, 255);
}
- else {
- g_pfwFrames[g_nFramesCount].name = (clfrm->Flags&F_UNICODE) ? mir_u2t(clfrm->wname) : mir_a2t(clfrm->name);
- }
- g_pfwFrames[g_nFramesCount].szName = mir_t2a(g_pfwFrames[g_nFramesCount].name);
+ else g_pfwFrames[g_nFramesCount].name = (clfrm->Flags & F_UNICODE) ? mir_u2t(clfrm->wname) : mir_a2t(clfrm->name);
+
if (IsBadCodePtr((FARPROC)clfrm->TBname) || clfrm->TBname == NULL
|| ((clfrm->Flags&F_UNICODE) ? mir_wstrlen(clfrm->TBwname) : mir_strlen(clfrm->TBname)) == 0)
g_pfwFrames[g_nFramesCount].TitleBar.tbname = mir_tstrdup(g_pfwFrames[g_nFramesCount].name);
else
- g_pfwFrames[g_nFramesCount].TitleBar.tbname = (clfrm->Flags&F_UNICODE) ? mir_u2t(clfrm->TBwname) : mir_a2t(clfrm->TBname);
- g_pfwFrames[g_nFramesCount].TitleBar.sztbname = mir_t2a(g_pfwFrames[g_nFramesCount].TitleBar.tbname);
+ g_pfwFrames[g_nFramesCount].TitleBar.tbname = (clfrm->Flags & F_UNICODE) ? mir_u2t(clfrm->TBwname) : mir_a2t(clfrm->TBname);
+
g_pfwFrames[g_nFramesCount].needhide = FALSE;
- g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar = (clfrm->Flags&F_SHOWTB ? TRUE : FALSE);
- g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip = (clfrm->Flags&F_SHOWTBTIP ? TRUE : FALSE);
+ g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar = (clfrm->Flags & F_SHOWTB ? TRUE : FALSE);
+ g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip = (clfrm->Flags & F_SHOWTBTIP ? TRUE : FALSE);
- g_pfwFrames[g_nFramesCount].collapsed = (clfrm->Flags&F_UNCOLLAPSED) ? FALSE : TRUE;
+ g_pfwFrames[g_nFramesCount].collapsed = (clfrm->Flags & F_UNCOLLAPSED) ? FALSE : TRUE;
- g_pfwFrames[g_nFramesCount].Locked = clfrm->Flags&F_LOCKED ? TRUE : FALSE;
- g_pfwFrames[g_nFramesCount].visible = clfrm->Flags&F_VISIBLE ? TRUE : FALSE;
+ g_pfwFrames[g_nFramesCount].Locked = clfrm->Flags & F_LOCKED ? TRUE : FALSE;
+ g_pfwFrames[g_nFramesCount].visible = clfrm->Flags & F_VISIBLE ? TRUE : FALSE;
g_pfwFrames[g_nFramesCount].UseBorder = ((clfrm->Flags&F_NOBORDER) || g_CluiData.fLayered) ? FALSE : TRUE;
//Frames[nFramescount].OwnerWindow = 0;
- g_pfwFrames[g_nFramesCount].TitleBar.hwnd
- = CreateWindow(CLUIFrameTitleBarClassName, g_pfwFrames[g_nFramesCount].name,
+ g_pfwFrames[g_nFramesCount].TitleBar.hwnd = CreateWindow(CLUIFrameTitleBarClassName, g_pfwFrames[g_nFramesCount].name,
(db_get_b(0, CLUIFrameModule, "RemoveAllTitleBarBorders", 1) ? 0 : WS_BORDER)
| WS_CHILD | WS_CLIPCHILDREN |
(g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar ? WS_VISIBLE : 0) |
@@ -1651,8 +1618,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM) 0, 0, 0, 0, pcli->hwndContactList, NULL, g_hInst, NULL);
SetWindowLongPtr(g_pfwFrames[g_nFramesCount].TitleBar.hwnd, GWLP_USERDATA, g_pfwFrames[g_nFramesCount].id);
- g_pfwFrames[g_nFramesCount].TitleBar.hwndTip
- = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
+ g_pfwFrames[g_nFramesCount].TitleBar.hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
@@ -1740,14 +1706,11 @@ static int _us_DoRemoveFrame(WPARAM wParam, LPARAM) pos = id2pos(wParam);
- if (pos < 0 || pos>g_nFramesCount) { return(-1); };
+ if (pos < 0 || pos>g_nFramesCount) return -1;;
mir_free_and_nil(g_pfwFrames[pos].name);
- mir_free_and_nil(g_pfwFrames[pos].szName);
mir_free_and_nil(g_pfwFrames[pos].TitleBar.tbname);
- mir_free_and_nil(g_pfwFrames[pos].TitleBar.sztbname);
mir_free_and_nil(g_pfwFrames[pos].TitleBar.tooltip);
- mir_free_and_nil(g_pfwFrames[pos].TitleBar.sztooltip);
DestroyWindow(g_pfwFrames[pos].hWnd);
g_pfwFrames[pos].hWnd = (HWND)-1;
DestroyWindow(g_pfwFrames[pos].TitleBar.hwnd);
@@ -1990,7 +1953,7 @@ static int CLUIFramesResizeFrames(const RECT newsize) {
//sorting stuff
sdarray = (SortData*)malloc(sizeof(SortData)*g_nFramesCount);
- if (sdarray == NULL) { return(-1); };
+ if (sdarray == NULL) return -1;;
for (i = 0; i < g_nFramesCount; i++) {
sdarray[i].order = g_pfwFrames[i].order;
sdarray[i].realpos = i;
@@ -2779,21 +2742,16 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam int pos;
//tbinfo
{
- char TBcapt[255];
-
-
+ TCHAR TBcapt[255];
pos = id2pos(Frameid);
-
if (pos != -1) {
int oldflags;
-
- mir_snprintf(TBcapt, _countof(TBcapt), "%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d",
- g_pfwFrames[pos].szName, g_pfwFrames[pos].height, g_pfwFrames[pos].visible, g_pfwFrames[pos].floating,
+ mir_sntprintf(TBcapt, _countof(TBcapt), _T("%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d"),
+ g_pfwFrames[pos].name, g_pfwFrames[pos].height, g_pfwFrames[pos].visible, g_pfwFrames[pos].floating,
g_pfwFrames[pos].FloatingPos.x, g_pfwFrames[pos].FloatingPos.y,
g_pfwFrames[pos].FloatingSize.x, g_pfwFrames[pos].FloatingSize.y,
- g_pfwFrames[pos].order
- );
+ g_pfwFrames[pos].order);
oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, g_pfwFrames[pos].id), 0);
if (!(oldflags&F_SHOWTBTIP)) {
@@ -3041,7 +2999,6 @@ static int CLUIFrameResizeFloatingFrame(int framepos) if (g_pfwFrames[framepos].TitleBar.ShowTitleBar) {
CLUI_ShowWindowMod(g_pfwFrames[framepos].TitleBar.hwnd, SW_SHOW/*NOACTIVATE*/);
- //if (Frames[framepos].Locked){return 0;};
g_pfwFrames[framepos].height = height - DEFAULT_TITLEBAR_HEIGHT;
SetWindowPos(g_pfwFrames[framepos].TitleBar.hwnd, HWND_TOP, 0, 0, width, DEFAULT_TITLEBAR_HEIGHT, SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_DRAWFRAME);
@@ -3049,20 +3006,13 @@ static int CLUIFrameResizeFloatingFrame(int framepos) }
else {
- //SetWindowPos(Frames[framepos].TitleBar.hwnd,HWND_TOP, 0, 0, width,DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW|SWP_NOMOVE);
- //if (Frames[framepos].Locked){return 0;};
g_pfwFrames[framepos].height = height;
CLUI_ShowWindowMod(g_pfwFrames[framepos].TitleBar.hwnd, SW_HIDE);
SetWindowPos(g_pfwFrames[framepos].hWnd, HWND_TOP, 0, 0, width, height, SWP_SHOWWINDOW | SWP_NOACTIVATE);
};
- // CLUIFramesForceUpdateFrame(&Frames[framepos]);
if (g_pfwFrames[framepos].ContainerWnd != 0) UpdateWindow(g_pfwFrames[framepos].ContainerWnd);
- //GetClientRect(Frames[framepos].TitleBar.hwnd,&Frames[framepos].TitleBar.wndSize);
GetWindowRect(g_pfwFrames[framepos].hWnd, &g_pfwFrames[framepos].wndSize);
- //Frames[framepos].height = Frames[framepos].wndSize.bottom-Frames[framepos].wndSize.top;
- //GetClientRect(Frames[framepos].hWnd,&Frames[framepos].wndSize);
- //Frames[framepos].height = Frames[framepos].wndSize.bottom-Frames[framepos].wndSize.top;
return 0;
};
@@ -3385,43 +3335,18 @@ int CLUIFrameOnModulesLoad(WPARAM, LPARAM) {
/* HOOK */
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, false);
return 0;
}
int CLUIFrameOnModulesUnload(WPARAM, LPARAM)
{
- g_CluiData.bSTATE = STATE_PREPEARETOEXIT;
+ g_CluiData.bSTATE = STATE_PREPARETOEXIT;
- if (!cont.MIVisible)
- return 0;
-
- Menu_RemoveItem(cont.MIVisible);
- Menu_RemoveItem(cont.MITBVisible);
- Menu_RemoveItem(cont.MILock);
- Menu_RemoveItem(cont.MIColl);
- Menu_RemoveItem(cont.MIFloating);
- Menu_RemoveItem(cont.MIAlignTop);
- Menu_RemoveItem(cont.MIAlignClient);
- Menu_RemoveItem(cont.MIAlignBottom);
- Menu_RemoveItem(cont.MIBorder);
- Menu_RemoveItem(cont.MIAlignRoot);
-
- Menu_RemoveItem(cont.MIPosUp);
- Menu_RemoveItem(cont.MIPosDown);
- Menu_RemoveItem(cont.MIPosRoot);
-
- Menu_RemoveItem(cont.MIVisible);
- Menu_RemoveItem(cont.MITBVisible);
- Menu_RemoveItem(cont.MILock);
- Menu_RemoveItem(cont.MIColl);
- Menu_RemoveItem(cont.MIFloating);
- Menu_RemoveItem(cont.MIBorder);
- Menu_RemoveItem(cont.MIAlignRoot);
- Menu_RemoveItem(cont.MIPosRoot);
- cont.MIVisible = 0;
-
- _AniAva_OnModulesUnload();
+ if (cont.MIVisible) {
+ cont.MIVisible = NULL;
+ _AniAva_OnModulesUnload();
+ }
return 0;
}
@@ -3510,11 +3435,8 @@ int UnLoadCLUIFramesModule(void) if (g_pfwFrames[i].UpdateRgn) DeleteObject(g_pfwFrames[i].UpdateRgn);
mir_free_and_nil(g_pfwFrames[i].name);
- mir_free_and_nil(g_pfwFrames[i].szName);
mir_free_and_nil(g_pfwFrames[i].TitleBar.tbname);
- mir_free_and_nil(g_pfwFrames[i].TitleBar.sztbname);
mir_free_and_nil(g_pfwFrames[i].TitleBar.tooltip);
- mir_free_and_nil(g_pfwFrames[i].TitleBar.sztooltip);
}
free(g_pfwFrames);
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.h b/plugins/Clist_modern/src/CLUIFrames/cluiframes.h index b4d89866b3..09af1b44f2 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.h +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.h @@ -62,7 +62,7 @@ struct FrameMenuHandles HGENMENU MainMenuItem;
HGENMENU MIVisible, MITitle, MITBVisible, MILock, MIColl, MIFloating, MIAlignRoot;
HGENMENU MIAlignTop, MIAlignClient, MIAlignBottom;
- HGENMENU MIBorder, MIPosRoot, MIPosUp, MIPosDown;
+ HGENMENU MIBorder;
};
struct FrameTitleBar
@@ -74,9 +74,6 @@ struct FrameTitleBar LPTSTR tbname;
LPTSTR tooltip;
- char * sztbname;
- char * sztooltip;
-
HMENU hmenu;
HICON hicon;
@@ -101,7 +98,6 @@ struct FRAMEWND HWND hWnd;
RECT wndSize;
LPTSTR name;
- LPSTR szName;
int align;
int height;
int dwFlags;
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index 0c6a9a5e77..a63d2279ae 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -84,7 +84,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -229,43 +229,43 @@ void InitGroupMenus(void) mi.position = 1900000;
mi.pszService = "CloseAction";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
- mi.pszName = LPGEN("&Hide/show");
+ mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/add contacts...");
+ mi.name.a = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300000;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
- mi.pszName = LPGEN("&Main menu");
+ mi.name.a = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
- mi.pszName = LPGEN("&Status");
+ mi.name.a = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
- mi.pszName = LPGEN("&About");
+ mi.name.a = LPGEN("&About");
AddGroupMenuItem(0, (LPARAM)&mi);
GroupMenuParam gmp = {};
@@ -273,31 +273,31 @@ void InitGroupMenus(void) mi.position = 100000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
- mi.pszName = LPGEN("&New group");
+ mi.name.a = LPGEN("&New group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- DestroyIcon_protect(mi.hIcon);
+ DestroyIcon_protect((HICON)mi.icolibItem);
mi.position = 100001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide offline users");
+ mi.name.a = LPGEN("&Hide offline users");
gmp.lParam = 0; gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100002;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.pszName = LPGEN("Hide &offline users out here");
+ mi.name.a = LPGEN("Hide &offline users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.pszName = LPGEN("Hide &empty groups");
+ mi.name.a = LPGEN("Hide &empty groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &groups");
+ mi.name.a = LPGEN("Disable &groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
}
@@ -384,7 +384,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -472,25 +472,24 @@ void InitSubGroupMenus(void) mi.position = 1000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New subgroup");
+ mi.name.a = LPGEN("&New subgroup");
gmp.lParam = 0;
gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- DestroyIcon_protect(mi.hIcon);
mi.position = 1001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Hide offline users in here");
+ mi.name.a = LPGEN("&Hide offline users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 1002;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Show offline users in here");
+ mi.name.a = LPGEN("&Show offline users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPSHOWOFFLINE;
hShowOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -499,7 +498,7 @@ void InitSubGroupMenus(void) mi.position = 900001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Rename group");
+ mi.name.a = LPGEN("&Rename group");
gmp.lParam = 0;
gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -507,7 +506,7 @@ void InitSubGroupMenus(void) mi.position = 900002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Delete group");
+ mi.name.a = LPGEN("&Delete group");
gmp.lParam = 0;
gmp.wParam = POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h index 81ec07edc3..d81e30a5f7 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h @@ -195,7 +195,7 @@ enum STATE_DLL_LOADING = 0,
STATE_CLUI_LOADING,
STATE_NORMAL,
- STATE_PREPEARETOEXIT,
+ STATE_PREPARETOEXIT,
STATE_EXITING
};
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index aa68906097..b31af23f27 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -36,7 +36,7 @@ int UnloadFavoriteContactMenu(); INT_PTR CloseAction(WPARAM, LPARAM)
{
int k;
- g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
+ g_CluiData.bSTATE = STATE_PREPARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
do
k = CallService(MS_SYSTEM_OKTOEXIT, 0, 0);
while (!k);
@@ -103,19 +103,19 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) mi.icolibItem = iconList[bContactRate].hIcolib;
mi.flags = CMIF_TCHAR;
if (!bContactRate)
- mi.ptszName = FAVMENUROOTNAME;
+ mi.name.t = FAVMENUROOTNAME;
else {
TCHAR *str1 = TranslateTS(FAVMENUROOTNAME), *str2 = TranslateTS(rates[bContactRate]);
size_t bufsize = (mir_tstrlen(str1) + mir_tstrlen(str2) + 15) * sizeof(TCHAR);
TCHAR *name = (TCHAR *)_alloca(bufsize);
mir_sntprintf(name, (bufsize / sizeof(TCHAR)), _T("%s (%s)"), str1, str2);
- mi.ptszName = name;
+ mi.name.t = name;
mi.flags |= CMIF_KEEPUNTRANSLATED;
}
if (!hFavoriteContactMenu)
hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
else {
- Menu_ModifyItem(hFavoriteContactMenu, mi.ptszName);
+ Menu_ModifyItem(hFavoriteContactMenu, mi.name.t);
bModifyMenu = TRUE;
}
@@ -134,21 +134,21 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) Menu_ModifyItem(hFavoriteContactMenuItems[i], NULL, iconList[i].hIcolib, mi.flags);
else {
mi.icolibItem = iconList[i].hIcolib;
- mi.ptszName = rates[i];
+ mi.name.t = rates[i];
mi.pszService = CLUI_FAVSETRATE;
hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hFavoriteContactMenuItems[i], MCI_OPT_EXECPARAM, i);
}
}
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.flags = CMIF_TCHAR | (db_get_b(hContact, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
if (bModifyMenu && hShowIfOflineItem)
Menu_ModifyItem(hShowIfOflineItem, NULL, INVALID_HANDLE_VALUE, mi.flags);
else {
mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
mi.position = -100000000;
- mi.ptszName = LPGENT("Show even if offline");
+ mi.name.t = LPGENT("Show even if offline");
hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hShowIfOflineItem, MCI_OPT_EXECPARAM, i + 100000000);
}
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index ac20d89b61..049e105b36 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -317,44 +317,44 @@ void InitTrayMenus(void) CLISTMENUITEM mi = { 0 };
mi.position = 900000;
mi.pszService = "CloseAction";
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
Menu_AddTrayMenuItem(&mi);
mi.position = 100000;
mi.pszService = MS_CLIST_SHOWHIDE;
- mi.pszName = LPGEN("&Hide/show");
+ mi.name.a = LPGEN("&Hide/show");
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
hTrayHideShowMainMenuItem = Menu_AddTrayMenuItem(&mi);
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/add contacts...");
+ mi.name.a = LPGEN("&Find/add contacts...");
Menu_AddTrayMenuItem(&mi);
mi.position = 300000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszService = "FakeService_1";
- mi.pszName = LPGEN("&Main menu");
+ mi.name.a = LPGEN("&Main menu");
hTrayMainMenuItemProxy = Menu_AddTrayMenuItem(&mi);
mi.position = 300100;
mi.pszService = "FakeService_2";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
- mi.pszName = LPGEN("&Status");
+ mi.name.a = LPGEN("&Status");
hTrayStatusMenuItemProxy = Menu_AddTrayMenuItem(&mi);
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
Menu_AddTrayMenuItem(&mi);
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
- mi.pszName = LPGEN("&About");
+ mi.name.a = LPGEN("&About");
Menu_AddTrayMenuItem(&mi);
hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 8ab38f6e47..d2945e1aa0 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -341,18 +341,16 @@ HRESULT CLUI::RegisterAvatarMenu() CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar);
mi.position = 2000150000;
mi.icolibItem = iconItem[0].hIcolib;
- mi.pszName = LPGEN("Show contact &avatar");
+ mi.name.a = LPGEN("Show contact &avatar");
mi.pszService = "CList/ShowContactAvatar";
hShowAvatarMenuItem = Menu_AddContactMenuItem(&mi);
- DestroyIcon_protect(mi.hIcon);
CreateServiceFunction("CList/HideContactAvatar", CLUI::Service_Menu_HideContactAvatar);
mi.position = 2000150001;
mi.icolibItem = iconItem[1].hIcolib;
- mi.pszName = LPGEN("Hide contact &avatar");
+ mi.name.a = LPGEN("Hide contact &avatar");
mi.pszService = "CList/HideContactAvatar";
hHideAvatarMenuItem = Menu_AddContactMenuItem(&mi);
- DestroyIcon_protect(mi.hIcon);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, CLUI::OnEvent_ContactMenuPreBuild);
return S_OK;
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index dc92f299de..14c8216866 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -2983,13 +2983,13 @@ static int ske_ValidateSingleFrameImage(FRAMEWND * Frame, BOOL SkipBkgBlitting) BitBlt(g_pCachedWindow->hImageDC, rLine.left, rLine.top, rLine.right - rLine.left, rLine.bottom - rLine.top, g_pCachedWindow->hBackDC, rLine.left, rLine.top, SRCCOPY); char req[255]; - mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%s,Part=Back", Frame->szName); + mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=Back", Frame->name); SkinDrawGlyph(g_pCachedWindow->hImageDC, &rLine, &rLine, req); - mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%s,Part=Thumb", Frame->szName); + mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=Thumb", Frame->name); SkinDrawGlyph(g_pCachedWindow->hImageDC, &rThumb, &rThumb, req); - mir_snprintf(req, _countof(req), "Main,ID=ScrollBar, Frame=%s,Part=UpLineButton", Frame->szName); + mir_snprintf(req, _countof(req), "Main,ID=ScrollBar, Frame=%S,Part=UpLineButton", Frame->name); SkinDrawGlyph(g_pCachedWindow->hImageDC, &rUpBtn, &rUpBtn, req); - mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%s,Part=DownLineButton", Frame->szName); + mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=DownLineButton", Frame->name); SkinDrawGlyph(g_pCachedWindow->hImageDC, &rDnBtn, &rDnBtn, req); } @@ -3019,6 +3019,7 @@ int ske_BltBackImage(HWND destHWND, HDC destDC, RECT *BltClientRect) return BitBlt(destDC, w.left, w.top, (w.right - w.left), (w.bottom - w.top), g_pCachedWindow->hBackDC, (ptChildWnd.x - ptMainWnd.x), (ptChildWnd.y - ptMainWnd.y), SRCCOPY); } + int ske_ReCreateBackImage(BOOL Erase, RECT *w) { RECT wnd = { 0 }; @@ -3112,7 +3113,8 @@ int ske_DrawNonFramedObjects(BOOL Erase, RECT *r) return 0; } -int ske_ValidateFrameImageProc(RECT *r) // Calling queued frame paint procs and refresh image +// Calling queued frame paint procs and refresh image +int ske_ValidateFrameImageProc(RECT *r) { RECT wnd = { 0 }; BOOL IsNewCache = 0; diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index 1921b5137c..e3e2986474 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -564,7 +564,17 @@ int CLUIFramesGetalClientFrame(void) return -1; } -HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGENMENU(*pfnAdd)(CLISTMENUITEM*)) +///////////////////////////////////////////////////////////////////////////////////////// + +static HGENMENU addFrameMenuItem(CLISTMENUITEM *pmi, int frameid, bool bMain) +{ + HGENMENU res = (bMain) ? Menu_AddMainMenuItem(pmi) : Menu_AddContextFrameMenuItem(pmi); + if (pmi->pszService != NULL) + Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, frameid); + return res; +} + +HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, bool bMain) { if (FramesSysNotStarted) return NULL; @@ -576,114 +586,107 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); mi.hParentMenu = root; mi.position = popuppos++; - mi.pszName = LPGEN("&FrameTitle"); + mi.name.a = LPGEN("&FrameTitle"); mi.flags = CMIF_GRAYED; - fmh.MITitle = pfnAdd(&mi); + fmh.MITitle = addFrameMenuItem(&mi, frameid, bMain); popuppos += 100000; - mi.hIcon = NULL; + mi.icolibItem = NULL; mi.position = popuppos++; - mi.pszName = LPGEN("&Visible"); + mi.name.a = LPGEN("&Visible"); mi.flags = CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SHFRAME; - Menu_ConfigureItem(fmh.MIVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MIVisible = addFrameMenuItem(&mi, frameid, bMain); mi.position = popuppos++; - mi.pszName = LPGEN("&Show title bar"); + mi.name.a = LPGEN("&Show title bar"); mi.flags = CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR; - Menu_ConfigureItem(fmh.MITBVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MITBVisible = addFrameMenuItem(&mi, frameid, bMain); popuppos += 100000; mi.position = popuppos++; - mi.pszName = LPGEN("&Locked"); + mi.name.a = LPGEN("&Locked"); mi.flags = CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_ULFRAME; - Menu_ConfigureItem(fmh.MILock = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MILock = addFrameMenuItem(&mi, frameid, bMain); mi.position = popuppos++; - mi.pszName = LPGEN("&Collapsed"); + mi.name.a = LPGEN("&Collapsed"); mi.flags = CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME; - Menu_ConfigureItem(fmh.MIColl = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MIColl = addFrameMenuItem(&mi, frameid, bMain); // floating mi.position = popuppos++; - mi.pszName = LPGEN("&Floating mode"); + mi.name.a = LPGEN("&Floating mode"); mi.flags = 0; mi.pszService = "Set_Floating"; - fmh.MIFloating = pfnAdd(&mi); + fmh.MIFloating = addFrameMenuItem(&mi, frameid, bMain); popuppos += 100000; mi.position = popuppos++; - mi.pszName = LPGEN("&Border"); + mi.name.a = LPGEN("&Border"); mi.flags = CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SETUNBORDER; - Menu_ConfigureItem(fmh.MIBorder = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MIBorder = addFrameMenuItem(&mi, frameid, bMain); popuppos += 100000; mi.position = popuppos++; - mi.pszName = LPGEN("&Skinned frame"); + mi.name.a = LPGEN("&Skinned frame"); mi.flags = CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SETSKINNED; - Menu_ConfigureItem(fmh.MISkinned = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MISkinned = addFrameMenuItem(&mi, frameid, bMain); popuppos += 100000; // alignment root mi.hParentMenu = root; mi.position = popuppos++; - mi.pszName = LPGEN("&Align"); + mi.name.a = LPGEN("&Align"); mi.flags = 0; - mi.pszService = ""; - fmh.MIAlignRoot = pfnAdd(&mi); + mi.pszService = NULL; + fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain); // align top mi.hParentMenu = fmh.MIAlignRoot; mi.position = popuppos++; - mi.pszName = LPGEN("&Top"); + mi.name.a = LPGEN("&Top"); mi.pszService = CLUIFRAMESSETALIGNALTOP; - mi.pszContactOwner = (char*)alTop; - Menu_ConfigureItem(fmh.MIAlignTop = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MIAlignTop = addFrameMenuItem(&mi, frameid, bMain); // align client mi.position = popuppos++; - mi.pszName = LPGEN("&Client"); + mi.name.a = LPGEN("&Client"); mi.pszService = CLUIFRAMESSETALIGNALCLIENT; - mi.pszContactOwner = (char*)alClient; - Menu_ConfigureItem(fmh.MIAlignClient = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MIAlignClient = addFrameMenuItem(&mi, frameid, bMain); // align bottom mi.position = popuppos++; - mi.pszName = LPGEN("&Bottom"); + mi.name.a = LPGEN("&Bottom"); mi.pszService = CLUIFRAMESSETALIGNALBOTTOM; - mi.pszContactOwner = (char*)alBottom; - Menu_ConfigureItem(fmh.MIAlignBottom = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + fmh.MIAlignBottom = addFrameMenuItem(&mi, frameid, bMain); // position root mi.hParentMenu = root; mi.position = popuppos++; - mi.pszName = LPGEN("&Position"); - mi.pszService = ""; - mi.pszContactOwner = (char*)0; - HGENMENU menuid = pfnAdd(&mi); + mi.name.a = LPGEN("&Position"); + mi.pszService = NULL; + mi.hParentMenu = addFrameMenuItem(&mi, frameid, bMain); - mi.hParentMenu = menuid; mi.position = popuppos++; - mi.pszName = LPGEN("&Up"); + mi.name.a = LPGEN("&Up"); mi.pszService = CLUIFRAMESMOVEUP; - mi.pszContactOwner = (char*)1; - Menu_ConfigureItem(pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + addFrameMenuItem(&mi, frameid, bMain); mi.position = popuppos++; - mi.pszName = LPGEN("&Down"); + mi.name.a = LPGEN("&Down"); mi.pszService = CLUIFRAMESMOVEDOWN; - mi.pszContactOwner = (char*)-1; - Menu_ConfigureItem(pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid); + addFrameMenuItem(&mi, frameid, bMain); return 0; } @@ -1338,21 +1341,21 @@ static int CLUIFramesLoadMainMenu() CLISTMENUITEM mi = { 0 }; mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME); mi.position = 3000090000; - mi.pszName = LPGEN("Frames"); + mi.name.a = LPGEN("Frames"); mi.pszService = 0; cont.MainMenuItem = Menu_AddMainMenuItem(&mi); // create frames menu int separator = (int)3000200000; for (int i = 0; i < nFramescount; i++) { - mi.hIcon = Frames[i].TitleBar.hicon; + mi.icolibItem = Frames[i].TitleBar.hicon; mi.flags = CMIF_TCHAR; mi.position = separator; mi.hParentMenu = cont.MainMenuItem; - mi.ptszName = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name; + mi.name.t = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name; mi.pszService = 0; Frames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi); - CLUIFramesCreateMenuForFrame(Frames[i].id, Frames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem); + CLUIFramesCreateMenuForFrame(Frames[i].id, Frames[i].MenuHandles.MainMenuItem, separator, true); CLUIFramesModifyMainMenuItems(Frames[i].id, 0); CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)Frames[i].id, (LPARAM)Frames[i].MenuHandles.MainMenuItem); separator++; @@ -1365,20 +1368,20 @@ static int CLUIFramesLoadMainMenu() mi.flags = 0; mi.position = separator++; mi.hParentMenu = cont.MainMenuItem; - mi.pszName = LPGEN("Show all frames"); + mi.name.a = LPGEN("Show all frames"); mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES; Menu_AddMainMenuItem(&mi); // create "show all titlebars" menu mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP); mi.position = separator++; - mi.pszName = LPGEN("Show all title bars"); + mi.name.a = LPGEN("Show all title bars"); mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB; Menu_AddMainMenuItem(&mi); // create "hide all titlebars" menu mi.position = separator++; - mi.pszName = LPGEN("Hide all title bars"); + mi.name.a = LPGEN("Hide all title bars"); mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB; Menu_AddMainMenuItem(&mi); return 0; @@ -2938,7 +2941,7 @@ static int CLUIFrameOnModulesLoad(WPARAM, LPARAM) hThreadMFUpdate = mir_forkthread(MF_UpdateThread, NULL); SetThreadPriority(hThreadMFUpdate, THREAD_PRIORITY_IDLE); CLUIFramesLoadMainMenu(); - CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, Menu_AddContextFrameMenuItem); + CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, false); return 0; } diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h index 86aba956b1..4fef8cec0f 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h @@ -69,6 +69,7 @@ struct FrameTitleBar LPTSTR tbname;
LPTSTR tooltip;
+
HMENU hmenu;
HICON hicon;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 077d832549..61911d6617 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -86,7 +86,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -236,78 +236,78 @@ void InitGroupMenus(void) mi.position = 1900000;
mi.pszService = "CloseAction";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
- mi.pszName = LPGEN("&Hide/show");
+ mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/add contacts...");
+ mi.name.a = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300000;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
- mi.pszName = LPGEN("&Main menu");
+ mi.name.a = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
- mi.pszName = LPGEN("&Status");
+ mi.name.a = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 390100;
mi.icolibItem = iconItem[1].hIcolib;
- mi.pszName = LPGEN("Appearance");
+ mi.name.a = LPGEN("Appearance");
hAppearanceMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
- mi.pszName = LPGEN("&About the contact list...");
+ mi.name.a = LPGEN("&About the contact list...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.flags = 0;
mi.position = 100000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New group");
+ mi.name.a = LPGEN("&New group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide offline users");
+ mi.name.a = LPGEN("&Hide offline users");
gmp.lParam = 0; gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100002;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.pszName = LPGEN("Hide &offline users out here");
+ mi.name.a = LPGEN("Hide &offline users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.pszName = LPGEN("Hide &empty groups");
+ mi.name.a = LPGEN("Hide &empty groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &groups");
+ mi.name.a = LPGEN("Disable &groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
}
@@ -369,7 +369,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -464,16 +464,16 @@ void InitSubGroupMenus(void) mi.position = 1000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New subgroup");
+ mi.name.a = LPGEN("&New subgroup");
gmp.lParam = 0;
gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 1001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Hide offline users in here");
+ mi.name.a = LPGEN("&Hide offline users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -482,7 +482,7 @@ void InitSubGroupMenus(void) mi.position = 900001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Rename group");
+ mi.name.a = LPGEN("&Rename group");
gmp.lParam = 0;
gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -490,7 +490,7 @@ void InitSubGroupMenus(void) mi.position = 900002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Delete group");
+ mi.name.a = LPGEN("&Delete group");
gmp.lParam = 0;
gmp.wParam = POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index fd7b062dd3..af4fc69042 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -385,7 +385,7 @@ int InitCustomMenus(void) mi.position = 200000;
mi.pszService = "CList/SetContactIgnore";
mi.icolibItem = iconItem[1].hIcolib;
- mi.pszName = LPGEN("&Contact list settings...");
+ mi.name.a = LPGEN("&Contact list settings...");
Menu_AddContactMenuItem(&mi);
hMainStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 1a6df51867..0608ac2d5f 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -1161,9 +1161,9 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.hIcon = hIcons[0];
+ mi.icolibItem = hIcons[0];
mi.position = 1900000000;
- mi.ptszName = (IsWindowVisible(hwndConsole)) ? LPGENT("Hide Console") : LPGENT("Show Console");
+ mi.name.t = (IsWindowVisible(hwndConsole)) ? LPGENT("Hide Console") : LPGENT("Show Console");
mi.pszService = MS_CONSOLE_SHOW_HIDE;
hMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 30eb931822..a4dc6ff656 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -136,10 +136,10 @@ static int HookModulesLoaded(WPARAM, LPARAM) CallService("DBEditorpp/RegisterModule", (WPARAM)modules, 1);
CLISTMENUITEM mi = { 0 };
- mi.pszName = LPGEN("Contacts");
+ mi.name.a = LPGEN("Contacts");
mi.position = -2000009990; //position in menu
mi.pszService = MS_CONTACTS_SEND;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS));
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS));
hContactMenuItem = Menu_AddContactMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, HookPreBuildContactMenu);
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 57a0ef06ee..ba56531671 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -259,51 +259,51 @@ static int ModulesLoaded(WPARAM, LPARAM) mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Version Information"), 2000089999, GetIconHandle(IDI_VI));
mi.position = 2000089995;
- mi.pszName = LPGEN("Copy to clipboard");
+ mi.name.a = LPGEN("Copy to clipboard");
mi.icolibItem = GetIconHandle(IDI_VITOCLIP);
mi.pszService = MS_CRASHDUMPER_STORETOCLIP;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089996;
- mi.pszName = LPGEN("Store to file");
+ mi.name.a = LPGEN("Store to file");
mi.icolibItem = GetIconHandle(IDI_VITOFILE);
mi.pszService = MS_CRASHDUMPER_STORETOFILE;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089997;
- mi.pszName = LPGEN("Show");
+ mi.name.a = LPGEN("Show");
mi.icolibItem = GetIconHandle(IDI_VISHOW);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089998;
- mi.pszName = LPGEN("Show with DLLs");
+ mi.name.a = LPGEN("Show with DLLs");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
mi.position = 2000089999;
- mi.pszName = LPGEN("Upload");
+ mi.name.a = LPGEN("Upload");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_UPLOAD;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089999;
- mi.pszName = LPGEN("Copy link to clipboard");
+ mi.name.a = LPGEN("Copy link to clipboard");
mi.icolibItem = GetIconHandle(IDI_LINKTOCLIP);//need icon
mi.pszService = MS_CRASHDUMPER_URLTOCLIP;
Menu_AddMainMenuItem(&mi);
if (catchcrashes && !needrestart) {
mi.position = 2000099990;
- mi.pszName = LPGEN("Open crash report directory");
+ mi.name.a = LPGEN("Open crash report directory");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_AddMainMenuItem(&mi);
}
mi.position = 2000099991;
- mi.pszName = LPGEN("Open online Version Info");
+ mi.name.a = LPGEN("Open online Version Info");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp index 653e134388..c517ac12bc 100644 --- a/plugins/CyrTranslit/src/MirandaContact.cpp +++ b/plugins/CyrTranslit/src/MirandaContact.cpp @@ -64,7 +64,7 @@ void MirandaContact::save(MCONTACT hContact, bool bValue) void MirandaContact::addMenuItem()
{
CLISTMENUITEM mi = { 0 };
- mi.pszName = MENU_ITEM_TEXT;
+ mi.name.a = MENU_ITEM_TEXT;
mi.position = 65535;
mi.pszService = MENU_COMMAND_CALLBACK_SERVICE;
hTransliterateCmdMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 0fbbe2e031..8a385b21f5 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -312,14 +312,14 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM) // main menu item
CLISTMENUITEM mi = { 0 };
- mi.ptszName = LPGENT("Database");
+ mi.name.t = LPGENT("Database");
mi.position = 500000000;
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = db->GetMenuTitle();
+ mi.name.t = db->GetMenuTitle();
mi.hParentMenu = hMenuRoot;
mi.pszService = MS_DB_CHANGEPASSWORD;
hSetPwdMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index 840a49442c..c887ddb809 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -117,7 +117,7 @@ int ModulesLoaded(WPARAM, LPARAM) mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 1900000001);
mi.position = 1900000001;
mi.icolibItem = GetIcoLibHandle(ICO_DBE_BUTT);
- mi.pszName = modFullname;
+ mi.name.a = modFullname;
mi.pszService = "DBEditorpp/MenuCommand";
Menu_AddMainMenuItem(&mi);
@@ -125,7 +125,7 @@ int ModulesLoaded(WPARAM, LPARAM) mi.position = 1900000001;
mi.flags = 0;
mi.icolibItem = GetIcoLibHandle(ICO_REGUSER);
- mi.pszName = LPGEN("Open user tree in DBE++");
+ mi.name.a = LPGEN("Open user tree in DBE++");
mi.pszService = "DBEditorpp/MenuCommand";
hUserMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 99b4abe08b..cc04428fa3 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -102,13 +102,13 @@ int ModulesLoad(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000);
- mi.pszName = LPGEN("Backup profile");
+ mi.name.a = LPGEN("Backup profile");
mi.pszService = MS_AB_BACKUP;
mi.icolibItem = iconList[0].hIcolib;
mi.position = 500100000;
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Save profile as...");
+ mi.name.a = LPGEN("Save profile as...");
mi.pszService = MS_AB_SAVEAS;
mi.icolibItem = iconList[1].hIcolib;
mi.position = 500100001;
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp index 432bd211ec..c1c57fbf1f 100644 --- a/plugins/Dropbox/src/dropbox_menus.cpp +++ b/plugins/Dropbox/src/dropbox_menus.cpp @@ -17,7 +17,7 @@ void CDropbox::InitializeMenus() {
CLISTMENUITEM mi = { 0 };
mi.pszService = MODULE"/SendFilesToDropbox";
- mi.pszName = LPGEN("Upload files to Dropbox");
+ mi.name.a = LPGEN("Upload files to Dropbox");
mi.position = -2000020000 + CMI_SEND_FILES;
mi.icolibItem = GetIconHandleByName("upload");
contactMenuItems[CMI_SEND_FILES] = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Exchange/src/hooked_events.cpp b/plugins/Exchange/src/hooked_events.cpp index 7ee2eec3b6..7f6bd40295 100644 --- a/plugins/Exchange/src/hooked_events.cpp +++ b/plugins/Exchange/src/hooked_events.cpp @@ -60,13 +60,13 @@ int OnModulesLoaded(WPARAM, LPARAM) {
UpdateTimers();
- CLISTMENUITEM cl = {0};
- cl.hIcon = hiMailIcon;
- cl.position = 10000000;
- cl.pszService = MS_EXCHANGE_CHECKEMAIL;
- cl.flags = CMIF_TCHAR;
- cl.ptszName = LPGENT("Check exchange mailbox");
- Menu_AddMainMenuItem (&cl);
+ CLISTMENUITEM mi = {0};
+ mi.icolibItem = hiMailIcon;
+ mi.position = 10000000;
+ mi.pszService = MS_EXCHANGE_CHECKEMAIL;
+ mi.flags = CMIF_TCHAR;
+ mi.name.t = LPGENT("Check exchange mailbox");
+ Menu_AddMainMenuItem(&mi);
hEmailsDlg = NULL; //CreateDialog(hInstance, MAKEINTRESOURCE(IDD_EMAILS), NULL, DlgProcEmails); //create emails window
FirstTimeCheck();
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index bf5950cdae..ed5185dd71 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -95,14 +95,14 @@ void InitMenuItems() mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
- mi.ptszName = LPGENT("FTP File");
+ mi.name.t = LPGENT("FTP File");
hMainMenu = Menu_AddMainMenuItem(&mi);
if (opt.bUseSubmenu)
hMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.ptszName = stzName;
+ mi.name.t = stzName;
CLISTMENUITEM mi2 = { 0 };
mi2.flags = CMIF_TCHAR;
@@ -127,7 +127,7 @@ void InitMenuItems() mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.ptszName = LPGENT("Upload file(s)");
+ mi2.name.t = LPGENT("Upload file(s)");
HGENMENU tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, mi2.position = i + UploadJob::FTP_RAWFILE);
@@ -137,7 +137,7 @@ void InitMenuItems() mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.ptszName = LPGENT("Zip and upload file(s)");
+ mi2.name.t = LPGENT("Zip and upload file(s)");
tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFILE);
@@ -147,7 +147,7 @@ void InitMenuItems() mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.ptszName = LPGENT("Zip and upload folder");
+ mi2.name.t = LPGENT("Zip and upload folder");
tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFOLDER);
@@ -160,7 +160,7 @@ void InitMenuItems() mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
- mi.ptszName = LPGENT("FTP File manager");
+ mi.name.t = LPGENT("FTP File manager");
mi.pszService = MS_FTPFILE_SHOWMANAGER;
mi.hParentMenu = hMainMenu;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index ae7188e548..cb0889af43 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -176,8 +176,8 @@ static int OnModulesLoaded(WPARAM wparam, LPARAM lparam) CLISTMENUITEM mi = { 0 };
mi.position = 200011;
- mi.hIcon = hIcons[ICON_MAIN];
- mi.pszName = LPGEN("File As Message...");
+ mi.icolibItem = hIcons[ICON_MAIN];
+ mi.name.a = LPGEN("File As Message...");
mi.pszService = SERVICE_NAME "/FESendFile";
mi.flags = CMIF_NOTOFFLINE;
Menu_AddContactMenuItem(&mi);
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 36047e19f3..22a9c99a75 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -719,16 +719,16 @@ static void LoadMenus() CLISTMENUITEM mi = { 0 };
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
- mi.ptszName = LPGENT("Remove thumb");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
+ mi.name.t = LPGENT("Remove thumb");
mi.pszService = MODULE "/RemoveThumb";
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
// Hide all thumbs main menu item
CreateServiceFunction(MODULE "/MainHideAllThumbs", OnMainMenu_HideAll);
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE));
- mi.ptszName = fcOpt.bHideAll ? LPGENT("Show all thumbs") : LPGENT("Hide all thumbs");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE));
+ mi.name.t = fcOpt.bHideAll ? LPGENT("Show all thumbs") : LPGENT("Hide all thumbs");
mi.pszService = MODULE "/MainHideAllThumbs";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/GmailNotifier/src/gmail.h b/plugins/GmailNotifier/src/gmail.h index 1c56a13e80..d6293e4436 100644 --- a/plugins/GmailNotifier/src/gmail.h +++ b/plugins/GmailNotifier/src/gmail.h @@ -25,7 +25,7 @@ #define WM_SHELLNOTIFY WM_USER+5
#define IDI_TRAY WM_USER+6
-#define pluginName "GmailMNotifier"
+#define MODULE_NAME "GmailMNotifier"
#define _MAX_DOWN_BUFFER 65536
#define LINK "https://accounts.google.com/ServiceLogin?continue=https%3A%2F%2Fmail.google.com%2Fmail&service=mail&passive=true&Email="
#define FORMDATA1 "<body onload=document.gmail.submit();><form name=gmail action=https://www.google.com/a/"
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 77480035dc..ca9ce6a3b5 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -51,7 +51,7 @@ INT_PTR GetStatus(WPARAM wParam, LPARAM lParam) INT_PTR GetName(WPARAM wParam, LPARAM lParam)
{
- mir_strncpy((char*)lParam, pluginName, wParam);
+ mir_strncpy((char*)lParam, MODULE_NAME, wParam);
return 0;
}
@@ -93,26 +93,26 @@ extern "C" int __declspec(dllexport) Load() HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser);
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
- pd.szName = pluginName;
+ pd.szName = MODULE_NAME;
pd.type = PROTOTYPE_VIRTUAL;
Proto_RegisterModule(&pd);
- CreateProtoServiceFunction(pluginName, PS_GETCAPS, GetCaps);
- CreateProtoServiceFunction(pluginName, PS_GETSTATUS, GetStatus);
- CreateProtoServiceFunction(pluginName, PS_GETNAME, GetName);
+ CreateProtoServiceFunction(MODULE_NAME, PS_GETCAPS, GetCaps);
+ CreateProtoServiceFunction(MODULE_NAME, PS_GETSTATUS, GetStatus);
+ CreateProtoServiceFunction(MODULE_NAME, PS_GETNAME, GetName);
CreateServiceFunction("GmailMNotifier/Notifying", Notifying);
- opt.circleTime = db_get_dw(NULL, pluginName, "circleTime", 30);
- opt.notifierOnTray = db_get_dw(NULL, pluginName, "notifierOnTray", TRUE);
- opt.notifierOnPop = db_get_dw(NULL, pluginName, "notifierOnPop", TRUE);
- opt.popupDuration = db_get_dw(NULL, pluginName, "popupDuration", -1);
- opt.popupBgColor = db_get_dw(NULL, pluginName, "popupBgColor", RGB(173, 206, 247));
- opt.popupTxtColor = db_get_dw(NULL, pluginName, "popupTxtColor", RGB(0, 0, 0));
- opt.OpenUsePrg = db_get_dw(NULL, pluginName, "OpenUsePrg", 0);
- opt.ShowCustomIcon = db_get_dw(NULL, pluginName, "ShowCustomIcon", FALSE);
- opt.UseOnline = db_get_dw(NULL, pluginName, "UseOnline", FALSE);
- opt.AutoLogin = db_get_dw(NULL, pluginName, "AutoLogin", TRUE);
- opt.LogThreads = db_get_dw(NULL, pluginName, "LogThreads", FALSE);
+ opt.circleTime = db_get_dw(NULL, MODULE_NAME, "circleTime", 30);
+ opt.notifierOnTray = db_get_dw(NULL, MODULE_NAME, "notifierOnTray", TRUE);
+ opt.notifierOnPop = db_get_dw(NULL, MODULE_NAME, "notifierOnPop", TRUE);
+ opt.popupDuration = db_get_dw(NULL, MODULE_NAME, "popupDuration", -1);
+ opt.popupBgColor = db_get_dw(NULL, MODULE_NAME, "popupBgColor", RGB(173, 206, 247));
+ opt.popupTxtColor = db_get_dw(NULL, MODULE_NAME, "popupTxtColor", RGB(0, 0, 0));
+ opt.OpenUsePrg = db_get_dw(NULL, MODULE_NAME, "OpenUsePrg", 0);
+ opt.ShowCustomIcon = db_get_dw(NULL, MODULE_NAME, "ShowCustomIcon", FALSE);
+ opt.UseOnline = db_get_dw(NULL, MODULE_NAME, "UseOnline", FALSE);
+ opt.AutoLogin = db_get_dw(NULL, MODULE_NAME, "AutoLogin", TRUE);
+ opt.LogThreads = db_get_dw(NULL, MODULE_NAME, "LogThreads", FALSE);
DBVARIANT dbv;
if (db_get_s(NULL, "Icons", "GmailMNotifier40076", &dbv)) {
@@ -126,23 +126,25 @@ extern "C" int __declspec(dllexport) Load() BuildList();
ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
for (int i = 0; i < acc_num; i++)
- db_set_dw(acc[i].hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_dw(acc[i].hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
hTimer = SetTimer(NULL, 0, opt.circleTime * 60000, TimerProc);
hMirandaStarted = HookEvent(ME_SYSTEM_MODULESLOADED, OnMirandaStart);
hOptionsInitial = HookEvent(ME_OPT_INITIALISE, OptInit);
- CreateServiceFunction("GmailMNotifier/MenuCommand", PluginMenuCommand);
+
+ CreateServiceFunction(MODULE_NAME "/MenuCommand", PluginMenuCommand);
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
- mi.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_ONLINE);
- mi.pszName = LPGEN("&Check all Gmail inboxes");
- mi.pszContactOwner = pluginName;
- mi.pszService = "GmailMNotifier/MenuCommand";
+ mi.icolibItem = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_ONLINE);
+ mi.name.a = LPGEN("&Check all Gmail inboxes");
+ mi.pszService = MODULE_NAME "/MenuCommand";
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("&Check Gmail inbox");
- Menu_AddContactMenuItem(&mi);
+
+ mi.name.a = LPGEN("&Check Gmail inbox");
+ mi.pszService = "/MenuCommand";
+ Menu_AddContactMenuItem(&mi, MODULE_NAME);
return 0;
}
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index e1aff5e67e..9ec7111750 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -3,7 +3,7 @@ int OpenBrowser(WPARAM hContact, LPARAM lParam)
{
char *proto = GetContactProto(hContact);
- if (proto && !mir_strcmp(proto, pluginName)) {
+ if (proto && !mir_strcmp(proto, MODULE_NAME)) {
Account *curAcc = GetAccountByContact(hContact);
PUDeletePopup(curAcc->popUpHwnd);
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
@@ -11,7 +11,7 @@ int OpenBrowser(WPARAM hContact, LPARAM lParam) return FALSE;
if (curAcc->oldResults_num != 0) {
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
curAcc->oldResults_num = 0;
DeleteResults(curAcc->results.next);
curAcc->results.next = NULL;
@@ -61,21 +61,21 @@ void NotifyUser(Account *curAcc) PUDeletePopup(curAcc->popUpHwnd);
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
if (curAcc->oldResults_num != 0)
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
break;
case -1:
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_AWAY);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_AWAY);
break;
default:
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_OCCUPIED);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_OCCUPIED);
int newMails = (curAcc->oldResults_num == -1) ? (curAcc->results_num) : (curAcc->results_num - curAcc->oldResults_num);
if (opt.LogThreads&&newMails > 0) {
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_READ;
- dbei.szModule = pluginName;
+ dbei.szModule = MODULE_NAME;
dbei.timestamp = time(NULL);
resultLink *prst = curAcc->results.next;
@@ -91,7 +91,7 @@ void NotifyUser(Account *curAcc) cle.hContact = curAcc->hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_URGENT;
- cle.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_OCCUPIED);
+ cle.hIcon = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_OCCUPIED);
cle.pszService = "GmailMNotifier/Notifying";
cle.pszTooltip = curAcc->results.next->content;
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
@@ -102,7 +102,7 @@ void NotifyUser(Account *curAcc) POPUPDATA ppd = { 0 };
ppd.lchContact = curAcc->hContact;
- ppd.lchIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_OCCUPIED);
+ ppd.lchIcon = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_OCCUPIED);
mir_strcpy(ppd.lpzContactName, curAcc->results.content);
resultLink *prst = curAcc->results.next;
for (int i = 0; i < 5 && i < newMails; i++) {
diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp index f329cbf2e0..652a674981 100644 --- a/plugins/GmailNotifier/src/options.cpp +++ b/plugins/GmailNotifier/src/options.cpp @@ -8,10 +8,10 @@ static void SaveButton(HWND hwndDlg,HWND hwndCombo, int curIndex) { SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0);
SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LPARAM)acc[curIndex].name);
SendMessageA(hwndCombo, CB_SETCURSEL, curIndex, 0);
- db_set_s(acc[curIndex].hContact, pluginName, "name", acc[curIndex].name);
- db_set_s(acc[curIndex].hContact, pluginName, "Nick", acc[curIndex].name);
+ db_set_s(acc[curIndex].hContact, MODULE_NAME, "name", acc[curIndex].name);
+ db_set_s(acc[curIndex].hContact, MODULE_NAME, "Nick", acc[curIndex].name);
GetDlgItemTextA(hwndDlg, IDC_PASS, acc[curIndex].pass, _countof(acc[curIndex].pass));
- db_set_s(acc[curIndex].hContact, pluginName, "Password", acc[curIndex].pass);
+ db_set_s(acc[curIndex].hContact, MODULE_NAME, "Password", acc[curIndex].pass);
}
}
static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
{
DBVARIANT dbv;
- if (!db_get_s(NULL, pluginName, "OpenUsePrgPath", &dbv)) {
+ if (!db_get_s(NULL, MODULE_NAME, "OpenUsePrgPath", &dbv)) {
mir_strcpy(str, dbv.pszVal);
db_free(&dbv);
}
@@ -150,7 +150,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetDlgItemTextA(hwndDlg, IDC_PASS, "");
SetFocus(hwndCombo);
acc[curIndex].hContact = CallService(MS_DB_CONTACT_ADD, 0, 0);
- Proto_AddToContact(acc[curIndex].hContact, pluginName);
+ Proto_AddToContact(acc[curIndex].hContact, MODULE_NAME);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -202,20 +202,20 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (opt.circleTime > 0) {
KillTimer(NULL, hTimer);
hTimer = SetTimer(NULL, 0, opt.circleTime * 60000, TimerProc);
- db_set_dw(NULL, pluginName, "circleTime", opt.circleTime);
+ db_set_dw(NULL, MODULE_NAME, "circleTime", opt.circleTime);
}
opt.notifierOnTray = IsDlgButtonChecked(hwndDlg, IDC_OPTTRAY);
opt.notifierOnPop = IsDlgButtonChecked(hwndDlg, IDC_OPTPOP);
- db_set_dw(NULL, pluginName, "notifierOnTray", opt.notifierOnTray);
- db_set_dw(NULL, pluginName, "notifierOnPop", opt.notifierOnPop);
+ db_set_dw(NULL, MODULE_NAME, "notifierOnTray", opt.notifierOnTray);
+ db_set_dw(NULL, MODULE_NAME, "notifierOnPop", opt.notifierOnPop);
opt.popupDuration = GetDlgItemInt(hwndDlg, IDC_DURATION, NULL, TRUE);
- db_set_dw(NULL, pluginName, "popupDuration", opt.popupDuration);
+ db_set_dw(NULL, MODULE_NAME, "popupDuration", opt.popupDuration);
opt.popupBgColor = SendDlgItemMessage(hwndDlg, IDC_BGCOLOR, CPM_GETCOLOUR, 0, opt.popupBgColor);
opt.popupTxtColor = SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOR, CPM_GETCOLOUR, 0, opt.popupBgColor);
- db_set_dw(NULL, pluginName, "popupBgColor", opt.popupBgColor);
- db_set_dw(NULL, pluginName, "popupTxtColor", opt.popupTxtColor);
+ db_set_dw(NULL, MODULE_NAME, "popupBgColor", opt.popupBgColor);
+ db_set_dw(NULL, MODULE_NAME, "popupTxtColor", opt.popupTxtColor);
if (IsDlgButtonChecked(hwndDlg, IDC_SYSDEF) == BST_CHECKED)
opt.OpenUsePrg = 0;
@@ -226,8 +226,8 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
GetDlgItemTextA(hwndDlg, IDC_PRG, str, _countof(str));
- db_set_dw(NULL, pluginName, "OpenUsePrg", opt.OpenUsePrg);
- db_set_s(NULL, pluginName, "OpenUsePrgPath", str);
+ db_set_dw(NULL, MODULE_NAME, "OpenUsePrg", opt.OpenUsePrg);
+ db_set_s(NULL, MODULE_NAME, "OpenUsePrgPath", str);
opt.ShowCustomIcon = IsDlgButtonChecked(hwndDlg, IDC_SHOWICON);
opt.UseOnline = IsDlgButtonChecked(hwndDlg, IDC_ONLINE);
@@ -238,14 +238,14 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA else if (IsDlgButtonChecked(hwndDlg, IDC_AUTOLOGIN) == BST_INDETERMINATE)
opt.AutoLogin = 2;
opt.LogThreads = IsDlgButtonChecked(hwndDlg, IDC_LOGTHREADS);
- db_set_dw(NULL, pluginName, "ShowCustomIcon", opt.ShowCustomIcon);
- db_set_dw(NULL, pluginName, "UseOnline", opt.UseOnline);
- db_set_dw(NULL, pluginName, "AutoLogin", opt.AutoLogin);
- db_set_dw(NULL, pluginName, "LogThreads", opt.LogThreads);
+ db_set_dw(NULL, MODULE_NAME, "ShowCustomIcon", opt.ShowCustomIcon);
+ db_set_dw(NULL, MODULE_NAME, "UseOnline", opt.UseOnline);
+ db_set_dw(NULL, MODULE_NAME, "AutoLogin", opt.AutoLogin);
+ db_set_dw(NULL, MODULE_NAME, "LogThreads", opt.LogThreads);
ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
for (int i = 0; i < acc_num; i++)
- db_set_w(acc[i].hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_w(acc[i].hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
}
return TRUE;
diff --git a/plugins/GmailNotifier/src/utility.cpp b/plugins/GmailNotifier/src/utility.cpp index 0cd72e28a6..8e91d5d8ed 100644 --- a/plugins/GmailNotifier/src/utility.cpp +++ b/plugins/GmailNotifier/src/utility.cpp @@ -5,8 +5,8 @@ void BuildList(void) DBVARIANT dbv;
acc_num = 0;
- for (MCONTACT hContact = db_find_first(pluginName); hContact; hContact = db_find_next(hContact, pluginName)) {
- if (!db_get_s(hContact, pluginName, "name", &dbv)) {
+ for (MCONTACT hContact = db_find_first(MODULE_NAME); hContact; hContact = db_find_next(hContact, MODULE_NAME)) {
+ if (!db_get_s(hContact, MODULE_NAME, "name", &dbv)) {
acc_num++;
acc = (Account *)realloc(acc, acc_num * sizeof(Account));
memset(&acc[acc_num-1], 0, sizeof(Account));
@@ -15,7 +15,7 @@ void BuildList(void) CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_free(&dbv);
- if (!db_get_s(hContact, pluginName, "Password", &dbv)) {
+ if (!db_get_s(hContact, MODULE_NAME, "Password", &dbv)) {
mir_strcpy(acc[acc_num-1].pass, dbv.pszVal);
db_free(&dbv);
}
@@ -42,7 +42,7 @@ BOOL GetBrowser(char *str) strKey = strIE;
else if (opt.OpenUsePrg == 0)
strKey = strDefault;
- else if (!db_get_s(NULL, pluginName, "OpenUsePrgPath", &dbv)) {
+ else if (!db_get_s(NULL, MODULE_NAME, "OpenUsePrgPath", &dbv)) {
mir_strcpy(str, dbv.pszVal);
db_free(&dbv);
return FALSE;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 0e98449539..07049a8ec2 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -1445,7 +1445,8 @@ void ShowPopupWindow(const char * pszName, const char * pszText, COLORREF ColorB // Developer : KN
/////////////////////////////////////////////////////////////////////
-void InitGuiElements() {
+void InitGuiElements()
+{
INITCOMMONCONTROLSEX stInitCom;
stInitCom.dwSize = sizeof(INITCOMMONCONTROLSEX);
stInitCom.dwICC = ICC_INTERNET_CLASSES;
@@ -1454,60 +1455,34 @@ void InitGuiElements() { //hMainThread = GetCurrentThread();
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
-
sUrlAddress = DBGetString(NULL, MODULE, "UrlAddress", szDefaultUrlAddress);
sPageKeyword = DBGetString(NULL, MODULE, "PageKeyword", szDefaultPageKeyword);
hShareNewFileService = CreateServiceFunction(MS_SHARE_NEW_FILE, nShareNewFile);
- if (! hShareNewFileService) {
- MessageBox(NULL, TranslateT("Failed to CreateServiceFunction MS_SHARE_NEW_FILE"), MSG_BOX_TITEL, MB_OK);
- return;
- }
-
hShowStatisticsViewService = CreateServiceFunction(MS_SHOW_STATISTICS_VIEW, nShowStatisticsView);
- if (! hShowStatisticsViewService) {
- MessageBox(NULL, TranslateT("Failed to CreateServiceFunction MS_SHOW_STATISTICS_VIEW"), MSG_BOX_TITEL, MB_OK);
- return;
- }
- CLISTMENUITEM mi;
- memset(&mi, 0, sizeof(mi));
- mi.pszContactOwner = NULL; //all contacts
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
+ CLISTMENUITEM mi = { 0 };
+ mi.icolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = -2000019955;
- mi.ptszName = LPGENT("HTTP Share new file");
+ mi.name.t = LPGENT("HTTP Share new file");
mi.pszService = MS_SHARE_NEW_FILE;
-
hShareNewFileMenuItem = Menu_AddContactMenuItem(&mi);
- if (!hShareNewFileMenuItem) {
- MessageBox(NULL, TranslateT("Failed to add contact menu item"), MSG_BOX_TITEL, MB_OK);
- return;
- }
-
if (db_get_b(NULL, MODULE, "AddStatisticsMenuItem", 1) != 0) {
mi.position = 1000085005;
mi.flags = CMIF_TCHAR;
- //mi.hIcon=LoadIcon(hInstance,MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
- mi.pszContactOwner = NULL;
- mi.ptszName = LPGENT("Show HTTP server statistics");
+ mi.name.t = LPGENT("Show HTTP server statistics");
mi.pszService = MS_SHOW_STATISTICS_VIEW;
hShowStatisticsViewMenuItem = Menu_AddMainMenuItem(&mi);
}
-
hEventOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
if (!hEventOptionsInitialize)
MessageBox(NULL, _T("Failed to HookEvent ME_OPT_INITIALISE"), MSG_BOX_TITEL, MB_OK);
bShowPopups = db_get_b(NULL, MODULE, "ShowPopups", bShowPopups) != 0;
- /*
- #ifdef _DEBUG
- nShowStatisticsView(0,0);
- #endif*/
}
-
/////////////////////////////////////////////////////////////////////
// Member Function : UninitGuiElements
// Type : Global
@@ -1521,6 +1496,7 @@ void InitGuiElements() { // Developer : KN
/////////////////////////////////////////////////////////////////////
-void UnInitGuiElements() {
+void UnInitGuiElements()
+{
CloseHandle(hMainThread);
}
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index a885f8fe9f..0363d91c42 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -923,10 +923,9 @@ extern "C" __declspec(dllexport) int Load() if (db_get_b(NULL, MODULE, "AddAcceptConMenuItem", 1)) {
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.pszContactOwner = NULL; //all contacts
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
+ mi.icolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = 1000085000;
- mi.pszName = LPGENT("Enable HTTP server");
+ mi.name.a = LPGENT("Enable HTTP server");
mi.pszService = MS_HTTP_ACCEPT_CONNECTIONS;
hAcceptConnectionsMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 630b8d68ef..02e5bf8837 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -60,8 +60,8 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
- mi.ptszName = LPGENT("&Create Linklist");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
+ mi.name.t = LPGENT("&Create Linklist");
mi.pszService = "Linklist/MenuCommand";
Menu_AddContactMenuItem(&mi);
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 7c344b2738..077bdc8c1d 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -16,25 +16,24 @@ namespace mu {
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
- mi.ptszName = (TCHAR*)pszName;
+ mi.name.t = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
- mi.hIcon = hIcon;
+ mi.icolibItem = hIcon;
mi.pszService = const_cast<char*>(pszService);
mi.hParentMenu = hRoot;
return Menu_AddMainMenuItem(&mi);
}
- HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner /* = NULL */)
+ HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService)
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
- mi.ptszName = (TCHAR*)pszName;
+ mi.name.t = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
- mi.hIcon = hIcon;
+ mi.icolibItem = hIcon;
mi.pszService = const_cast<char*>(pszService);
- mi.pszContactOwner = const_cast<char*>(pszContactOwner);
return Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index 9e1bf12eae..0f760cfcfe 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -14,7 +14,7 @@ namespace mu namespace clist
{
HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = 0);
- HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner = NULL);
+ HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService);
const TCHAR* getContactDisplayName(MCONTACT hContact);
const TCHAR* getStatusModeDescription(int nStatusMode);
}
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp index b7d5222cd5..78c6b1c537 100644 --- a/plugins/IEHistory/src/IEHistory.cpp +++ b/plugins/IEHistory/src/IEHistory.cpp @@ -75,16 +75,17 @@ extern "C" int __declspec(dllexport) Load(void) InitServices(); /// menu items - CLISTMENUITEM menuItem = { 0 }; - menuItem.ptszName = LPGENT("View &history"); - menuItem.flags = CMIF_TCHAR; - menuItem.position = 1000090000; - menuItem.hIcon = hIcon; - menuItem.pszService = MS_HISTORY_SHOWCONTACTHISTORY; - Menu_AddContactMenuItem(&menuItem); + CLISTMENUITEM mi = { 0 }; + mi.name.t = LPGENT("View &history"); + mi.flags = CMIF_TCHAR; + mi.position = 1000090000; + mi.icolibItem = hIcon; + mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY; + Menu_AddContactMenuItem(&mi); + /// @todo (White-Tiger#1#08/19/14): fully implement System History someday^^ - menuItem.ptszName = LPGENT("&System History"); - Menu_AddMainMenuItem(&menuItem); + mi.name.t = LPGENT("&System History"); + Menu_AddMainMenuItem(&mi); HookEvents(); return 0; diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 1925a1bcf5..077367fa98 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -116,7 +116,7 @@ extern "C" __declspec(dllexport) int Load(void) // menu item
CLISTMENUITEM mi = { 0 };
mi.icolibItem = GetIconHandle(IDI_IMPORT);
- mi.pszName = LPGEN("&Import...");
+ mi.name.a = LPGEN("&Import...");
mi.position = 500050000;
mi.pszService = IMPORT_SERVICE;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index c37f1de785..76de84c315 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -197,7 +197,7 @@ void RebuildMenu() mi.hParentMenu = hMainMenuGroup;
mi.position = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
- mi.ptszName = text;
+ mi.name.t = text;
mi.flags = CMIF_TCHAR
| (ListeningToEnabled(info->proto, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -295,7 +295,7 @@ int ModulesLoaded(WPARAM, LPARAM) // Add main menu item
CLISTMENUITEM mi = { 0 };
mi.position = 500080000;
- mi.ptszName = LPGENT("Listening to");
+ mi.name.t = LPGENT("Listening to");
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
hMainMenuGroup = Menu_AddMainMenuItem(&mi);
@@ -304,10 +304,10 @@ int ModulesLoaded(WPARAM, LPARAM) // mi.popupPosition = 500080000; !!!!!!!!!!!!!!!
mi.position = 0;
mi.pszService = MS_LISTENINGTO_MAINMENU;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
// Add all protos
- mi.ptszName = LPGENT("Send to all protocols");
+ mi.name.t = LPGENT("Send to all protocols");
mi.flags = CMIF_TCHAR
| (ListeningToEnabled(NULL, true) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 6ae5ed72e9..9ecaec708c 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1730,8 +1730,8 @@ extern "C" int __declspec(dllexport) Load(void) CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF; //on top menu position
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
- mi.ptszName = LPGENT("&Check Lotus");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
+ mi.name.t = LPGENT("&Check Lotus");
mi.pszService = "LotusNotify/MenuCommand"; //service name thet listning for menu call
hMenuHandle = Menu_AddMainMenuItem(&mi); //create menu pos.
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 55a3e2782c..bf686a5028 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -738,8 +738,8 @@ static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD fl CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
mi.position = pos;
- mi.ptszName = name;
- mi.hIcon = icon;
+ mi.name.t = name;
+ mi.icolibItem = icon;
mi.flags = CMIF_UNICODE | flag;
mi.pszService = service;
@@ -964,24 +964,24 @@ static int PluginInit(WPARAM, LPARAM) mi.flags = CMIF_UNICODE;
mi.position = 120000;
- mi.ptszName = LPGENT("Always visible");
+ mi.name.t = LPGENT("Always visible");
mi.pszService = MS_SETVIS;
hmenuVis = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Never visible");
+ mi.name.t = LPGENT("Never visible");
mi.pszService = MS_SETINVIS;
hmenuOff = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Hide from list");
+ mi.name.t = LPGENT("Hide from list");
mi.pszService = MS_HIDE;
hmenuHide = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Ignore");
+ mi.name.t = LPGENT("Ignore");
mi.pszService = 0;
- mi.hIcon = IcoLib_GetIcon("miex_ignore");
+ mi.icolibItem = IcoLib_GetIcon("miex_ignore");
hmenuIgnore = Menu_AddContactMenuItem(&mi);
hIgnoreItem[0] = AddSubmenuItem(hmenuIgnore, ii[0].name, Skin_LoadIcon(ii[0].icon), 0, MS_IGNORE, pos, ii[0].type);
@@ -996,9 +996,9 @@ static int PluginInit(WPARAM, LPARAM) AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), IcoLib_GetIcon("miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood);
mi.position++;
- mi.ptszName = LPGENT("Copy to Account");
+ mi.name.t = LPGENT("Copy to Account");
mi.pszService = MS_PROTO;
- mi.hIcon = IcoLib_GetIcon("miex_protocol");
+ mi.icolibItem = IcoLib_GetIcon("miex_protocol");
hmenuProto = Menu_AddContactMenuItem(&mi);
EnumProtoSubmenu(0, 0);
@@ -1006,41 +1006,41 @@ static int PluginInit(WPARAM, LPARAM) mi.flags = CMIF_UNICODE;
mi.position++;
- mi.ptszName = LPGENT("Send 'You were added'");
+ mi.name.t = LPGENT("Send 'You were added'");
mi.pszService = MS_ADDED;
- mi.hIcon = Skin_LoadIcon(SKINICON_AUTH_ADD);
+ mi.icolibItem = Skin_LoadIcon(SKINICON_AUTH_ADD);
hmenuAdded = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Request authorization");
+ mi.name.t = LPGENT("Request authorization");
mi.pszService = MS_AUTHREQ;
- mi.hIcon = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
hmenuAuthReq = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy ID");
+ mi.name.t = LPGENT("Copy ID");
mi.pszService = MS_COPYID;
hmenuCopyID = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Browse Received Files");
+ mi.name.t = LPGENT("Browse Received Files");
mi.pszService = MS_RECVFILES;
- mi.hIcon = IcoLib_GetIcon("miex_recfiles");
+ mi.icolibItem = IcoLib_GetIcon("miex_recfiles");
hmenuRecvFiles = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy Status Message");
+ mi.name.t = LPGENT("Copy Status Message");
mi.pszService = MS_STATUSMSG;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
hmenuStatusMsg = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy IP");
+ mi.name.t = LPGENT("Copy IP");
mi.pszService = MS_COPYIP;
hmenuCopyIP = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy MirVer");
+ mi.name.t = LPGENT("Copy MirVer");
mi.pszService = MS_COPYMIRVER;
hmenuCopyMirVer = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index d40922b0f6..184b563265 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -15,7 +15,7 @@ static CLISTMENUITEM* MakeMenuItem(lua_State *L) lua_pushstring(L, "Name");
lua_gettable(L, -2);
- pmi->ptszName = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
+ pmi->name.t = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_pushstring(L, "Position");
@@ -101,7 +101,7 @@ static int lua_ModifyMenuItem(lua_State *L) mir_ptr<CLISTMENUITEM> pmi(MakeMenuItem(L));
- INT_PTR res = ::Menu_ModifyItem(hMenuItem, pmi->ptszName, pmi->hIcon, pmi->flags);
+ INT_PTR res = ::Menu_ModifyItem(hMenuItem, pmi->name.t, pmi->icolibItem, pmi->flags);
lua_pushinteger(L, res);
return 1;
}
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index a7657a247c..2bd606c90e 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -162,13 +162,13 @@ void InitMenu() mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR; mi.position = -400000; - mi.ptszName = _T(LANG_STOP_OTR); + mi.name.t = _T(LANG_STOP_OTR); mi.pszService = MS_OTR_MENUSTOP; mi.icolibItem = IcoLib_GetIconHandle(ICON_PRIVATE); hStopItem = Menu_AddContactMenuItem(&mi); - mi.ptszName = _T(LANG_START_OTR); + mi.name.t = _T(LANG_START_OTR); mi.pszService = MS_OTR_MENUSTART; mi.icolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE); diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 7a0b2e571d..e8ccc6572c 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -115,9 +115,9 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) if (!bReplaceHistory)
{
CLISTMENUITEM mi = { 0 };
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
+ mi.icolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
mi.position = 1000090100;
- mi.pszName = LPGEN("Open E&xported History");
+ mi.name.a = LPGEN("Open E&xported History");
mi.pszService = MS_SHOW_EXPORT_HISTORY;
hOpenHistoryMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 3345092557..0f507c95fd 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -331,8 +331,8 @@ int CreateFrame() mi.flags = CMIF_TCHAR;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("My details"), 500010000);
mi.position = 1;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
- mi.ptszName = LPGENT("Show my details");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
+ mi.name.t = LPGENT("Show my details");
mi.pszService = MODULE_NAME"/ShowHideMyDetails";
hMenuShowHideFrame = Menu_AddMainMenuItem(&mi);
Menu_ConfigureItem(hMenuShowHideFrame, MCI_OPT_EXECPARAM, -0x7FFFFFFF);
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index 974b57a644..0182ea778f 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -91,7 +91,7 @@ static int MainInit(WPARAM, LPARAM) mi.position = 500050000;
mi.flags = CMIF_TCHAR;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
- mi.ptszName = LPGENT("My details");
+ mi.name.t = LPGENT("My details");
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.flags = CMIF_TCHAR;
@@ -100,27 +100,27 @@ static int MainInit(WPARAM, LPARAM) if (protocols->CanSetAvatars()) {
mi.position = 100001;
- mi.ptszName = LPGENT("Set my avatar...");
+ mi.name.t = LPGENT("Set my avatar...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYAVATARUI, Menu_SetMyAvatarUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYAVATARUI;
Menu_AddMainMenuItem(&mi);
}
mi.position = 100002;
- mi.ptszName = LPGENT("Set my nickname...");
+ mi.name.t = LPGENT("Set my nickname...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYNICKNAMEUI, Menu_SetMyNicknameUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYNICKNAMEUI;
Menu_AddMainMenuItem(&mi);
mi.position = 100003;
- mi.ptszName = LPGENT("Set my status message...");
+ mi.name.t = LPGENT("Set my status message...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI, Menu_SetMyStatusMessageUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI;
Menu_AddMainMenuItem(&mi);
// Set protocols to show frame
mi.position = 200001;
- mi.ptszName = LPGENT("Show next account");
+ mi.name.t = LPGENT("Show next account");
mi.pszService = MS_MYDETAILS_SHOWNEXTPROTOCOL;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 72c63abb58..7c22280e2d 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -615,31 +615,31 @@ int MirandaLoaded(WPARAM, LPARAM) mi.position = 1000020000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.icolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
- mi.ptszName = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
+ mi.name.t = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
mi.pszService = MS_AWAYSYS_AUTOREPLY_TOGGLE;
g_hToggleSOEMenuItem = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position = -2000005000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
- mi.ptszName = LPGENT("Read status message"); // never seen...
+ mi.name.t = LPGENT("Read status message"); // never seen...
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
g_hReadStatMenuItem = Menu_AddContactMenuItem(&mi);
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USEMENUITEM)) {
memset(&mi, 0, sizeof(mi));
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
- mi.ptszName = LPGENT("Set status message"); // will never be shown
+ mi.name.t = LPGENT("Set status message"); // will never be shown
mi.position = 1000020000;
- mi.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MSGICON));
+ mi.icolibItem = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MSGICON));
mi.pszService = MS_AWAYSYS_SETCONTACTSTATMSG;
g_hContactMenuItem = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.flags = CMIF_TCHAR;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.position = 1000020000;
- mi.ptszName = LPGENT("Autoreply");
+ mi.name.t = LPGENT("Autoreply");
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_TCHAR;
@@ -647,17 +647,17 @@ int MirandaLoaded(WPARAM, LPARAM) mi.position = 1000020000;
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("On");
+ mi.name.t = LPGENT("On");
mi.pszService = MS_AWAYSYS_AUTOREPLY_ON;
g_hAutoreplyOnContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.icolibItem = iconList[0].hIcolib;
- mi.ptszName = LPGENT("Off");
+ mi.name.t = LPGENT("Off");
mi.pszService = MS_AWAYSYS_AUTOREPLY_OFF;
g_hAutoreplyOffContactMenuItem = Menu_AddContactMenuItem(&mi);
- mi.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT));
- mi.ptszName = LPGENT("Use the default setting");
+ mi.icolibItem = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT));
+ mi.name.t = LPGENT("Use the default setting");
mi.pszService = MS_AWAYSYS_AUTOREPLY_USEDEFAULT;
g_hAutoreplyUseDefaultContactMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp index 34e2fa4b4b..26cd6248b1 100644 --- a/plugins/NewEventNotify/src/menuitem.cpp +++ b/plugins/NewEventNotify/src/menuitem.cpp @@ -53,7 +53,7 @@ int MenuitemInit(BOOL bStatus) CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.position = 1;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
mi.pszService = MS_NEN_MENUNOTIFY;
mi.flags = 0;
hMenuitemNotify = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index 3a97c32aae..d4bfdbefae 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -180,40 +180,40 @@ extern "C" int __declspec(dllexport) Load() CLISTMENUITEM mi = { 0 };
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Load GPG public key");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Load GPG public key");
mi.pszService="/LoadPubKey";
hLoadPubKey = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Toggle GPG encryption");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Toggle GPG encryption");
mi.pszService="/ToggleEncryption";
hToggleEncryption = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFd;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Send public key");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Send public key");
mi.pszService="/SendKey";
hSendKey = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Export GPG Public keys");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Export GPG Public keys");
mi.pszService="/ExportGPGKeys";
hExportGpgKeys = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Import GPG Public keys");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Import GPG Public keys");
mi.pszService="/ImportGPGKeys";
hImportGpgKeys = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp index 1748792c4e..97a8d72adc 100644 --- a/plugins/NewsAggregator/Src/Menus.cpp +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -24,52 +24,52 @@ HGENMENU hService2[7]; void InitMenu()
{
CLISTMENUITEM mi = { 0 };
- mi.pszContactOwner = MODULE;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("News Aggregator"), 500099000);
mi.position = 10100001;
if (db_get_b(NULL, MODULE, "AutoUpdate", 1))
- mi.ptszName = LPGENT("Auto Update Enabled");
+ mi.name.t = LPGENT("Auto Update Enabled");
else
- mi.ptszName = LPGENT("Auto Update Disabled");
+ mi.name.t = LPGENT("Auto Update Disabled");
mi.icolibItem = GetIconHandle("main");
mi.pszService = MS_NEWSAGGREGATOR_ENABLED;
hService2[0] = Menu_AddMainMenuItem(&mi);
mi.position = 20100001;
- mi.ptszName = LPGENT("Check All Feeds");
+ mi.name.t = LPGENT("Check All Feeds");
mi.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
hService2[1] = Menu_AddMainMenuItem(&mi);
mi.position = 20100002;
mi.icolibItem = GetIconHandle("addfeed");
- mi.ptszName = LPGENT("Add Feed");
+ mi.name.t = LPGENT("Add Feed");
mi.pszService = MS_NEWSAGGREGATOR_ADDFEED;
hService2[2] = Menu_AddMainMenuItem(&mi);
mi.position = 20100003;
mi.icolibItem = GetIconHandle("importfeeds");
- mi.ptszName = LPGENT("Import Feeds");
+ mi.name.t = LPGENT("Import Feeds");
mi.pszService = MS_NEWSAGGREGATOR_IMPORTFEEDS;
hService2[3] = Menu_AddMainMenuItem(&mi);
mi.position = 20100004;
mi.icolibItem = GetIconHandle("exportfeeds");
- mi.ptszName = LPGENT("Export Feeds");
+ mi.name.t = LPGENT("Export Feeds");
mi.pszService = MS_NEWSAGGREGATOR_EXPORTFEEDS;
hService2[4] = Menu_AddMainMenuItem(&mi);
// adding contact menu items
+ mi.hParentMenu = NULL;
mi.position = -0x7FFFFFFA;
mi.icolibItem = GetIconHandle("checkfeed");
- mi.ptszName = LPGENT("Check feed");
+ mi.name.t = LPGENT("Check feed");
mi.pszService = MS_NEWSAGGREGATOR_CHECKFEED;
- hService2[5] = Menu_AddContactMenuItem(&mi);
+ hService2[5] = Menu_AddContactMenuItem(&mi, MODULE);
- mi.ptszName = LPGENT("Change feed");
+ mi.name.t = LPGENT("Change feed");
mi.pszService = MS_NEWSAGGREGATOR_CHANGEFEED;
- hService2[6] = Menu_AddContactMenuItem(&mi);
+ hService2[6] = Menu_AddContactMenuItem(&mi, MODULE);
Menu_ModifyItem(hService2[0], NULL, GetIconHandle(db_get_b(NULL, MODULE, "AutoUpdate", 1) ? "enabled" : "disabled"));
}
\ No newline at end of file diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index 73a1d70c2a..9fdbb1dba3 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -249,15 +249,15 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) mi.flags = CMIF_TCHAR;
mi.position = -300010;
- mi.ptszName = LPGENT("Disable History");
+ mi.name.t = LPGENT("Disable History");
mi.pszService = MS_NOHISTORY_TOGGLE;
- mi.hIcon = hIconRemove;
+ mi.icolibItem = hIconRemove;
hMenuToggle = Menu_AddContactMenuItem(&mi);
mi.position = -300005;
- mi.ptszName = LPGENT("Clear History");
+ mi.name.t = LPGENT("Clear History");
mi.pszService = MS_NOHISTORY_CLEAR;
- mi.hIcon = hIconClear;
+ mi.icolibItem = hIconClear;
hMenuClear = Menu_AddContactMenuItem(&mi);
// add icon to srmm status icons
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 4cdc4b3504..d3fb864733 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -144,38 +144,38 @@ extern "C" __declspec(dllexport) int Load() CLISTMENUITEM mi = { 0 };
mi.position = 600090000;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("&Non-IM Contact"), 600090000);
- mi.pszName = LPGEN("&Add Non-IM Contact");
+ mi.name.a = LPGEN("&Add Non-IM Contact");
mi.pszService = "AddLCcontact";
mi.icolibItem = icoList[0].hIcolib;
Menu_AddMainMenuItem(&mi);
mi.position = 600090001;
- mi.pszName = LPGEN("&View/Edit Files");
+ mi.name.a = LPGEN("&View/Edit Files");
mi.pszService = "LoadFilesDlg";
Menu_AddMainMenuItem(&mi);
if (db_get_b(NULL, MODNAME, "Beta", 0)) {
mi.position = 600090002;
- mi.pszName = LPGEN("&Export all Non-IM Contacts");
+ mi.name.a = LPGEN("&Export all Non-IM Contacts");
mi.pszService = "ExportLCcontacts";
Menu_AddMainMenuItem(&mi);
mi.position = 600090003;
- mi.pszName = LPGEN("&Import Non-IM Contacts");
+ mi.name.a = LPGEN("&Import Non-IM Contacts");
mi.pszService = "ImportLCcontacts";
Menu_AddMainMenuItem(&mi);
}
mi.position = 600090000;
- mi.pszName = LPGEN("&String Maker");
+ mi.name.a = LPGEN("&String Maker");
mi.pszService = "TestStringReplaceLine";
Menu_AddMainMenuItem(&mi);
+ mi.hParentMenu = NULL;
mi.position = -2000080000;
- mi.pszContactOwner = MODNAME;
- mi.pszName = LPGEN("E&dit Contact Settings");
+ mi.name.a = LPGEN("E&dit Contact Settings");
mi.pszService = "EditLCcontact";
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, MODNAME);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index b3654f4e39..7a0489fc49 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -189,56 +189,56 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam) mi.position = 1600000000;
mi.icolibItem = iconList[2].hIcolib;
- mi.ptszName = LPGENT("New &Note");
+ mi.name.t = LPGENT("New &Note");
mi.pszService = MODULENAME"/MenuCommandAddNew";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600000001;
mi.icolibItem = iconList[0].hIcolib;
- mi.ptszName = LPGENT("New &Reminder");
+ mi.name.t = LPGENT("New &Reminder");
mi.pszService = MODULENAME"/MenuCommandNewReminder";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100000;
mi.icolibItem = iconList[3].hIcolib;
- mi.ptszName = LPGENT("&Show / Hide Notes");
+ mi.name.t = LPGENT("&Show / Hide Notes");
mi.pszService = MODULENAME"/MenuCommandShowHide";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100001;
mi.icolibItem = iconList[13].hIcolib;
- mi.ptszName = LPGENT("Vie&w Notes");
+ mi.name.t = LPGENT("Vie&w Notes");
mi.pszService = MODULENAME"/MenuCommandViewNotes";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100002;
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("&Delete All Notes");
+ mi.name.t = LPGENT("&Delete All Notes");
mi.pszService = MODULENAME"/MenuCommandDeleteAll";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100003;
mi.icolibItem = iconList[11].hIcolib;
- mi.ptszName = LPGENT("&Bring All to Front");
+ mi.name.t = LPGENT("&Bring All to Front");
mi.pszService = MODULENAME"/MenuCommandBringAllFront";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600200000;
mi.icolibItem = iconList[6].hIcolib;
- mi.ptszName = LPGENT("&View Reminders");
+ mi.name.t = LPGENT("&View Reminders");
mi.pszService = MODULENAME"/MenuCommandViewReminders";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600200001;
mi.icolibItem = iconList[5].hIcolib;
- mi.ptszName = LPGENT("D&elete All Reminders");
+ mi.name.t = LPGENT("D&elete All Reminders");
mi.pszService = MODULENAME"/MenuCommandDeleteReminders";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 16aa865de1..0757e7a389 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -341,7 +341,7 @@ extern "C" int __declspec(dllexport) Load(void) mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -500050004;
mi.icolibItem = iconList[0].hIcolib;
- mi.ptszName = LPGENT("Send &Nudge");
+ mi.name.t = LPGENT("Send &Nudge");
mi.pszService = MS_NUDGE_SEND;
g_hContactMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index 7d7be76a58..f25d17ffad 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -101,7 +101,7 @@ extern "C" int __declspec(dllexport) Load() mi.position = 0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
- mi.ptszName = LPGENT("Open Folder");
+ mi.name.t = LPGENT("Open Folder");
mi.pszService = MS_OPENFOLDER_OPEN;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp index c84da5c676..80f6e60718 100644 --- a/plugins/PackUpdater/Src/PackUpdater.cpp +++ b/plugins/PackUpdater/Src/PackUpdater.cpp @@ -73,8 +73,8 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = IcoLib_GetIcon("check_update");
- mi.ptszName = LPGENT("Check for pack updates");
+ mi.icolibItem = IcoLib_GetIcon("check_update");
+ mi.name.t = LPGENT("Check for pack updates");
mi.pszService = MODNAME"/CheckUpdates";
Menu_AddMainMenuItem(&mi);
// Add empty updates folder menu item
@@ -82,8 +82,8 @@ extern "C" __declspec(dllexport) int Load(void) memset(&mi, 0, sizeof(mi));
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = IcoLib_GetIcon("empty_folder");
- mi.ptszName = LPGENT("Clear pack updates folder");
+ mi.icolibItem = IcoLib_GetIcon("empty_folder");
+ mi.name.t = LPGENT("Clear pack updates folder");
mi.pszService = MODNAME"/EmptyFolder";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index bd251a3ec4..6ba4cf795c 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -295,7 +295,7 @@ void InitMenuItems() mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
mi.position = 3000090005;
- mi.ptszName = LPGENT("Paste It");
+ mi.name.t = LPGENT("Paste It");
hContactMenu = Menu_AddContactMenuItem(&mi);
@@ -303,13 +303,13 @@ void InitMenuItems() mi.flags = CMIF_TCHAR;
mi.pszService = MS_PASTEIT_CONTACTMENU;
mi.hParentMenu = hContactMenu;
- mi.ptszName = LPGENT("Paste from clipboard");
+ mi.name.t = LPGENT("Paste from clipboard");
Menu_ConfigureItem(Menu_AddContactMenuItem(&mi), MCI_OPT_EXECPARAM, FROM_CLIPBOARD);
- mi.ptszName = LPGENT("Paste from file");
+ mi.name.t = LPGENT("Paste from file");
Menu_ConfigureItem(Menu_AddContactMenuItem(&mi), MCI_OPT_EXECPARAM, FROM_FILE);
- mi.ptszName = LPGENT("Default web page");
+ mi.name.t = LPGENT("Default web page");
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hDefWebMenu, MCI_OPT_EXECPARAM, DEF_PAGES_START - 1);
@@ -321,7 +321,7 @@ void InitMenuItems() mi2.flags = CMIF_TCHAR;
if (Options::instance->defWeb == i)
mi2.flags |= CMIF_CHECKED;
- mi2.ptszName = pasteToWebs[i]->GetName();
+ mi2.name.t = pasteToWebs[i]->GetName();
hWebPageMenus[i] = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(hWebPageMenus[i], MCI_OPT_EXECPARAM, mi2.position = DEF_PAGES_START + i);
}
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp index 263edf9656..4906dceeb4 100644 --- a/plugins/Ping/src/menu.cpp +++ b/plugins/Ping/src/menu.cpp @@ -11,14 +11,14 @@ void InitMenus() mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 500099900);
mi.position = 2000060000;
- mi.hIcon = hIconResponding;
- mi.ptszName = LPGENT("Enable all pings");
+ mi.icolibItem = hIconResponding;
+ mi.name.t = LPGENT("Enable all pings");
mi.pszService = PLUG "/EnableAll";
Menu_AddMainMenuItem(&mi);
mi.position = 2000060001;
- mi.hIcon = hIconDisabled;
- mi.ptszName = LPGENT("Disable all pings");
+ mi.icolibItem = hIconDisabled;
+ mi.name.t = LPGENT("Disable all pings");
mi.pszService = PLUG "/DisableAll";
Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index a8ec7c89e1..b4cd9b967f 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -995,7 +995,7 @@ void InitList() mi.flags = CMIF_TCHAR;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 1000200001);
mi.position = 3000320001;
- mi.ptszName = LPGENT("Show/Hide &Ping Window");
+ mi.name.t = LPGENT("Show/Hide &Ping Window");
mi.pszService = PLUG "/ShowWindow";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 9aceb57cb0..b482a634a6 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -91,7 +91,7 @@ extern "C" __declspec(dllexport) int Load(void) #else
mi.icolibItem = IcoLib_GetIconHandle("check_update");
#endif
- mi.pszName = LPGEN("Check for updates");
+ mi.name.a = LPGEN("Check for updates");
mi.pszService = MS_PU_CHECKUPDATES;
Menu_AddMainMenuItem(&mi);
@@ -100,7 +100,7 @@ extern "C" __declspec(dllexport) int Load(void) mi.position++;
mi.icolibItem = iconList[2].hIcolib;
- mi.pszName = LPGEN("Available components list");
+ mi.name.a = LPGEN("Available components list");
mi.pszService = MS_PU_SHOWLIST;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index ba6a9d21fc..0a2619e581 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -185,23 +185,23 @@ void InitMenuItems(void) // Build main menu
mi.position = -1000000000 /*1000001*/;
- mi.ptszName = LPGENT(MODULNAME_PLU);
- mi.hIcon = IcoLib_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
+ mi.name.t = LPGENT(MODULNAME_PLU);
+ mi.icolibItem = IcoLib_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
hMenuRoot = Menu_AddMainMenuItem(&mi);
// Add item to main menu
mi.hParentMenu = (HGENMENU)hMenuRoot;
CreateServiceFunction(MENUCOMMAND_SVC, svcEnableDisableMenuCommand);
- mi.ptszName = PopupOptions.ModuleIsEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups");
+ mi.name.t = PopupOptions.ModuleIsEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups");
mi.pszService = MENUCOMMAND_SVC;
hMenuItem = Menu_AddMainMenuItem(&mi);
// Popup History
CreateServiceFunction(MENUCOMMAND_HISTORY, svcShowHistory);
mi.position = 1000000000;
- mi.ptszName = LPGENT("Popup History");
- mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
+ mi.name.t = LPGENT("Popup History");
+ mi.icolibItem = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService = MENUCOMMAND_HISTORY;
hMenuItemHistory = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index 6679d13b15..50e0e8ad20 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -98,7 +98,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), -500200000);
for (int i = 0; i < _countof(iconList); i++) {
- mi.pszName = iconList[i].szDescr;
+ mi.name.a = iconList[i].szDescr;
mi.pszService = iconList[i].szName;
mi.icolibItem = iconList[i].hIcolib;
if (i == 3)
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 9f52e186bd..314ddb1740 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -187,7 +187,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { 0 };
mi.position = 500100001;
mi.flags = CMIF_TCHAR;
- mi.ptszName = LPGENT("Quick Contacts...");
+ mi.name.t = LPGENT("Quick Contacts...");
mi.pszService = MS_QC_SHOW_DIALOG;
Menu_AddMainMenuItem(&mi);
return 0;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 9dcc4a8618..0fa62f0270 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -87,7 +87,7 @@ namespace mi.flags = CMIF_TCHAR;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
- mi.ptszName = LPGENT("Enable/Disable Auto Update");
+ mi.name.t = LPGENT("Enable/Disable Auto Update");
mi.position = 10100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = g_pszAutoUpdateCmd;
@@ -95,28 +95,28 @@ namespace CreateServiceFunction(mi.pszService, QuotesMenu_EnableDisable);
UpdateMenu(g_bAutoUpdate);
- mi.ptszName = LPGENT("Refresh All Quotes\\Rates");
+ mi.name.t = LPGENT("Refresh All Quotes\\Rates");
mi.position = 20100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = "Quotes/RefreshAll";
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshAll);
- mi.ptszName = LPGENT("Currency Converter...");
+ mi.name.t = LPGENT("Currency Converter...");
mi.position = 20100002;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_CURRENCY_CONVERTER);
mi.pszService = g_pszCurrencyConverter;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_CurrencyConverter);
- mi.ptszName = LPGENT("Export All Quotes");
+ mi.name.t = LPGENT("Export All Quotes");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_EXPORT);
mi.pszService = "Quotes/ExportAll";
mi.position = 20100003;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_ExportAll);
- mi.ptszName = LPGENT("Import All Quotes");
+ mi.name.t = LPGENT("Import All Quotes");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_IMPORT);
mi.pszService = "Quotes/ImportAll";
mi.position = 20100004;
@@ -132,14 +132,14 @@ namespace else
mi.hParentMenu = NULL;
- mi.ptszName = LPGENT("Refresh");
+ mi.name.t = LPGENT("Refresh");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH);
mi.pszService = "Quotes/RefreshContact";
g_hMenuRefresh = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(g_hMenuRefresh, MCI_OPT_EXECPARAM, INT_PTR(0));
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshContact);
- mi.ptszName = LPGENT("Open Log File...");
+ mi.name.t = LPGENT("Open Log File...");
mi.icolibItem = NULL;
mi.pszService = "Quotes/OpenLogFile";
g_hMenuOpenLogFile = Menu_AddContactMenuItem(&mi);
@@ -147,7 +147,7 @@ namespace CreateServiceFunction(mi.pszService, QuotesMenu_OpenLogFile);
#ifdef CHART_IMPLEMENT
- mi.ptszName = LPGENT("Chart...");
+ mi.name.t = LPGENT("Chart...");
mi.popupPosition = 2;
mi.icolibItem = NULL;
mi.pszService = "Quotes/Chart";
@@ -155,7 +155,7 @@ namespace CreateServiceFunction(mi.pszService, QuotesMenu_Chart);
#endif
- mi.ptszName = LPGENT("Edit Settings...");
+ mi.name.t = LPGENT("Edit Settings...");
mi.icolibItem = NULL;
mi.pszService = "Quotes/EditSettings";
g_hMenuEditSettings = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index fdad9f0104..1b1fa73cbd 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -462,13 +462,13 @@ int Create_MenuitemShowList(void) {
CLISTMENUITEM mi = { 0 };
mi.icolibItem = icon.hIcolib;
- mi.pszName = msLastUC_ShowListName;
+ mi.name.a = msLastUC_ShowListName;
mi.pszService = msLastUC_ShowList;
Menu_AddMainMenuItem(&mi);
mi.position = 0xFFFFF;
mi.icolibItem = icon.hIcolib;
- mi.pszName = LPGEN("Toggle Ignore");
+ mi.name.a = LPGEN("Toggle Ignore");
mi.pszService = V_RECENTCONTACTS_TOGGLE_IGNORE;
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
return 0;
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index dde56c4f29..1cbeaf5b21 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -127,8 +127,8 @@ extern "C" int __declspec(dllexport) Load() CreateServiceFunction("RemovePersonalSettings/RemoveAll",RemoveAllService);
memset(&mi, 0, sizeof(mi));
mi.position = -0x7FFFFFFF;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.pszName = LPGEN("Remove Personal Settings...");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.a = LPGEN("Remove Personal Settings...");
mi.pszService="RemovePersonalSettings/RemoveAll";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp index 8d7d267b97..b29e34ca9b 100644 --- a/plugins/Restart/src/restart.cpp +++ b/plugins/Restart/src/restart.cpp @@ -49,7 +49,7 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.icolibItem = icon.hIcolib;
- mi.pszName = LPGEN("Restart");
+ mi.name.a = LPGEN("Restart");
mi.pszService = "System/RestartMe";
Menu_AddMainMenuItem(&mi);
Menu_AddTrayMenuItem(&mi);
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index b2d2d5f340..640a696925 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -30,15 +30,15 @@ int LoadModules(void) CLISTMENUITEM mi = { 0 };
mi.position = 300050000;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
- mi.ptszName = SMS_SEND_STR;
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
+ mi.name.t = SMS_SEND_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
Menu_AddMainMenuItem(&mi);
mi.position = -2000070000;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
- mi.ptszName = SMS_SEND_CM_STR;
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
+ mi.name.t = SMS_SEND_CM_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 017091d033..85362d0906 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -445,16 +445,16 @@ static int OnModulesLoaded(WPARAM, LPARAM) ReloadGlobals();
LoadGlobalIcons();
LoadMsgLogIcons();
- ModuleLoad(0, 0);
+ ModuleLoad(0, 0);
CLISTMENUITEM mi = { 0 };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = Skin_GetIconHandle( SKINICON_EVENT_MESSAGE );
- mi.pszName = LPGEN("&Message");
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
+ mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
- IcoLib_ReleaseIcon(mi.hIcon);
+ IcoLib_ReleaseIcon((HICON)mi.icolibItem);
HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileySettingsChanged);
HookEvent(ME_IEVIEW_OPTIONSCHANGED, SmileySettingsChanged);
@@ -548,7 +548,7 @@ int OnLoadModule(void) SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (new session)"));
SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing"));
SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
- SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);
@@ -566,11 +566,11 @@ int OnLoadModule(void) CREOleCallback reOleCallback;
CREOleCallback2 reOleCallback2;
-STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
-{
- if (IsEqualIID(riid, IID_IRichEditOleCallback)) {
- *ppvObj = this;
- AddRef();
+STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
+{
+ if (IsEqualIID(riid, IID_IRichEditOleCallback)) {
+ *ppvObj = this;
+ AddRef();
return S_OK;
}
*ppvObj = NULL;
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index e2980834c9..b3515a2d38 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -41,8 +41,8 @@ static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, i CLISTMENUITEM mi = { 0 };
mi.flags = flags | CMIF_HIDDEN;
mi.position = pos;
- mi.hIcon = hicon;
- mi.pszName = (char*)name;
+ mi.icolibItem = hicon;
+ mi.name.a = (char*)name;
mi.pszService = (char*)service;
return Menu_AddContactMenuItem(&mi);
}
@@ -52,7 +52,7 @@ static HGENMENU AddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, LPC CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_HIDDEN;
mi.position = pos;
- mi.pszName = (char*)name;
+ mi.name.a = (char*)name;
mi.hParentMenu = hRoot;
mi.pszService = (char*)service;
HGENMENU res = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 58d0c1818b..1bb5192552 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -72,12 +72,11 @@ void InitMenuitem() {
CreateServiceFunction("LastSeenUserDetails", MenuitemClicked);
- CLISTMENUITEM cmi = { 0 };
- cmi.position = -0x7FFFFFFF;
- cmi.flags = CMIF_TCHAR;
- cmi.ptszName = LPGENT("<none>");
- cmi.pszService = "LastSeenUserDetails";
- hmenuitem = Menu_AddContactMenuItem(&cmi);
+ CLISTMENUITEM mi = { 0 };
+ mi.position = -0x7FFFFFFF;
+ mi.name.a = LPGEN("Last seen");
+ mi.pszService = "LastSeenUserDetails";
+ hmenuitem = Menu_AddContactMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, BuildContactMenu);
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 1d7e4b25c5..82cb8e4cfa 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -274,11 +274,22 @@ DLL_EXPORT int Load(void) CLISTMENUITEM mi = { 0 }; mi.flags = CMIF_TCHAR; mi.icolibItem = GetIconHandle(ICO_MAINXS); - #define _Menu_AddMainMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddMainMenuItem(&mi);}while(0) - #define _Menu_AddContactMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddContactMenuItem(&mi);}while(0) - _Menu_AddMainMenuItemEx(LPGENT("Take a screenshot"),MS_SENDSS_OPENDIALOG,1000001); - _Menu_AddContactMenuItemEx(LPGENT("Send screenshot"),MS_SENDSS_OPENDIALOG,1000000); - _Menu_AddContactMenuItemEx(LPGENT("Send desktop screenshot"),MS_SENDSS_SENDDESKTOP,1000001); + + mi.name.t = LPGENT("Take a screenshot"); + mi.pszService = MS_SENDSS_OPENDIALOG; + mi.position = 1000001; + Menu_AddMainMenuItem(&mi); + + mi.name.t = LPGENT("Send screenshot"); + mi.pszService = MS_SENDSS_OPENDIALOG; + mi.position = 1000000; + Menu_AddContactMenuItem(&mi); + + mi.name.t = LPGENT("Send desktop screenshot"); + mi.pszService = MS_SENDSS_SENDDESKTOP; + mi.position = 1000001; + Menu_AddContactMenuItem(&mi); + /// hotkey's HOTKEYDESC hkd={sizeof(hkd)}; hkd.pszName="Open SendSS+"; diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 525e276465..69ee00a7ff 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -797,22 +797,22 @@ static int PluginInit(WPARAM, LPARAM) mi.position = 1000000000;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Sessions Manager"), 1000000000);
- mi.pszName = LPGEN("Save session...");
+ mi.name.a = LPGEN("Save session...");
mi.icolibItem = iconList[4].hIcolib;
mi.pszService = MS_SESSIONS_SAVEUSERSESSION;
hmSaveCurrentSession = Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Load session...");
+ mi.name.a = LPGEN("Load session...");
mi.pszService = MS_SESSIONS_OPENMANAGER;
mi.icolibItem = iconList[3].hIcolib;
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Close session");
+ mi.name.a = LPGEN("Close session");
mi.pszService = MS_SESSIONS_CLOSESESSION;
mi.icolibItem = 0;
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Load last session");
+ mi.name.a = LPGEN("Load last session");
mi.pszService = MS_SESSIONS_RESTORELASTSESSION;
mi.icolibItem = iconList[5].hIcolib;
mi.position = 10100000;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index 27195caeaf..9e446616bf 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -267,12 +267,12 @@ extern "C" int __declspec(dllexport)Load(void) CLISTMENUITEM mi = { 0 };
mi.position = 500090000;
- mi.ptszName = _T("");
+ mi.name.t = _T("");
mi.pszService = protocolname"/ToggleEnable";
hEnableMenu = Menu_AddMainMenuItem(&mi);
mi.position = -0x7FFFFFFF;
- mi.ptszName = _T("");
+ mi.name.t = _T("");
mi.pszService = protocolname"/ToggleAutoanswer";
hToggle = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 4b12971e99..98a9ca6e50 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -421,21 +421,21 @@ int LoadAwayMsgModule(void) CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
mi.position = -2000005000;
- mi.ptszName = LPGENT("Re&ad Away message");
+ mi.name.t = LPGENT("Re&ad Away message");
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand);
mi.position = -2000006000;
mi.icolibItem = GetIconHandle(IDI_COPY);
- mi.ptszName = LPGENT("Copy Away message");
+ mi.name.t = LPGENT("Copy Away message");
mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG;
hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand);
mi.position = -2000007000;
mi.icolibItem = GetIconHandle(IDI_GOTOURL);
- mi.ptszName = LPGENT("&Go to URL in Away message");
+ mi.name.t = LPGENT("&Go to URL in Away message");
mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG;
hGoToURLMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 9bf3cb4eb0..6281cde036 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1459,7 +1459,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam) mi.flags |= CMIF_HIDDEN;
mi.icolibItem = GetIconHandle(IDI_CSMSG);
mi.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
- mi.ptszName = LPGENT("Status message...");
+ mi.name.t = LPGENT("Status message...");
mi.position = 2000200000;
Menu_AddStatusMenuItem(&mi);
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index 1cc9974b79..506d4be669 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -53,7 +53,7 @@ static int ModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.position = 2000070050;
mi.icolibItem = icon.hIcolib;
- mi.pszName = LPGEN("Assign smiley category");
+ mi.name.a = LPGEN("Assign smiley category");
hContactMenuItem = Menu_AddContactMenuItem(&mi);
DownloadInit();
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 2cc5413753..773c7cccc9 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -306,7 +306,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) const int ind = i + 3;
mi.position = ind;
- mi.ptszName = (TCHAR*)smc[i].GetDisplayName().c_str();
+ mi.name.t = (TCHAR*)smc[i].GetDisplayName().c_str();
if (cat == smc[i].GetName()) {
mi.flags |= CMIF_CHECKED;
@@ -320,7 +320,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) }
mi.position = 1;
- mi.ptszName = _T("<None>");
+ mi.name.t = _T("<None>");
if (cat == _T("<None>")) {
mi.flags |= CMIF_CHECKED;
nonecheck = false;
@@ -331,7 +331,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) menuHandleArray.insert(hMenu);
mi.position = 2;
- mi.ptszName = LPGENT("Protocol specific");
+ mi.name.t = LPGENT("Protocol specific");
if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED;
hMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 2d4aaaa8d6..ab3aa9401b 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -292,7 +292,7 @@ static INT_PTR InitMenu() CLISTMENUITEM mi = { 0 };
mi.position = 100000000;
mi.icolibItem = GetIconHandle(MENU_NAME);
- mi.pszName = MENU_NAME;
+ mi.name.a = MENU_NAME;
mi.pszService = SS_SERVICE_NAME;
hSSMenuToggleOnOff = Menu_AddMainMenuItem(&mi);
UpdateMenu();
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 957836adcd..2f74d8cbc1 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -105,7 +105,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM) if (db_get_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), 1)) mi.hParentMenu = Menu_CreateRoot(MO_STATUS, LPGENT("Status profiles"), 2000100000); - mi.ptszName = profilename; + mi.name.t = profilename; mi.position = 2000100000 + mcount; mir_snprintf(servicename, _countof(servicename), "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount); switch(mcount) { diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 916d4b9123..4e59ed963e 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -151,8 +151,8 @@ extern "C" int __declspec(dllexport) Load() CLISTMENUITEM mi = { 0 };
mi.position=-0x7FFFFFFF;
mi.flags=0;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.pszName=LPGEN("Remove Temporary Contacts");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.a=LPGEN("Remove Temporary Contacts");
mi.pszService="/RemoveTmp";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp index ace2300843..d36e5f709a 100644 --- a/plugins/StopSpamPlus/src/stopspam.cpp +++ b/plugins/StopSpamPlus/src/stopspam.cpp @@ -51,8 +51,8 @@ extern "C" int __declspec(dllexport) Load(void) CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName = LPGENT("Remove Temporary Contacts");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Remove Temporary Contacts");
mi.pszService = pluginName"/RemoveTempContacts";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 470ba6ec37..6098edf5c4 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -139,7 +139,7 @@ void CGlobals::reloadSystemModulesChanged() mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
- mi.pszName = LPGEN("&Message");
+ mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
PluginConfig.m_hMenuItem = Menu_AddContactMenuItem(&mi);
@@ -327,15 +327,15 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.position = -500050005;
- mi.hIcon = PluginConfig.g_iconContainer;
- mi.pszName = LPGEN("&Messaging settings...");
+ mi.icolibItem = PluginConfig.g_iconContainer;
+ mi.name.a = LPGEN("&Messaging settings...");
mi.pszService = MS_TABMSG_SETUSERPREFS;
PluginConfig.m_UserMenuItem = Menu_AddContactMenuItem(&mi);
if (sendLater->isAvail()) {
mi.position = -500050006;
- mi.hIcon = 0;
- mi.pszName = LPGEN("&Send later job list...");
+ mi.icolibItem = 0;
+ mi.name.a = LPGEN("&Send later job list...");
mi.pszService = MS_TABMSG_SLQMGR;
PluginConfig.m_UserMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index c1637a6f0f..e64e83ddee 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -538,12 +538,12 @@ int TN_ModuleInit() CLISTMENUITEM mi = { 0 };
if (!Disabled) {
- mi.pszName = LPGEN("Disable &typing notification");
- mi.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED));
+ mi.name.a = LPGEN("Disable &typing notification");
+ mi.icolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED));
}
else {
- mi.pszName = LPGEN("Enable &typing notification");
- mi.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED));
+ mi.name.a = LPGEN("Enable &typing notification");
+ mi.icolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED));
}
mi.pszService = "TypingNotify/EnableDisableMenuCommand";
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index cf769d01ee..a21efb2458 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -1050,8 +1050,8 @@ void Traffic_AddMainMenuItem(void) CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
- mi.hIcon = NULL;
- mi.pszName = LPGEN("Toggle traffic counter");
+ mi.icolibItem = NULL;
+ mi.name.a = LPGEN("Toggle traffic counter");
mi.pszService = "TrafficCounter/ShowHide";
hTrafficMainMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index a3cb2e2e1b..45d97293a0 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -87,8 +87,8 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { 0 };
mi.position = 500000;
mi.flags = CMIF_TCHAR;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_HELP);
- mi.ptszName = LPGENT("User Guide");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_HELP);
+ mi.name.t = LPGENT("User Guide");
mi.pszService = "UserGuide/ShowGuide";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index e3891a5f65..925fdcf23f 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -96,8 +96,8 @@ void RebuildContact() case 5:
//cascade all
mi.position = 1000050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddContactMenuItem(&mi);
hMenuItem[0] = mhRoot;
mhExIm = mhRoot;
@@ -105,8 +105,8 @@ void RebuildContact() case 9:
//cascade Ex/Import
mi.position = 1000050100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import contact");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import contact");
mhExIm = Menu_AddContactMenuItem(&mi);
hMenuItem[0] = mhExIm;
mhRoot = NULL;
@@ -119,9 +119,9 @@ void RebuildContact() // ContactDetailsPS's menuitem
mi.hParentMenu = mhRoot;
mi.pszService = MS_USERINFO_SHOWDIALOG;
- mi.pszName = LPGEN("User &details");
+ mi.name.a = LPGEN("User &details");
mi.position = 1000050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
hMenuItem[1] = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hMenuItem[1], MCI_OPT_HOTKEY, MAKELPARAM(VK_F3, MOD_ALT));
@@ -131,16 +131,16 @@ void RebuildContact() // Export
mi.pszService = MS_USERINFO_VCARD_EXPORT;
- mi.pszName = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export user details");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export user details");
mi.position = 1000050200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[2] = Menu_AddContactMenuItem(&mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORT;
- mi.pszName = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import user details");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import user details");
mi.position = 1000050300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[3] = Menu_AddContactMenuItem(&mi);
}
@@ -184,8 +184,8 @@ void RebuildMain() case 5:
//cascade all
mi.position = 500050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddMainMenuItem(&mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
@@ -193,8 +193,8 @@ void RebuildMain() case 9:
//cascade Ex/Import
mi.position = 500050000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import contact");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import contact");
mhExIm = Menu_AddMainMenuItem(&mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
@@ -208,9 +208,9 @@ void RebuildMain() {
mi.hParentMenu = mhRoot;
mi.pszService = MS_USERINFO_SHOWDIALOG;
- mi.pszName = LPGEN("View/change my &details...");
+ mi.name.a = LPGEN("View/change my &details...");
mi.position = 500050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
@@ -219,16 +219,16 @@ void RebuildMain() // Export
mi.pszService = MS_USERINFO_VCARD_EXPORTALL;
- mi.pszName = LPGEN("Export all contacts");
+ mi.name.a = LPGEN("Export all contacts");
mi.position = 500150000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORTALL;
- mi.pszName = LPGEN("Import all contacts");
+ mi.name.a = LPGEN("Import all contacts");
mi.position = 500151000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
@@ -242,15 +242,15 @@ void RebuildMain() if (bRemindMenus) {
// make backup of each protocol based birthday
mi.pszService = MS_USERINFO_REMINDER_AGGRASIVEBACKUP;
- mi.pszName = LPGEN("Backup birthdays");
+ mi.name.a = LPGEN("Backup birthdays");
mi.position = 500253000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_BDAY_BACKUP);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_BDAY_BACKUP);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
// Check anniversaries
mi.pszService = MS_USERINFO_REMINDER_CHECK;
- mi.pszName = LPGEN("Check anniversaries");
+ mi.name.a = LPGEN("Check anniversaries");
mi.position = 500251000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_SEARCH);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_SEARCH);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
else {
@@ -259,18 +259,18 @@ void RebuildMain() }
// Refresh Contact Details
mi.pszService = MS_USERINFO_REFRESH;
- mi.pszName = LPGEN("Refresh contact details");
+ mi.name.a = LPGEN("Refresh contact details");
mi.position = 500254000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_UPDATE);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
// anniversary list
{
mi.pszService = MS_USERINFO_REMINDER_LIST;
- mi.pszName = LPGEN("Anniversary list");
+ mi.name.a = LPGEN("Anniversary list");
mi.position = 500252000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_ANNIVERSARY);
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_ANNIVERSARY);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
}
@@ -322,8 +322,8 @@ void RebuildGroup() case 5:
//cascade all
mi.position = 250000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddGroupMenuItem(0, &mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
@@ -331,8 +331,8 @@ void RebuildGroup() case 9:
//cascade Ex/Import
mi.position = 250100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import contact");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import contact");
mhExIm = Menu_AddGroupMenuItem(0, &mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
@@ -347,16 +347,16 @@ void RebuildGroup() // Export
mi.pszService = MS_USERINFO_VCARD_EXPORTALL;
- mi.pszName = LPGEN("Export all contacts");
+ mi.name.a = LPGEN("Export all contacts");
mi.position = 250200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[item++] = Menu_AddGroupMenuItem(0, &mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORTALL;
- mi.pszName = LPGEN("Import all contacts");
+ mi.name.a = LPGEN("Import all contacts");
mi.position = 250300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[item++] = Menu_AddGroupMenuItem(0, &mi);
}
}
@@ -412,8 +412,8 @@ void RebuildSubGroup() case 5:
//cascade all
mi.position = 1050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddSubGroupMenuItem(0, &mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
@@ -421,8 +421,8 @@ void RebuildSubGroup() case 9:
//cascade Ex/Import
mi.position = 1050100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import group");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import group");
mhExIm = Menu_AddSubGroupMenuItem(0, &mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
@@ -438,9 +438,9 @@ void RebuildSubGroup() // Export
mir_strcpy(tDest, "/ExportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
- mi.pszName = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export group");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export group");
mi.position = 1050200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
gmp.lParam=0;
gmp.wParam=TRUE;
hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
@@ -448,9 +448,9 @@ void RebuildSubGroup() // Import
mir_strcpy(tDest, "/ImportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
- mi.pszName = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import group");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import group");
mi.position = 1050300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
gmp.lParam=0;
gmp.wParam=FALSE;
hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
@@ -539,8 +539,8 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam) case 5:
//cascade all
mi.position = 50100;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
hMenuItemAccount[mItems*i + item] = Menu_AddStatusMenuItem(&mi);
mhRoot = hMenuItemAccount[mItems*i + item++];
mhExIm = mhRoot;
@@ -548,8 +548,8 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam) case 9:
//cascade Ex/Import
mi.position = 50100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import");
hMenuItemAccount[mItems*i + item] = Menu_AddStatusMenuItem(&mi);
mhRoot = hMenuItemAccount[mItems*i + item++];
mhExIm = mhRoot;
@@ -566,17 +566,17 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam) // Export
mir_strcpy(tDest, "/ExportAccount"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Account_Service);
- mi.pszName = LPGEN("&Export xml");
+ mi.name.a = LPGEN("&Export xml");
mi.position = 50200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItemAccount[mItems*i + item++] = Menu_AddStatusMenuItem(&mi);
// Import
mir_strcpy(tDest, "/ImportAccount"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Account_Service);
- mi.pszName = LPGEN("&Import xml");
+ mi.name.a = LPGEN("&Import xml");
mi.position = 50300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItemAccount[mItems*i + item++] = Menu_AddStatusMenuItem(&mi);
}
}
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 5ad7c0935f..91a2515650 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -185,8 +185,8 @@ void SvcEMailRebuildMenu() // insert contact menuitem
CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EMAIL);
- mi.pszName = "&E-mail";
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EMAIL);
+ mi.name.a = "&E-mail";
mi.pszService = MS_EMAIL_SENDEMAIL;
ghMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp index 9e1b7d10b8..0e47f1e8bd 100644 --- a/plugins/UserInfoEx/src/svc_homepage.cpp +++ b/plugins/UserInfoEx/src/svc_homepage.cpp @@ -155,8 +155,8 @@ void SvcHomepageRebuildMenu() // insert contact menuitem
CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
- mi.pszName = LPGEN("&Homepage");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_GOTO);
+ mi.name.a = LPGEN("&Homepage");
mi.pszService = MS_USERINFO_HOMEPAGE_OPENURL;
ghMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index fbd0d965ae..4ea8b9511d 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -269,63 +269,62 @@ INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam) void AddMenuItems(void)
{
CLISTMENUITEM mi = { 0 };
- mi.pszContactOwner = WEATHERPROTONAME;
// contact menu
CreateServiceFunction(MS_WEATHER_UPDATE, UpdateSingleStation);
mi.position = -0x7FFFFFFA;
mi.icolibItem = GetIconHandle("update");
- mi.pszName = LPGEN("Update Weather");
+ mi.name.a = LPGEN("Update Weather");
mi.pszService = MS_WEATHER_UPDATE;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_REFRESH, UpdateSingleRemove);
mi.position = -0x7FFFFFF9;
mi.icolibItem = GetIconHandle("update2");
- mi.pszName = LPGEN("Remove Old Data then Update");
+ mi.name.a = LPGEN("Remove Old Data then Update");
mi.pszService = MS_WEATHER_REFRESH;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_BRIEF, BriefInfoSvc);
mi.position = -0x7FFFFFF8;
mi.icolibItem = GetIconHandle("brief");
- mi.pszName = LPGEN("Brief Information");
+ mi.name.a = LPGEN("Brief Information");
mi.pszService = MS_WEATHER_BRIEF;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_COMPLETE, LoadForecast);
mi.position = -0x7FFFFFF7;
mi.icolibItem = GetIconHandle("read");
- mi.pszName = LPGEN("Read Complete Forecast");
+ mi.name.a = LPGEN("Read Complete Forecast");
mi.pszService = MS_WEATHER_COMPLETE;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_MAP, WeatherMap);
mi.position = -0x7FFFFFF6;
mi.icolibItem = GetIconHandle("map");
- mi.pszName = LPGEN("Weather Map");
+ mi.name.a = LPGEN("Weather Map");
mi.pszService = MS_WEATHER_MAP;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_LOG, ViewLog);
mi.position = -0x7FFFFFF5;
mi.icolibItem = GetIconHandle("log");
- mi.pszName = LPGEN("View Log");
+ mi.name.a = LPGEN("View Log");
mi.pszService = MS_WEATHER_LOG;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_EDIT, EditSettings);
mi.position = -0x7FFFFFF4;
mi.icolibItem = GetIconHandle("edit");
- mi.pszName = LPGEN("Edit Settings");
+ mi.name.a = LPGEN("Edit Settings");
mi.pszService = MS_WEATHER_EDIT;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
// adding main menu items
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Weather"), 500099000);
CreateServiceFunction(MS_WEATHER_ENABLED, EnableDisableCmd);
- mi.pszName = LPGEN("Enable/Disable Weather Update");
+ mi.name.a = LPGEN("Enable/Disable Weather Update");
mi.icolibItem = GetIconHandle("main");
mi.position = 10100001;
mi.pszService = MS_WEATHER_ENABLED;
@@ -335,21 +334,21 @@ void AddMenuItems(void) CreateServiceFunction(MS_WEATHER_UPDATEALL, UpdateAllInfo);
mi.position = 20100001;
mi.icolibItem = GetIconHandle("update");
- mi.pszName = LPGEN("Update All Weather");
+ mi.name.a = LPGEN("Update All Weather");
mi.pszService = MS_WEATHER_UPDATEALL;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(MS_WEATHER_REFRESHALL, UpdateAllRemove);
mi.position = 20100002;
mi.icolibItem = GetIconHandle("update2");
- mi.pszName = LPGEN("Remove Old Data then Update All");
+ mi.name.a = LPGEN("Remove Old Data then Update All");
mi.pszService = MS_WEATHER_REFRESHALL;
Menu_AddMainMenuItem(&mi);
// only run if popup service exists
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
CreateServiceFunction(WEATHERPROTONAME "/PopupMenu", MenuitemNotifyCmd);
- mi.pszName = LPGEN("Weather Notification");
+ mi.name.a = LPGEN("Weather Notification");
mi.icolibItem = GetIconHandle("popup");
mi.position = 0;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
@@ -361,9 +360,9 @@ void AddMenuItems(void) if ( ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
CreateServiceFunction("Weather/mwin_menu", Mwin_MenuClicked);
mi.position = -0x7FFFFFF0;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.flags = 0;
- mi.pszName = LPGEN("Display in a frame");
+ mi.name.a = LPGEN("Display in a frame");
mi.pszService = "Weather/mwin_menu";
hMwinMenu = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index a0cb6460e7..b3367ff3d8 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -179,114 +179,96 @@ extern "C" int __declspec(dllexport) Load() CreateServiceFunction("DisableWebview", AutoUpdateMCmd);
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(MODULENAME), 20200001);
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
if (db_get_b(NULL, MODULENAME, DISABLE_AUTOUPDATE_KEY, 0))
- mi.ptszName = LPGENT("Auto update disabled");
+ mi.name.t = LPGENT("Auto update disabled");
else
- mi.ptszName = LPGENT("Auto update enabled");
+ mi.name.t = LPGENT("Auto update enabled");
mi.pszService = "DisableWebview";
hMenuItem1 = Menu_AddMainMenuItem(&mi);
- /*
- * Update all webview contacts
- */
-
+ // Update all webview contacts
CreateServiceFunction("UpdateAll", UpdateAllMenuCommand);
-
mi.position = 500090002;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
- mi.ptszName = LPGENT("Update all Webview sites");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
+ mi.name.t = LPGENT("Update all Webview sites");
mi.pszService = "UpdateAll";
Menu_AddMainMenuItem(&mi);
- /*
- * Mark All Webview Sites As Read
- */
-
+ // Mark All Webview Sites As Read
CreateServiceFunction("MarkAllSitesRead", MarkAllReadMenuCommand);
-
mi.position = 500090099;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MARKALLREAD));
- mi.ptszName = LPGENT("Mark all Webview sites as read");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MARKALLREAD));
+ mi.name.t = LPGENT("Mark all Webview sites as read");
mi.pszService = "MarkAllSitesRead";
Menu_AddMainMenuItem(&mi);
- /*
- * open cache directory
- */
+ // open cache directory
CreateServiceFunction("OpenCacheFolder", OpenCacheDir);
mi.position = 500090099;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_FOLDER));
- mi.ptszName = LPGENT("Open cache folder");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_FOLDER));
+ mi.name.t = LPGENT("Open cache folder");
mi.pszService = "OpenCacheFolder";
Menu_AddMainMenuItem(&mi);
- /*
- * Countdown test
- */
-
+ // Countdown test
CreateServiceFunction("Countdown", CountdownMenuCommand);
-
mi.flags |= CMIF_KEEPUNTRANSLATED;
TCHAR countername[100];
mir_sntprintf(countername, _countof(countername), TranslateT("%d minutes to update"), db_get_dw(NULL, MODULENAME, COUNTDOWN_KEY, 0));
mi.position = 600090099;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
- mi.pszContactOwner = NULL;
- mi.ptszName = countername;
-
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
+ mi.name.t = countername;
mi.pszService = "Countdown";
hMenuItemCountdown = Menu_AddMainMenuItem(&mi);
}
- /*
- * contact menu
- */
+ // contact menu
mi.flags = CMIF_TCHAR;
+
CreateServiceFunction("Open web page", WebsiteMenuCommand);
mi.position = 100;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_URL));
- mi.pszContactOwner = MODULENAME;
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_URL));
mi.pszService = "Open web page";
- mi.ptszName = LPGENT("Open web page");
- Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Open web page");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("OpenClose Window", DataWndMenuCommand);
mi.pszService = "OpenClose Window";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SHOW_HIDE));
- mi.ptszName = LPGENT("Open/Close window");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SHOW_HIDE));
+ mi.name.t = LPGENT("Open/Close window");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
mi.position = 2222220;
mi.pszService = "UpdateData";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATE));
- mi.ptszName = LPGENT("Update data");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATE));
+ mi.name.t = LPGENT("Update data");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("ContactOptions", CntOptionsMenuCommand);
mi.pszService = "ContactOptions";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_OPTIONS));
- mi.ptszName = LPGENT("Contact options");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_OPTIONS));
+ mi.name.t = LPGENT("Contact options");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("ContactAlertOpts", CntAlertMenuCommand);
mi.pszService = "ContactAlertOpts";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ALERT));
- mi.ptszName = LPGENT("Contact alert options");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ALERT));
+ mi.name.t = LPGENT("Contact alert options");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("PingWebsite", PingWebsiteMenuCommand);
mi.pszService = "PingWebsite";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_PING));
- mi.ptszName = LPGENT("Ping web site");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_PING));
+ mi.name.t = LPGENT("Ping web site");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("StopDataProcessing", StpPrcssMenuCommand);
mi.pszService = "StopDataProcessing";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_STOP));
- mi.ptszName = LPGENT("Stop data processing");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_STOP));
+ mi.name.t = LPGENT("Stop data processing");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
hWindowList = WindowList_Create();
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index b47593aaeb..d2c224f0c8 100644 --- a/plugins/WhenWasIt/src/WhenWasIt.cpp +++ b/plugins/WhenWasIt/src/WhenWasIt.cpp @@ -78,28 +78,28 @@ extern "C" int __declspec(dllexport) Load(void) mi.pszService = MS_WWI_CHECK_BIRTHDAYS;
mi.icolibItem = hCheckMenu;
- mi.pszName = LPGEN("Check for birthdays");
+ mi.name.a = LPGEN("Check for birthdays");
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_LIST_SHOW;
- mi.pszName = LPGEN("Birthday list");
+ mi.name.a = LPGEN("Birthday list");
mi.icolibItem = hListMenu;
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_REFRESH_USERDETAILS;
mi.position = 10100000;
- mi.pszName = LPGEN("Refresh user details");
+ mi.name.a = LPGEN("Refresh user details");
mi.icolibItem = hRefreshUserDetails;
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_IMPORT_BIRTHDAYS;
mi.position = 10200000;
- mi.pszName = LPGEN("Import birthdays");
+ mi.name.a = LPGEN("Import birthdays");
mi.icolibItem = hImportBirthdays;
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_EXPORT_BIRTHDAYS;
- mi.pszName = LPGEN("Export birthdays");
+ mi.name.a = LPGEN("Export birthdays");
mi.icolibItem = hExportBirthdays;
Menu_AddMainMenuItem(&mi);
@@ -107,7 +107,7 @@ extern "C" int __declspec(dllexport) Load(void) mi.pszService = MS_WWI_ADD_BIRTHDAY;
mi.position = 10000000;
mi.icolibItem = hAddBirthdayContact;
- mi.pszName = LPGEN("Add/change user &birthday");
+ mi.name.a = LPGEN("Add/change user &birthday");
Menu_AddContactMenuItem(&mi);
// Register hotkeys
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index fe9ce91b60..d641f612f2 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -495,19 +495,19 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 1999990000);
if (WumfOptions.PopupsEnabled == FALSE) {
- mi.pszName = LPGEN("Enable WUMF popups");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
+ mi.name.a = LPGEN("Enable WUMF popups");
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
}
else {
- mi.pszName = LPGEN("Disable WUMF popups");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
+ mi.name.a = LPGEN("Disable WUMF popups");
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
}
mi.pszService = MS_WUMF_SWITCHPOPUP;
hMenuItem = Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("WUMF: Show connections");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
+ mi.name.a = LPGEN("WUMF: Show connections");
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
mi.pszService = MS_WUMF_CONNECTIONSSHOW;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index d94d9ea4c8..fb46121077 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -179,8 +179,8 @@ static int OnLoadInit(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName = LPGENT("Custom contact sound");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Custom contact sound");
mi.pszService = "XSoundNotify/ContactMenuCommand";
hChangeSound = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index ecb739d653..c657a7a5ce 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -144,20 +144,18 @@ int SystemModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 }; mi.position = 0xb0000000; mi.icolibItem = g_GetIconHandle(0); - mi.pszName = LPGEN("Check &mail (All Account)"); + mi.name.a = LPGEN("Check &mail (All Account)"); mi.pszService = MS_YAMN_FORCECHECK; hMenuItemMain = Menu_AddMainMenuItem(&mi); - mi.pszName = LPGEN("Check &mail (This Account)"); - mi.pszContactOwner = YAMN_DBMODULE; + mi.name.a = LPGEN("Check &mail (This Account)"); mi.pszService = MS_YAMN_CLISTCONTEXT; - hMenuItemCont = Menu_AddContactMenuItem(&mi); + hMenuItemCont = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE); mi.icolibItem = g_GetIconHandle(1); - mi.pszName = LPGEN("Launch application"); - mi.pszContactOwner = YAMN_DBMODULE; + mi.name.a = LPGEN("Launch application"); mi.pszService = MS_YAMN_CLISTCONTEXTAPP; - hMenuItemContApp = Menu_AddContactMenuItem(&mi); + hMenuItemContApp = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE); CheckMenuItems(); diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index c937996dcf..dc8bb1074e 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -174,14 +174,14 @@ void InitMenuItems(void) mi.flags = CMIF_TCHAR;
mi.hParentMenu = hMenuRoot;
- mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
+ mi.icolibItem = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService= MS_POPUP_SHOWHISTORY;
- mi.ptszName = LPGENT("Popup History");
+ mi.name.t = LPGENT("Popup History");
hMenuItemHistory = Menu_AddMainMenuItem(&mi);
- mi.hIcon = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
+ mi.icolibItem = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
mi.pszService = "Popup/EnableDisableMenuCommand";
- mi.ptszName = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
+ mi.name.t = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
hMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc index 0406bf311f..5312e6b26b 100644 --- a/plugins/mRadio/i_tray.inc +++ b/plugins/mRadio/i_tray.inc @@ -90,7 +90,7 @@ begin // build menu from sorted list
FillChar(mi,SizeOf(mi),0);
- mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE;
mi.hParentMenu:=trayparent;
pc:=StrCopyE(@buf,'mRadio/Choose');
for i:=0 to trayStations.realCount-1 do
@@ -156,7 +156,7 @@ begin begin
mi.szName.w :='mRadio on';
end;
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.flags:=CMIF_UNICODE;
mi.position :=0;
srvtraystop:=CreateServiceFunction('mRadio/TrayProto',@TrayProto);
mi.pszService:='mRadio/TrayProto';
@@ -167,12 +167,12 @@ begin if gVolume<0 then
begin
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE or CMIF_CHECKED;
+ mi.flags:=CMIF_UNICODE or CMIF_CHECKED;
ico:=IcoBtnOff;
end
else
begin
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.flags:=CMIF_UNICODE;
ico:=IcoBtnOn;
end;
mi.hIcon :=IcoLib_GetIcon(ico,0);
@@ -185,7 +185,7 @@ begin traymute:=Menu_AddMainMenuItem(@mi);
mi.hIcon:=0;
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.flags:=CMIF_UNICODE;
if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)<>RD_STATUS_PLAYING then
begin
playstr:='Play'
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index fe5555e638..c51a5fb3eb 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -218,7 +218,7 @@ void CAimProto::InitMainMenus(void) if (hRoot == NULL) {
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle("aim");
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = 500090000;
hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
@@ -237,62 +237,57 @@ void CAimProto::InitMainMenus(void) CreateProtoService("/ManageAccount", &CAimProto::ManageAccount);
mi.position = 201001;
mi.icolibItem = GetIconHandle("aim");
- mi.pszName = LPGEN("Manage Account");
+ mi.name.a = LPGEN("Manage Account");
hMainMenu[0] = Menu_AddProtoMenuItem(&mi);
mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/InstantIdle");
CreateProtoService("/InstantIdle",&CAimProto::InstantIdle);
mi.position = 201002;
mi.icolibItem = GetIconHandle("idle");
- mi.pszName = LPGEN("Instant Idle");
+ mi.name.a = LPGEN("Instant Idle");
hMainMenu[1] = Menu_AddProtoMenuItem(&mi);
mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/JoinChatRoom");
CreateProtoService("/JoinChatRoom", &CAimProto::JoinChatUI);
mi.position = 201003;
mi.icolibItem = GetIconHandle("aol");
- mi.pszName = LPGEN( "Join Chat Room" );
+ mi.name.a = LPGEN( "Join Chat Room" );
hMainMenu[2] = Menu_AddProtoMenuItem(&mi);
}
void CAimProto::InitContactMenus(void)
{
- //Do not put any services below HTML get away message!!!
- char service_name[200];
-
CLISTMENUITEM mi = { 0 };
- mi.pszService = service_name;
- mi.pszContactOwner = m_szModuleName;
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/GetHTMLAwayMsg");
CreateProtoService("/GetHTMLAwayMsg",&CAimProto::GetHTMLAwayMsg);
+ mi.pszService = "/GetHTMLAwayMsg";
mi.position = -2000006000;
mi.icolibItem = GetIconHandle("away");
- mi.pszName = LPGEN("Read &HTML Away Message");
+ mi.name.a = LPGEN("Read &HTML Away Message");
mi.flags = CMIF_NOTOFFLINE | CMIF_HIDDEN;
- hHTMLAwayContextMenuItem = Menu_AddContactMenuItem(&mi);
+ hHTMLAwayContextMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/GetProfile");
CreateProtoService("/GetProfile", &CAimProto::GetProfile);
+ mi.pszService = "/GetProfile";
mi.position = -2000005090;
mi.icolibItem = GetIconHandle("profile");
- mi.pszName = LPGEN("Read Profile");
+ mi.name.a = LPGEN("Read Profile");
mi.flags = CMIF_NOTOFFLINE;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/AddToServerList");
CreateProtoService("/AddToServerList", &CAimProto::AddToServerList);
+ mi.pszService = "/AddToServerList";
mi.position = -2000005080;
mi.icolibItem = GetIconHandle("add");
- mi.pszName = LPGEN("Add To Server List");
+ mi.name.a = LPGEN("Add To Server List");
mi.flags = CMIF_NOTONLINE | CMIF_HIDDEN;
- hAddToServerListContextMenuItem = Menu_AddContactMenuItem(&mi);
+ hAddToServerListContextMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/BlockCommand");
CreateProtoService("/BlockCommand", &CAimProto::BlockBuddy);
+ mi.pszService = "/BlockCommand";
mi.position = -2000005060;
mi.icolibItem = GetIconHandle("block");
- mi.pszName = LPGEN("&Block");
+ mi.name.a = LPGEN("&Block");
mi.flags = CMIF_HIDDEN;
- hBlockContextMenuItem = Menu_AddContactMenuItem(&mi);
+ hBlockContextMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 589d2e125e..ecb6403495 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -110,70 +110,70 @@ void InitContactMenus() CLISTMENUITEM mi = { 0 };
mi.position = -2000006000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
- mi.pszName = LPGEN("Visit profile");
+ mi.name.a = LPGEN("Visit profile");
mi.pszService = "FacebookProto/VisitProfile";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::VisitProfile>);
g_hContactMenuVisitProfile = Menu_AddContactMenuItem(&mi);
mi.position = -2000006001;
mi.icolibItem = GetIconHandle("friendship");
- mi.pszName = LPGEN("Visit friendship details");
+ mi.name.a = LPGEN("Visit friendship details");
mi.pszService = "FacebookProto/VisitFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::VisitFriendship>);
g_hContactMenuVisitFriendship = Menu_AddContactMenuItem(&mi);
mi.position = -2000006002;
mi.icolibItem = GetIconHandle("conversation");
- mi.pszName = LPGEN("Visit conversation");
+ mi.name.a = LPGEN("Visit conversation");
mi.pszService = "FacebookProto/VisitConversation";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::VisitConversation>);
g_hContactMenuVisitConversation = Menu_AddContactMenuItem(&mi);
mi.position = -2000006003;
mi.icolibItem = GetIconHandle("mind");
- mi.pszName = LPGEN("Share status...");
+ mi.name.a = LPGEN("Share status...");
mi.pszService = "FacebookProto/Mind";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::OnMind>);
g_hContactMenuPostStatus = Menu_AddContactMenuItem(&mi);
mi.position = -2000006004;
mi.icolibItem = GetIconHandle("poke");
- mi.pszName = LPGEN("Poke");
+ mi.name.a = LPGEN("Poke");
mi.pszService = "FacebookProto/Poke";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::Poke>);
g_hContactMenuPoke = Menu_AddContactMenuItem(&mi);
mi.position = -2000006010;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
- mi.pszName = LPGEN("Cancel friendship");
+ mi.name.a = LPGEN("Cancel friendship");
mi.pszService = "FacebookProto/CancelFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::CancelFriendship>);
g_hContactMenuAuthRevoke = Menu_AddContactMenuItem(&mi);
mi.position = -2000006011;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
- mi.pszName = LPGEN("Cancel friendship request");
+ mi.name.a = LPGEN("Cancel friendship request");
mi.pszService = "FacebookProto/CancelFriendshipRequest";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::OnCancelFriendshipRequest>);
g_hContactMenuAuthCancel = Menu_AddContactMenuItem(&mi);
mi.position = -2000006012;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
- mi.pszName = LPGEN("Request friendship");
+ mi.name.a = LPGEN("Request friendship");
mi.pszService = "FacebookProto/RequestFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::RequestFriendship>);
g_hContactMenuAuthAsk = Menu_AddContactMenuItem(&mi);
mi.position = -2000006013;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
- mi.pszName = LPGEN("Approve friendship");
+ mi.name.a = LPGEN("Approve friendship");
mi.pszService = "FacebookProto/ApproveFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::ApproveFriendship>);
g_hContactMenuAuthGrant = Menu_AddContactMenuItem(&mi);
mi.position = -2000006014;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
- mi.pszName = LPGEN("Deny friendship request");
+ mi.name.a = LPGEN("Deny friendship request");
mi.pszService = "FacebookProto/DenyFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::DenyFriendship>);
g_hContactMenuAuthDeny = Menu_AddContactMenuItem(&mi);
@@ -221,7 +221,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) miRoot.position = 500085000;
miRoot.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
miRoot.icolibItem = GetIconHandle("facebook");
- miRoot.ptszName = m_tszUserName;
+ miRoot.name.t = m_tszUserName;
hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&miRoot);
}
else {
@@ -237,20 +237,20 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) //CreateProtoService(m_szModuleName,"/Mind",&FacebookProto::OnMind,this);
mir_strcpy(tDest, "/Mind");
- mi.pszName = LPGEN("Share status...");
+ mi.name.a = LPGEN("Share status...");
mi.icolibItem = GetIconHandle("mind");
m_hStatusMind = Menu_AddProtoMenuItem(&mi);
//CreateProtoService("/VisitProfile",&FacebookProto::VisitProfile);
mir_strcpy(tDest, "/VisitProfile");
- mi.pszName = LPGEN("Visit profile");
+ mi.name.a = LPGEN("Visit profile");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
// TODO RM: remember and properly free in destructor?
/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);
//CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
mir_strcpy(tDest, "/VisitNotifications");
- mi.pszName = LPGEN("Visit notifications");
+ mi.name.a = LPGEN("Visit notifications");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
Menu_AddProtoMenuItem(&mi);
@@ -259,19 +259,19 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) CreateProtoService("/RefreshBuddyList", &FacebookProto::RefreshBuddyList);
mir_strcpy(tDest, "/RefreshBuddyList");
- mi.pszName = LPGEN("Refresh Buddy List");
+ mi.name.a = LPGEN("Refresh Buddy List");
mi.icolibItem = GetIconHandle("friendship");
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/CheckFriendRequests", &FacebookProto::CheckFriendRequests);
mir_strcpy(tDest, "/CheckFriendRequests");
- mi.pszName = LPGEN("Check Friends Requests");
+ mi.name.a = LPGEN("Check Friends Requests");
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/CheckNewsfeeds", &FacebookProto::CheckNewsfeeds);
mir_strcpy(tDest, "/CheckNewsfeeds");
- mi.pszName = LPGEN("Check Newsfeeds");
+ mi.name.a = LPGEN("Check Newsfeeds");
mi.icolibItem = GetIconHandle("newsfeed");
Menu_AddProtoMenuItem(&mi);
return 0;
diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp index d39dc2b166..e9da9939d3 100644 --- a/protocols/GTalkExt/src/menu.cpp +++ b/protocols/GTalkExt/src/menu.cpp @@ -44,13 +44,13 @@ int InitMenus(WPARAM wParam, LPARAM lParam) mir_snprintf(szServiceName, _countof(szServiceName), "%s/%s", szModuleName, MS_GTALKEXT_OPENMAILBOX);
CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName);
- CLISTMENUITEM cmi = { 0 };
- cmi.hParentMenu = HGENMENU(wParam);
- cmi.hIcon = g_hPopupIcon;
- cmi.position = 200101;
- cmi.pszName = LPGEN("Open mailbox");
- cmi.pszService = szServiceName;
- Menu_AddProtoMenuItem(&cmi);
+ CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = HGENMENU(wParam);
+ mi.icolibItem = g_hPopupIcon;
+ mi.position = 200101;
+ mi.name.a = LPGEN("Open mailbox");
+ mi.pszService = szServiceName;
+ Menu_AddProtoMenuItem(&mi);
}
return 0;
}
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 7a7a6dd8d6..95b23cc877 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -235,18 +235,12 @@ INT_PTR GGPROTO::blockuser(WPARAM hContact, LPARAM lParam) #define GGS_BLOCKUSER "/BlockUser"
void GGPROTO::block_init()
{
- char service[64];
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_BLOCKUSER);
- CreateProtoService(GGS_BLOCKUSER, &GGPROTO::blockuser);
-
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_TCHAR;
mi.position = -500050000;
mi.icolibItem = iconList[8].hIcolib;
- mi.ptszName = LPGENT("&Block");
- mi.pszService = service;
- mi.pszContactOwner = m_szModuleName;
- hBlockMenuItem = Menu_AddContactMenuItem(&mi);
+ mi.name.a = LPGEN("&Block");
+ mi.pszService = GGS_BLOCKUSER;
+ hBlockMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, gg_prebuildcontactmenu);
}
@@ -267,7 +261,7 @@ void GGPROTO::menus_init() HGENMENU hGCRoot, hCLRoot, hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = 500090000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = iconList[0].hIcolib;
@@ -277,12 +271,12 @@ void GGPROTO::menus_init() mi.hParentMenu = hRoot;
mi.flags = CMIF_TCHAR;
- mi.ptszName = LPGENT("Conference");
+ mi.name.t = LPGENT("Conference");
mi.position = 200001;
mi.icolibItem = iconList[14].hIcolib;
hGCRoot = Menu_AddProtoMenuItem(&mi);
- mi.ptszName = LPGENT("Contact list");
+ mi.name.t = LPGENT("Contact list");
mi.position = 200002;
mi.icolibItem = iconList[7].hIcolib;
hCLRoot = Menu_AddProtoMenuItem(&mi);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 76f99f114f..abecfa9c4a 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -68,7 +68,7 @@ void GGPROTO::gc_menus_init(HGENMENU hRoot) CreateProtoService(GGS_OPEN_CONF, &GGPROTO::gc_openconf);
mi.position = 2000050001;
mi.icolibItem = iconList[14].hIcolib;
- mi.ptszName = LPGENT("Open &conference...");
+ mi.name.t = LPGENT("Open &conference...");
mi.pszService = service;
hMainMenu[0] = Menu_AddProtoMenuItem(&mi);
@@ -77,7 +77,7 @@ void GGPROTO::gc_menus_init(HGENMENU hRoot) CreateProtoService(GGS_CLEAR_IGNORED, &GGPROTO::gc_clearignored);
mi.position = 2000050002;
mi.icolibItem = iconList[15].hIcolib;
- mi.ptszName = LPGENT("&Clear ignored conferences");
+ mi.name.t = LPGENT("&Clear ignored conferences");
mi.pszService = service;
hMainMenu[1] = Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 753bf9b454..6591861af4 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -68,19 +68,13 @@ int gg_img_remove(GGIMAGEDLGDATA *dat); int GGPROTO::img_init()
{
- char service[64];
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_SENDIMAGE);
- CreateProtoService(GGS_SENDIMAGE, &GGPROTO::img_sendimg);
-
// Send image contact menu item
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_TCHAR;
mi.position = -2000010000;
mi.icolibItem = iconList[11].hIcolib;
- mi.ptszName = LPGENT("&Image");
- mi.pszService = service;
- mi.pszContactOwner = m_szModuleName;
- hImageMenuItem = Menu_AddContactMenuItem(&mi);
+ mi.name.a = LPGEN("&Image");
+ mi.pszService = GGS_SENDIMAGE;
+ hImageMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
// Receive image
CreateProtoService(GGS_RECVIMAGE, &GGPROTO::img_recvimage);
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index b9c925d1d4..1c8b286dee 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -524,7 +524,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mi.hParentMenu = hRoot;
mi.position = 2000500001;
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("Import List From &Server");
+ mi.name.t = LPGENT("Import List From &Server");
mi.pszService = service;
hMainMenu[2] = Menu_AddProtoMenuItem(&mi);
@@ -534,7 +534,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mi.position = 2000500002;
mi.icolibItem = iconList[2].hIcolib;
- mi.ptszName = LPGENT("Import List From &Text File...");
+ mi.name.t = LPGENT("Import List From &Text File...");
mi.pszService = service;
hMainMenu[3] = Menu_AddProtoMenuItem(&mi);
@@ -544,7 +544,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mi.position = 2000500003;
mi.icolibItem = iconList[3].hIcolib;
- mi.ptszName = LPGENT("&Remove List From Server");
+ mi.name.t = LPGENT("&Remove List From Server");
mi.pszService = service;
hMainMenu[4] = Menu_AddProtoMenuItem(&mi);
@@ -554,7 +554,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mi.position = 2005000001;
mi.icolibItem = iconList[4].hIcolib;
- mi.ptszName = LPGENT("Export List To &Server");
+ mi.name.t = LPGENT("Export List To &Server");
mi.pszService = service;
hMainMenu[5] = Menu_AddProtoMenuItem(&mi);
@@ -564,7 +564,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mi.position = 2005000002;
mi.icolibItem = iconList[5].hIcolib;
- mi.ptszName = LPGENT("Export List To &Text File...");
+ mi.name.t = LPGENT("Export List To &Text File...");
mi.pszService = service;
hMainMenu[6] = Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 1b19989681..748c8751de 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -425,7 +425,7 @@ void GGPROTO::sessions_menus_init(HGENMENU hRoot) mi.hParentMenu = hRoot;
mi.position = (hMenuRoot) ? 2050000001 : 200003;
mi.icolibItem = iconList[16].hIcolib;
- mi.ptszName = LPGENT("Concurrent &sessions");
+ mi.name.t = LPGENT("Concurrent &sessions");
mi.pszService = service;
Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index ef3635738c..5dab9c9973 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -32,7 +32,7 @@ void CIrcProto::InitMainMenus(void) HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
// Root popupmenuitem
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = -1999901010;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_MAIN);
@@ -46,7 +46,7 @@ void CIrcProto::InitMainMenus(void) }
mi.flags = 0;
- mi.pszName = LPGEN("&Quick connect");
+ mi.name.a = LPGEN("&Quick connect");
mi.icolibItem = GetIconHandle(IDI_QUICK);
mir_strcpy(d, IRC_QUICKCONNECT);
mi.position = 201001;
@@ -55,26 +55,26 @@ void CIrcProto::InitMainMenus(void) if (m_iStatus != ID_STATUS_OFFLINE) mi.flags |= CMIF_GRAYED;
- mi.pszName = LPGEN("&Join channel");
+ mi.name.a = LPGEN("&Join channel");
mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);//GetIconHandle(IDI_JOIN);
mir_strcpy(d, IRC_JOINCHANNEL);
mi.position = 201002;
hMenuJoin = Menu_AddProtoMenuItem(&mi);
- mi.pszName = LPGEN("&Change your nickname");
+ mi.name.a = LPGEN("&Change your nickname");
mi.icolibItem = GetIconHandle(IDI_RENAME);
mir_strcpy(d, IRC_CHANGENICK);
mi.position = 201003;
hMenuNick = Menu_AddProtoMenuItem(&mi);
- mi.pszName = LPGEN("Show the &list of available channels");
+ mi.name.a = LPGEN("Show the &list of available channels");
mi.icolibItem = GetIconHandle(IDI_LIST);
mir_strcpy(d, IRC_SHOWLIST);
mi.position = 201004;
hMenuList = Menu_AddProtoMenuItem(&mi);
if (m_useServer) mi.flags &= ~CMIF_GRAYED;
- mi.pszName = LPGEN("&Show the server window");
+ mi.name.a = LPGEN("&Show the server window");
mi.icolibItem = GetIconHandle(IDI_SERVER);
mir_strcpy(d, IRC_SHOWSERVER);
mi.position = 201005;
@@ -142,28 +142,28 @@ void InitContactMenus(void) CLISTMENUITEM mi = { 0 };
mi.pszService = temp;
- mi.pszName = LPGEN("Channel &settings");
+ mi.name.a = LPGEN("Channel &settings");
mi.icolibItem = GetIconHandle(IDI_MANAGER);
mir_strcpy(d, IRC_UM_CHANSETTINGS);
mi.position = 500090002;
hUMenuChanSettings = Menu_AddContactMenuItem(&mi);
hMenuChanSettings = CreateServiceFunction(temp, IrcMenuChanSettings);
- mi.pszName = LPGEN("&WhoIs info");
+ mi.name.a = LPGEN("&WhoIs info");
mi.icolibItem = GetIconHandle(IDI_WHOIS);
mir_strcpy(d, IRC_UM_WHOIS);
mi.position = 500090001;
hUMenuWhois = Menu_AddContactMenuItem(&mi);
hMenuWhois = CreateServiceFunction(temp, IrcMenuWhois);
- mi.pszName = LPGEN("Di&sconnect");
+ mi.name.a = LPGEN("Di&sconnect");
mi.icolibItem = GetIconHandle(IDI_DELETE);
mir_strcpy(d, IRC_UM_DISCONNECT);
mi.position = 500090001;
hUMenuDisconnect = Menu_AddContactMenuItem(&mi);
hMenuDisconnect = CreateServiceFunction(temp, IrcMenuDisconnect);
- mi.pszName = LPGEN("&Add to ignore list");
+ mi.name.a = LPGEN("&Add to ignore list");
mi.icolibItem = GetIconHandle(IDI_BLOCK);
mir_strcpy(d, IRC_UM_IGNORE);
mi.position = 500090002;
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index a075dc3cea..6de74333e1 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -117,7 +117,7 @@ void g_MenuInit(void) // "Request authorization"
mir_strcpy(pszDest, MS_REQ_AUTH); CreateServiceFunction(str, IcqMenuHandleRequestAuth );
- mi.pszName = LPGEN("Request authorization");
+ mi.name.a = LPGEN("Request authorization");
mi.position = 1000030000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
g_hContactMenuItems[ICMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
@@ -125,7 +125,7 @@ void g_MenuInit(void) // "Grant authorization"
mir_strcpy(pszDest, MS_GRANT_AUTH); CreateServiceFunction(str, IcqMenuHandleGrantAuth);
- mi.pszName = LPGEN("Grant authorization");
+ mi.name.a = LPGEN("Grant authorization");
mi.position = 1000029999;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
g_hContactMenuItems[ICMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
@@ -133,7 +133,7 @@ void g_MenuInit(void) // "Revoke authorization"
mir_strcpy(pszDest, MS_REVOKE_AUTH); CreateServiceFunction(str, IcqMenuHandleRevokeAuth);
- mi.pszName = LPGEN("Revoke authorization");
+ mi.name.a = LPGEN("Revoke authorization");
mi.position = 1000029998;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
g_hContactMenuItems[ICMI_AUTH_REVOKE] = Menu_AddContactMenuItem(&mi);
@@ -141,7 +141,7 @@ void g_MenuInit(void) // "Add to server list"
mir_strcpy(pszDest, MS_ICQ_ADDSERVCONTACT); CreateServiceFunction(str, IcqMenuHandleAddServContact);
- mi.pszName = LPGEN("Add to server list");
+ mi.name.a = LPGEN("Add to server list");
mi.position = -2049999999;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
g_hContactMenuItems[ICMI_ADD_TO_SERVLIST] = Menu_AddContactMenuItem(&mi);
@@ -149,7 +149,7 @@ void g_MenuInit(void) // "Show custom status details"
mir_strcpy(pszDest, MS_XSTATUS_SHOWDETAILS); CreateServiceFunction(str, IcqMenuHandleXStatusDetails);
- mi.pszName = LPGEN("Show custom status details");
+ mi.name.a = LPGEN("Show custom status details");
mi.position = -2000004999;
mi.icolibItem = 0;
g_hContactMenuItems[ICMI_XSTATUS_DETAILS] = Menu_AddContactMenuItem(&mi);
@@ -157,7 +157,7 @@ void g_MenuInit(void) // "Open ICQ profile"
mir_strcpy(pszDest, MS_OPEN_PROFILE); CreateServiceFunction(str, IcqMenuHandleOpenProfile);
- mi.pszName = LPGEN("Open ICQ profile");
+ mi.name.a = LPGEN("Open ICQ profile");
mi.position = 1000029997;
g_hContactMenuItems[ICMI_OPEN_PROFILE] = Menu_AddContactMenuItem(&mi);
}
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 28cd0a0d7d..122d26816a 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -837,7 +837,6 @@ INT_PTR CIcqProto::menuXStatus(WPARAM, LPARAM, LPARAM fParam) void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
{
size_t len = mir_strlen(m_szModuleName);
- char srvFce[MAX_PATH + 64];
int bXStatusMenuBuilt = 0;
BYTE bXStatus = getContactXStatus(NULL);
@@ -861,23 +860,22 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) }
for (int i = 0; i <= XSTATUS_COUNT; i++) {
- mir_snprintf(srvFce, _countof(srvFce), "%s/menuXStatus%d", m_szModuleName, i);
-
+ char srvFce[MAX_PATH + 64];
+ mir_snprintf(srvFce, _countof(srvFce), "/menuXStatus%d", i);
mi.position++;
if (!i)
- bXStatusMenuBuilt = ServiceExists(srvFce);
+ bXStatusMenuBuilt = ProtoServiceExists(m_szModuleName, srvFce);
if (!bXStatusMenuBuilt)
CreateProtoServiceParam(srvFce+len, &CIcqProto::menuXStatus, i);
mi.flags = (bXStatus == i ? CMIF_CHECKED : 0);
mi.icolibItem = i ? hXStatusIcons[i-1] : NULL;
- mi.pszName = i ? (char*)nameXStatus[i-1] : (char *)LPGEN("None");
+ mi.name.a = i ? (char*)nameXStatus[i-1] : (char *)LPGEN("None");
mi.pszService = srvFce;
- mi.pszContactOwner = m_szModuleName;
- hXStatusItems[i] = Menu_AddStatusMenuItem(&mi);
+ hXStatusItems[i] = Menu_AddStatusMenuItem(&mi, m_szModuleName);
Menu_ShowItem(hXStatusItems[i], !(m_bHideXStatusUI || m_bHideXStatusMenu));
}
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 7ef067e026..7124ed79bd 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -201,7 +201,7 @@ void g_MenuInit(void) CLISTMENUITEM mi = { 0 };
// "Request authorization"
- mi.pszName = LPGEN("Request authorization");
+ mi.name.a = LPGEN("Request authorization");
mi.position = -2000001000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
mi.pszService = "Jabber/ReqAuth";
@@ -210,7 +210,7 @@ void g_MenuInit(void) // "Grant authorization"
mi.pszService = "Jabber/GrantAuth";
- mi.pszName = LPGEN("Grant authorization");
+ mi.name.a = LPGEN("Grant authorization");
mi.position = -2000001001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
g_hMenuGrantAuth = Menu_AddContactMenuItem(&mi);
@@ -218,7 +218,7 @@ void g_MenuInit(void) // Revoke auth
mi.pszService = "Jabber/RevokeAuth";
- mi.pszName = LPGEN("Revoke authorization");
+ mi.name.a = LPGEN("Revoke authorization");
mi.position = -2000001002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
g_hMenuRevokeAuth = Menu_AddContactMenuItem(&mi);
@@ -226,7 +226,7 @@ void g_MenuInit(void) // "Convert Chat/Contact"
mi.pszService = "Jabber/ConvertChatContact";
- mi.pszName = LPGEN("Convert");
+ mi.name.a = LPGEN("Convert");
mi.position = -1999901004;
mi.icolibItem = g_GetIconHandle(IDI_USER2ROOM);
g_hMenuConvert = Menu_AddContactMenuItem(&mi);
@@ -234,7 +234,7 @@ void g_MenuInit(void) // "Add to roster"
mi.pszService = "Jabber/AddToRoster";
- mi.pszName = LPGEN("Add to roster");
+ mi.name.a = LPGEN("Add to roster");
mi.position = -1999901005;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
g_hMenuRosterAdd = Menu_AddContactMenuItem(&mi);
@@ -242,7 +242,7 @@ void g_MenuInit(void) // "Add to Bookmarks"
mi.pszService = "Jabber/AddToBookmarks";
- mi.pszName = LPGEN("Add to Bookmarks");
+ mi.name.a = LPGEN("Add to Bookmarks");
mi.position = -1999901006;
mi.icolibItem = g_GetIconHandle(IDI_BOOKMARKS);
g_hMenuAddBookmark = Menu_AddContactMenuItem(&mi);
@@ -250,7 +250,7 @@ void g_MenuInit(void) // Login/logout
mi.pszService = "Jabber/TransportLogin";
- mi.pszName = LPGEN("Login/logout");
+ mi.name.a = LPGEN("Login/logout");
mi.position = -1999901007;
mi.icolibItem = g_GetIconHandle(IDI_LOGIN);
g_hMenuLogin = Menu_AddContactMenuItem(&mi);
@@ -258,7 +258,7 @@ void g_MenuInit(void) // Retrieve nicks
mi.pszService = "Jabber/TransportGetNicks";
- mi.pszName = LPGEN("Resolve nicks");
+ mi.name.a = LPGEN("Resolve nicks");
mi.position = -1999901008;
mi.icolibItem = g_GetIconHandle(IDI_REFRESH);
g_hMenuRefresh = Menu_AddContactMenuItem(&mi);
@@ -266,7 +266,7 @@ void g_MenuInit(void) // Run Commands
mi.pszService = "Jabber/RunCommands";
- mi.pszName = LPGEN("Commands");
+ mi.name.a = LPGEN("Commands");
mi.position = -1999901009;
mi.icolibItem = g_GetIconHandle(IDI_COMMAND);
g_hMenuCommands = Menu_AddContactMenuItem(&mi);
@@ -274,7 +274,7 @@ void g_MenuInit(void) // Send Note
mi.pszService = "Jabber/SendNote";
- mi.pszName = LPGEN("Send Note");
+ mi.name.a = LPGEN("Send Note");
mi.position = -1999901010;
mi.icolibItem = g_GetIconHandle(IDI_SEND_NOTE);
g_hMenuSendNote = Menu_AddContactMenuItem(&mi);
@@ -282,7 +282,7 @@ void g_MenuInit(void) // Direct Presence
mi.pszService = "Jabber/DirectPresenceDummySvc";
- mi.pszName = LPGEN("Send Presence");
+ mi.name.a = LPGEN("Send Presence");
mi.position = -1999901011;
mi.icolibItem = g_GetIconHandle(IDI_NOTES);
g_hMenuDirectPresence[0] = Menu_AddContactMenuItem(&mi);
@@ -292,7 +292,7 @@ void g_MenuInit(void) char buf[] = "Jabber/DirectPresenceX";
buf[_countof(buf) - 2] = '0' + i;
mi.pszService = buf;
- mi.ptszName = pcli->pfnGetStatusModeDescription(PresenceModeArray[i].mode, 0);
+ mi.name.t = pcli->pfnGetStatusModeDescription(PresenceModeArray[i].mode, 0);
mi.position = -1999901000;
mi.hParentMenu = g_hMenuDirectPresence[0];
mi.icolibItem = Skin_LoadIcon(PresenceModeArray[i].icon);
@@ -304,13 +304,13 @@ void g_MenuInit(void) // Resource selector
mi.pszService = "Jabber/ResourceSelectorDummySvc";
- mi.pszName = LPGEN("Jabber Resource");
+ mi.name.a = LPGEN("Jabber Resource");
mi.position = -1999901011;
mi.icolibItem = g_GetIconHandle(IDI_JABBER);
g_hMenuResourcesRoot = Menu_AddContactMenuItem(&mi);
mi.pszService = "Jabber/UseResource_last";
- mi.pszName = LPGEN("Last Active");
+ mi.name.a = LPGEN("Last Active");
mi.position = -1999901000;
mi.hParentMenu = g_hMenuResourcesRoot;
mi.icolibItem = g_GetIconHandle(IDI_JABBER);
@@ -318,7 +318,7 @@ void g_MenuInit(void) CreateServiceFunctionParam(mi.pszService, JabberMenuHandleResource, MENUITEM_LASTSEEN);
mi.pszService = "Jabber/UseResource_server";
- mi.pszName = LPGEN("Server's Choice");
+ mi.name.a = LPGEN("Server's Choice");
mi.position = -1999901000;
mi.icolibItem = g_GetIconHandle(IDI_NODE_SERVER);
g_hMenuResourcesServer = Menu_AddContactMenuItem(&mi);
@@ -416,23 +416,18 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) }
char text[256];
- mir_strcpy(text, m_szModuleName);
- size_t nModuleNameLength = mir_strlen(text);
- char* tDest = text + nModuleNameLength;
-
CLISTMENUITEM mi = { 0 };
mi.pszService = text;
- mi.pszContactOwner = m_szModuleName;
CMString szTmp;
for (int i = 0; i < nMenuResourceItemsNew; i++) {
- mir_snprintf(tDest, _countof(text) - nModuleNameLength, "/UseResource_%d", i);
+ mir_snprintf(text, _countof(text), "/UseResource_%d", i);
if (i >= m_nMenuResourceItems) {
- CreateProtoServiceParam(tDest, &CJabberProto::OnMenuHandleResource, MENUITEM_RESOURCES + i);
- mi.pszName = "";
+ CreateProtoServiceParam(text, &CJabberProto::OnMenuHandleResource, MENUITEM_RESOURCES + i);
+ mi.name.a = "";
mi.position = i;
mi.hParentMenu = g_hMenuResourcesRoot;
- m_phMenuResourceItems[i] = Menu_AddContactMenuItem(&mi);
+ m_phMenuResourceItems[i] = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
if (i < item->arResources.getCount()) {
pResourceStatus r(item->arResources[i]);
@@ -591,7 +586,7 @@ void CJabberProto::MenuInit() HGENMENU hJabberRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hJabberRoot == NULL) {
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = m_hProtoIcon;
@@ -608,13 +603,13 @@ void CJabberProto::MenuInit() mir_strcpy(tDest, "/Bookmarks");
mi.flags = 0;
mi.hParentMenu = hJabberRoot;
- mi.pszName = LPGEN("Bookmarks");
+ mi.name.a = LPGEN("Bookmarks");
mi.position = 200001;
mi.icolibItem = GetIconHandle(IDI_BOOKMARKS);
m_hMenuBookmarks = Menu_AddProtoMenuItem(&mi);
// "Services..."
- mi.pszName = LPGEN("Services...");
+ mi.name.a = LPGEN("Services...");
mir_strcpy(tDest, "/Services");
mi.position = 200003;
mi.icolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY);
@@ -623,7 +618,7 @@ void CJabberProto::MenuInit() // "Service Discovery..."
CreateProtoService("/ServiceDiscovery", &CJabberProto::OnMenuHandleServiceDiscovery);
mir_strcpy(tDest, "/ServiceDiscovery");
- mi.pszName = LPGEN("Service Discovery");
+ mi.name.a = LPGEN("Service Discovery");
mi.position = 2000050001;
mi.icolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY);
mi.hParentMenu = hMenuServicesRoot;
@@ -631,28 +626,28 @@ void CJabberProto::MenuInit() CreateProtoService("/SD/MyTransports", &CJabberProto::OnMenuHandleServiceDiscoveryMyTransports);
mir_strcpy(tDest, "/SD/MyTransports");
- mi.pszName = LPGEN("Registered Transports");
+ mi.name.a = LPGEN("Registered Transports");
mi.position = 2000050003;
mi.icolibItem = GetIconHandle(IDI_TRANSPORTL);
m_hMenuSDMyTransports = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/SD/Transports", &CJabberProto::OnMenuHandleServiceDiscoveryTransports);
mir_strcpy(tDest, "/SD/Transports");
- mi.pszName = LPGEN("Local Server Transports");
+ mi.name.a = LPGEN("Local Server Transports");
mi.position = 2000050004;
mi.icolibItem = GetIconHandle(IDI_TRANSPORT);
m_hMenuSDTransports = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/SD/Conferences", &CJabberProto::OnMenuHandleServiceDiscoveryConferences);
mir_strcpy(tDest, "/SD/Conferences");
- mi.pszName = LPGEN("Browse chatrooms");
+ mi.name.a = LPGEN("Browse chatrooms");
mi.position = 2000050005;
mi.icolibItem = GetIconHandle(IDI_GROUP);
m_hMenuSDConferences = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/Groupchat", &CJabberProto::OnMenuHandleJoinGroupchat);
mir_strcpy(tDest, "/Groupchat");
- mi.pszName = LPGEN("Create/Join group chat");
+ mi.name.a = LPGEN("Create/Join group chat");
mi.position = 2000050006;
mi.icolibItem = GetIconHandle(IDI_GROUP);
m_hMenuGroupchat = Menu_AddProtoMenuItem(&mi);
@@ -660,7 +655,7 @@ void CJabberProto::MenuInit() // "Change Password..."
CreateProtoService("/ChangePassword", &CJabberProto::OnMenuHandleChangePassword);
mir_strcpy(tDest, "/ChangePassword");
- mi.pszName = LPGEN("Change Password");
+ mi.name.a = LPGEN("Change Password");
mi.position = 2000050007;
mi.icolibItem = GetIconHandle(IDI_KEYS);
m_hMenuChangePassword = Menu_AddProtoMenuItem(&mi);
@@ -668,7 +663,7 @@ void CJabberProto::MenuInit() // "Roster editor"
CreateProtoService("/RosterEditor", &CJabberProto::OnMenuHandleRosterControl);
mir_strcpy(tDest, "/RosterEditor");
- mi.pszName = LPGEN("Roster editor");
+ mi.name.a = LPGEN("Roster editor");
mi.position = 2000050009;
mi.icolibItem = GetIconHandle(IDI_AGENTS);
m_hMenuRosterControl = Menu_AddProtoMenuItem(&mi);
@@ -676,14 +671,14 @@ void CJabberProto::MenuInit() // "XML Console"
CreateProtoService("/XMLConsole", &CJabberProto::OnMenuHandleConsole);
mir_strcpy(tDest, "/XMLConsole");
- mi.pszName = LPGEN("XML Console");
+ mi.name.a = LPGEN("XML Console");
mi.position = 2000050010;
mi.icolibItem = GetIconHandle(IDI_CONSOLE);
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/Notes", &CJabberProto::OnMenuHandleNotes);
mir_strcpy(tDest, "/Notes");
- mi.pszName = LPGEN("Notes");
+ mi.name.a = LPGEN("Notes");
mi.position = 2000050011;
mi.icolibItem = GetIconHandle(IDI_NOTES);
m_hMenuNotes = Menu_AddProtoMenuItem(&mi);
@@ -699,24 +694,23 @@ void CJabberProto::MenuInit() m_priorityMenuValSet = false;
mi.position = 200006;
- mi.pszContactOwner = m_szModuleName;
mi.hParentMenu = hJabberRoot;
- mi.pszName = LPGEN("Resource priority");
+ mi.name.a = LPGEN("Resource priority");
mi.flags = CMIF_HIDDEN;
m_hMenuPriorityRoot = Menu_AddProtoMenuItem(&mi);
TCHAR szName[128];
- char srvFce[MAX_PATH + 64], *svcName = srvFce + mir_strlen(m_szModuleName);
+ char srvFce[MAX_PATH + 64];
mi.pszService = srvFce;
- mi.ptszName = szName;
+ mi.name.t = szName;
mi.position = 2000040000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.hParentMenu = m_hMenuPriorityRoot;
- mir_snprintf(srvFce, _countof(srvFce), "%s/menuSetPriority/0", m_szModuleName);
- bool needServices = !ServiceExists(srvFce);
+ mir_snprintf(srvFce, _countof(srvFce), "/menuSetPriority/%d", 0);
+ bool needServices = !ProtoServiceExists(m_szModuleName, srvFce);
if (needServices)
- CreateProtoServiceParam(svcName, &CJabberProto::OnMenuSetPriority, 0);
+ CreateProtoServiceParam(srvFce, &CJabberProto::OnMenuSetPriority, 0);
int steps[] = { 10, 5, 1, 0, -1, -5, -10 };
for (int i = 0; i < _countof(steps); i++) {
@@ -725,7 +719,7 @@ void CJabberProto::MenuInit() continue;
}
- mir_snprintf(srvFce, _countof(srvFce), "%s/menuSetPriority/%d", m_szModuleName, steps[i]);
+ mir_snprintf(srvFce, _countof(srvFce), "/menuSetPriority/%d", steps[i]);
if (steps[i] > 0) {
mir_sntprintf(szName, TranslateT("Increase priority by %d"), steps[i]);
mi.icolibItem = GetIconHandle(IDI_ARROW_UP);
@@ -736,10 +730,10 @@ void CJabberProto::MenuInit() }
if (needServices)
- CreateProtoServiceParam(svcName, &CJabberProto::OnMenuSetPriority, (LPARAM)steps[i]);
+ CreateProtoServiceParam(srvFce, &CJabberProto::OnMenuSetPriority, (LPARAM)steps[i]);
mi.position++;
- Menu_AddProtoMenuItem(&mi);
+ Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
UpdatePriorityMenu((short)getWord("Priority", 0));
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index c0094d836e..27b686607f 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2092,23 +2092,20 @@ void CJabberProto::BuildPrivacyMenu() {
CLISTMENUITEM mi = { 0 };
mi.position = 200005;
- mi.pszContactOwner = m_szModuleName;
mi.icolibItem = GetIconHandle(IDI_AGENTS);
mi.flags = CMIF_HIDDEN;
- mi.pszName = LPGEN("Privacy Lists");
+ mi.name.a = LPGEN("Privacy Lists");
mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
m_hPrivacyMenuRoot = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/PrivacyLists", &CJabberProto::OnMenuHandlePrivacyLists);
- char srvFce[MAX_PATH + 64];
- mir_snprintf(srvFce, _countof(srvFce), "%s/PrivacyLists", m_szModuleName);
- mi.pszService = srvFce;
+ mi.pszService = "/PrivacyLists";
mi.position = 3000040000;
mi.flags = CMIF_TCHAR;
mi.icolibItem = GetIconHandle(IDI_PRIVACY_LISTS);
- mi.ptszName = LPGENT("List Editor...");
+ mi.name.t = LPGENT("List Editor...");
mi.hParentMenu = m_hPrivacyMenuRoot;
- Menu_AddProtoMenuItem(&mi);
+ Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld)
@@ -2137,7 +2134,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) }
mi.position++;
mi.icolibItem = Skin_GetIconHandle(m_privacyListManager.GetActiveListName() ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
- mi.ptszName = LPGENT("<none>");
+ mi.name.t = LPGENT("<none>");
m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi));
for (CPrivacyList *pList = m_privacyListManager.GetFirstList(); pList; pList = pList->GetNext()) {
@@ -2152,7 +2149,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) mi.position++;
mi.icolibItem = Skin_GetIconHandle(
mir_tstrcmp(m_privacyListManager.GetActiveListName(), pList->GetListName()) ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
- mi.ptszName = pList->GetListName();
+ mi.name.t = pList->GetListName();
m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi));
}
}
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 85c9464cf6..7e1cd47ed0 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -471,7 +471,7 @@ void CPepGuiService::RebuildMenu() mi.position = 200010;
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
mi.icolibItem = m_hIcolibItem;
- mi.ptszName = m_szText ? m_szText : _T("<advanced status slot>");
+ mi.name.t = m_szText ? m_szText : _T("<advanced status slot>");
m_hMenuItem = Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index a8ad1ff78d..2624a00a3c 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -277,9 +277,7 @@ int CMraProto::MraRebuildContactMenu(WPARAM hContact, LPARAM) int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM)
{
- CHAR szServiceFunction[MAX_PATH * 2], *pszServiceFunctionName, szValueName[MAX_PATH];
- strncpy(szServiceFunction, m_szModuleName, sizeof(szServiceFunction));
- pszServiceFunctionName = szServiceFunction + mir_strlen(m_szModuleName);
+ CHAR szServiceFunction[MAX_PATH], szValueName[MAX_PATH];
TCHAR szItem[MAX_PATH + 64];
mir_sntprintf(szItem, _countof(szItem), _T("%s Custom Status"), m_tszUserName);
@@ -289,7 +287,6 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) mi.hParentMenu = Menu_CreateRoot(MO_STATUS, szItem, 500085000);
mi.flags = CMIF_UNICODE;
mi.pszService = szServiceFunction;
- mi.pszContactOwner = m_szModuleName;
CMStringW szStatusTitle;
@@ -297,22 +294,22 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) if (getByte(NULL, "xStatusShowAll", MRA_DEFAULT_SHOW_ALL_XSTATUSES))
dwCount = MRA_XSTATUS_COUNT;
for (DWORD i = 0; i < dwCount; i ++) {
- mir_snprintf(pszServiceFunctionName, 100, "/menuXStatus%ld", i);
+ mir_snprintf(szServiceFunction, _countof(szServiceFunction), "/menuXStatus%ld", i);
mi.position ++;
if (i) {
mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldName", i);
if (mraGetStringW(NULL, szValueName, szStatusTitle))
- mi.ptszName = (TCHAR*)szStatusTitle.c_str();
+ mi.name.t = (TCHAR*)szStatusTitle.c_str();
else
- mi.ptszName = (TCHAR*)lpcszXStatusNameDef[i];
+ mi.name.t = (TCHAR*)lpcszXStatusNameDef[i];
mi.icolibItem = hXStatusAdvancedStatusIcons[i];
}
else {
- mi.ptszName = (TCHAR*)lpcszXStatusNameDef[i];
- mi.hIcon = NULL;
+ mi.name.t = (TCHAR*)lpcszXStatusNameDef[i];
+ mi.icolibItem = NULL;
}
- hXStatusMenuItems[i] = Menu_AddStatusMenuItem(&mi);
+ hXStatusMenuItems[i] = Menu_AddStatusMenuItem(&mi, m_szModuleName);
}
return 0;
}
@@ -325,20 +322,18 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI return NULL;
char szServiceFunction[MAX_PATH];
- strncpy(szServiceFunction, m_szModuleName, sizeof(szServiceFunction));
- char *pszServiceFunctionName = szServiceFunction + mir_strlen(m_szModuleName);
CLISTMENUITEM mi = { 0 };
- HGENMENU hRootMenu, (*fnAddFunc)(CLISTMENUITEM*);
+ HGENMENU hRootMenu, (__stdcall *fnAddFunc)(CLISTMENUITEM*, const char*, int);
if (bIsMain) {
fnAddFunc = Menu_AddProtoMenuItem;
hRootMenu = Menu_GetProtocolRoot(m_szModuleName);
if (hRootMenu == NULL) {
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.hIcon = g_hMainIcon;
+ mi.icolibItem = g_hMainIcon;
hRootMenu = Menu_AddProtoMenuItem(&mi);
}
@@ -351,19 +346,19 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI }
mi.flags = 0;
- mi.pszName = LPGEN("Services...");
- mi.hIcon = g_hMainIcon;
- hRootMenu = fnAddFunc(&mi);
+ mi.name.a = LPGEN("Services...");
+ mi.icolibItem = g_hMainIcon;
+ hRootMenu = fnAddFunc(&mi, m_szModuleName, hLangpack);
mi.hParentMenu = hRootMenu;
mi.pszService = szServiceFunction;
for (size_t i = 0; i < dwCount; i++) {
- mir_strcpy(pszServiceFunctionName, pgdiItems[i].szName);
+ mi.pszService = pgdiItems[i].szName;
mi.position = int(lPosition + i);
mi.icolibItem = pgdiItems[i].hIcolib;
- mi.pszName = pgdiItems[i].szDescr;
- hResult[i] = fnAddFunc(&mi);
+ mi.name.a = pgdiItems[i].szDescr;
+ hResult[i] = fnAddFunc(&mi, m_szModuleName, hLangpack);
Menu_ConfigureItem(hResult[i], MCI_OPT_EXECPARAM, lPopupPosition);
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 2a43ea284b..a70494628c 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -279,7 +279,7 @@ void CMsnProto::MsnInitMainMenu(void) mi.position = 500085000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_MSN);
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
@@ -296,7 +296,7 @@ void CMsnProto::MsnInitMainMenu(void) CreateProtoService(MS_SET_NICKNAME_UI, &CMsnProto::SetNicknameUI);
mi.position = 201001;
mi.icolibItem = GetIconHandle(IDI_MSN);
- mi.pszName = LPGEN("Set &Nickname");
+ mi.name.a = LPGEN("Set &Nickname");
menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
#endif
@@ -304,28 +304,28 @@ void CMsnProto::MsnInitMainMenu(void) CreateProtoService(MSN_INVITE, &CMsnProto::MsnInviteCommand);
mi.position = 201002;
mi.icolibItem = GetIconHandle(IDI_INVITE);
- mi.pszName = LPGEN("Create &Chat");
+ mi.name.a = LPGEN("Create &Chat");
menuItemsMain[0] = Menu_AddProtoMenuItem(&mi);
mir_strcpy(tDest, MS_GOTO_INBOX);
CreateProtoService(MS_GOTO_INBOX, &CMsnProto::MsnGotoInbox);
mi.position = 201003;
mi.icolibItem = GetIconHandle(IDI_INBOX);
- mi.pszName = LPGEN("Display &Hotmail Inbox");
+ mi.name.a = LPGEN("Display &Hotmail Inbox");
menuItemsMain[1] = Menu_AddProtoMenuItem(&mi);
mir_strcpy(tDest, MS_EDIT_PROFILE);
CreateProtoService(MS_EDIT_PROFILE, &CMsnProto::MsnEditProfile);
mi.position = 201004;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
- mi.pszName = LPGEN("View &Profile");
+ mi.name.a = LPGEN("View &Profile");
menuItemsMain[2] = Menu_AddProtoMenuItem(&mi);
mir_strcpy(tDest, MS_EDIT_ALERTS);
CreateProtoService(MS_EDIT_ALERTS, &CMsnProto::MsnSetupAlerts);
mi.position = 201004;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
- mi.pszName = LPGEN("Setup Live &Alerts");
+ mi.name.a = LPGEN("Setup Live &Alerts");
menuItemsMain[3] = Menu_AddProtoMenuItem(&mi);
MSN_EnableMenuItems(m_iStatus >= ID_STATUS_ONLINE);
@@ -410,14 +410,14 @@ void MSN_InitContactMenu(void) hBlockCom = CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
mi.position = -500050000;
mi.icolibItem = GetIconHandle(IDI_MSNBLOCK);
- mi.pszName = LPGEN("&Block");
+ mi.name.a = LPGEN("&Block");
hBlockMenuItem = Menu_AddContactMenuItem(&mi);
mir_strcpy(tDest, MSN_VIEW_PROFILE);
hViewProfile = CreateServiceFunction(servicefunction, MsnMenuViewProfile);
mi.position = -500050003;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
- mi.pszName = LPGEN("View &Profile");
+ mi.name.a = LPGEN("View &Profile");
hLiveSpaceMenuItem = Menu_AddContactMenuItem(&mi);
#ifdef OBSOLETE
@@ -426,7 +426,7 @@ void MSN_InitContactMenu(void) mi.flags = CMIF_NOTOFFLINE;
mi.position = -500050002;
mi.icolibItem = GetIconHandle(IDI_NETMEETING);
- mi.pszName = LPGEN("&Start Netmeeting");
+ mi.name.a = LPGEN("&Start Netmeeting");
hNetmeetingMenuItem = Menu_AddContactMenuItem(&mi);
#endif
@@ -435,7 +435,7 @@ void MSN_InitContactMenu(void) mi.position = -2000010005;
mi.flags = CMIF_HIDDEN;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
- mi.pszName = LPGEN("Open &Hotmail Inbox");
+ mi.name.a = LPGEN("Open &Hotmail Inbox");
hOpenInboxMenuItem = Menu_AddContactMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MSN_OnPrebuildContactMenu);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 697a829421..3ac009dc6e 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -508,21 +508,16 @@ void CSametimeProto::InitConferenceMenu() CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);
- char service[128];
-
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
- mi.pszContactOwner = m_szModuleName;
- mi.ptszName = LPGENT("Leave conference");
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, MS_SAMETIME_MENULEAVECHAT);
- mi.pszService = service;
+ mi.name.t = LPGENT("Leave conference");
+ mi.pszService = MS_SAMETIME_MENULEAVECHAT;
mi.icolibItem = GetIconHandle(IDI_ICON_LEAVE);
- hLeaveChatMenuItem = Menu_AddContactMenuItem(&mi);
+ hLeaveChatMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mi.ptszName = LPGENT("Start conference");
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, MS_SAMETIME_MENUCREATECHAT);
- mi.pszService = service;
+ mi.name.t = LPGENT("Start conference");
+ mi.pszService = MS_SAMETIME_MENUCREATECHAT;
mi.icolibItem = GetIconHandle(IDI_ICON_INVITE);
hCreateChatMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 9994db0920..96826d75d9 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -560,15 +560,11 @@ void CSametimeProto::InitSessionMenu() CreateProtoService(MS_SAMETIME_MENUANNOUNCESESSION, &CSametimeProto::SessionAnnounce);
- char service[128];
-
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = 2000060000;
- mi.ptszName = LPGENT("Send announcement...");
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, MS_SAMETIME_MENUANNOUNCESESSION);
- mi.pszService = service;
+ mi.name.t = LPGENT("Send announcement...");
+ mi.pszService = MS_SAMETIME_MENUANNOUNCESESSION;
mi.icolibItem = GetIconHandle(IDI_ICON_ANNOUNCE);
- mi.pszContactOwner = m_szModuleName;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, m_szModuleName);
}
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index 0d072a76b3..d3b5f9b130 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -65,7 +65,7 @@ void CSkypeProto::InitMenus() // Request authorization
mi.pszService = MODULE"/RequestAuth";
- mi.ptszName = LPGENT("Request authorization");
+ mi.name.t = LPGENT("Request authorization");
mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
@@ -73,28 +73,28 @@ void CSkypeProto::InitMenus() // Grant authorization
mi.pszService = MODULE"/GrantAuth";
- mi.ptszName = LPGENT("Grant authorization");
+ mi.name.t = LPGENT("Grant authorization");
mi.position = CMI_POSITION + CMI_AUTH_GRANT;
mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT);
ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnGrantAuth>);
mi.pszService = MODULE"/GetHistory";
- mi.ptszName = LPGENT("Get server history");
+ mi.name.t = LPGENT("Get server history");
mi.position = CMI_POSITION + CMI_GETSERVERHISTORY;
mi.icolibItem = GetIconHandle("synchistory");
ContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::GetContactHistory>);
mi.pszService = MODULE"/BlockContact";
- mi.ptszName = LPGENT("Block contact");
+ mi.name.t = LPGENT("Block contact");
mi.position = CMI_POSITION + CMI_BLOCK;
mi.icolibItem = GetIconHandle("user_block");
ContactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::BlockContact>);
mi.pszService = MODULE"/UnblockContact";
- mi.ptszName = LPGENT("Unblock contact");
+ mi.name.t = LPGENT("Unblock contact");
mi.position = CMI_POSITION + CMI_UNBLOCK;
mi.icolibItem = GetIconHandle("user_unblock");
ContactMenuItems[CMI_UNBLOCK] = Menu_AddContactMenuItem(&mi);
@@ -118,7 +118,7 @@ int CSkypeProto::OnInitStatusMenu() HGENMENU hStatusMunuRoot = Menu_GetProtocolRoot(m_szModuleName);
if (!hStatusMunuRoot)
{
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = Skin_GetIconHandle("main");
@@ -137,7 +137,7 @@ int CSkypeProto::OnInitStatusMenu() mir_strcpy(tDest, "/CreateNewChat");
CreateProtoService(tDest, &CSkypeProto::SvcCreateChat);
- mi.ptszName = LPGENT("Create new chat");
+ mi.name.t = LPGENT("Create new chat");
mi.position = SMI_POSITION + SMI_CREATECHAT;
mi.icolibItem = GetIconHandle("conference");
Menu_AddProtoMenuItem(&mi);
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index cf0dbf3917..13fbb9fddd 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -105,7 +105,7 @@ void CSteamProto::OnInitStatusMenu() HGENMENU hSteamRoot = Menu_GetProtocolRoot(m_szModuleName);
if (!hSteamRoot) {
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
hSteamRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
@@ -121,7 +121,7 @@ void CSteamProto::OnInitStatusMenu() // Show block list
mir_strcpy(tDest, "/BlockList");
CreateProtoService(tDest, &CSteamProto::OpenBlockListCommand);
- mi.ptszName = LPGENT("Blocked contacts");
+ mi.name.t = LPGENT("Blocked contacts");
mi.position = 200000 + SMI_BLOCKED_LIST;
//mi.icolibItem = NULL;
Menu_AddProtoMenuItem(&mi);
@@ -138,7 +138,7 @@ void CSteamProto::InitMenus() // "Request authorization"
mi.pszService = MODULE "/AuthRequest";
- mi.ptszName = LPGENT("Request authorization");
+ mi.name.t = LPGENT("Request authorization");
mi.position = -201001000 + CMI_AUTH_REQUEST;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
contactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
@@ -146,7 +146,7 @@ void CSteamProto::InitMenus() // "Block"
mi.pszService = MODULE "/Block";
- mi.ptszName = LPGENT("Block");
+ mi.name.t = LPGENT("Block");
mi.position = -201001001 + CMI_BLOCK;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
contactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
@@ -156,7 +156,7 @@ void CSteamProto::InitMenus() // "Join to game"
mi.pszService = MODULE "/JoinToGame";
- mi.ptszName = LPGENT("Join to game");
+ mi.name.t = LPGENT("Join to game");
mi.position = -200001000 + CMI_JOIN_GAME;
mi.icolibItem = NULL;
contactMenuItems[CMI_JOIN_GAME] = Menu_AddContactMenuItem(&mi);
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index d7334edd89..660967c6c3 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -265,7 +265,6 @@ void TlenProtocol::initMenuItems() char *pSvcName = text + mir_strlen(text);
CLISTMENUITEM mi = { 0 };
- mi.pszContactOwner = m_szModuleName;
mi.hParentMenu = hMenuRoot = Menu_CreateRoot(MO_MAIN, m_tszUserName, -1999901009, GetIconHandle(IDI_TLEN));
mi.pszService = text;
@@ -274,7 +273,7 @@ void TlenProtocol::initMenuItems() // "Multi-User Conference"
mir_strcpy(pSvcName, "/MainMenuMUC");
CreateProtoService(pSvcName, &TlenProtocol::MUCMenuHandleMUC);
- mi.pszName = LPGEN("Multi-User Conference");
+ mi.name.a = LPGEN("Multi-User Conference");
mi.position = 2000050002;
mi.icolibItem = GetIconHandle(IDI_MUC);
mi.pszService = text;
@@ -282,7 +281,7 @@ void TlenProtocol::initMenuItems() mir_strcpy(pSvcName, "/MainMenuInbox");
CreateProtoService(pSvcName, &TlenProtocol::MenuHandleInbox);
- mi.pszName = LPGEN("Tlen Mail");
+ mi.name.a = LPGEN("Tlen Mail");
mi.position = 2000050003;
mi.icolibItem = GetIconHandle(IDI_MAIL);
mi.pszService = text;
@@ -291,44 +290,44 @@ void TlenProtocol::initMenuItems() mi.hParentMenu = NULL;
// "Send picture"
- mir_strcpy(pSvcName, "/SendPicture");
+ mi.pszService = "/SendPicture";
CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleSendPicture);
- mi.pszName = LPGEN("Send picture");
+ mi.name.a = LPGEN("Send picture");
mi.position = -2000019030;
mi.icolibItem = GetIconHandle(IDI_IMAGE);
- hMenuPicture = Menu_AddContactMenuItem(&mi);
+ hMenuPicture = Menu_AddContactMenuItem(&mi, m_szModuleName);
// "Invite to MUC"
- mir_strcpy(pSvcName, "/ContactMenuMUC");
+ mi.pszService = "/ContactMenuMUC";
CreateProtoService(pSvcName, &TlenProtocol::MUCContactMenuHandleMUC);
- mi.pszName = LPGEN("Multi-User Conference");
+ mi.name.a = LPGEN("Multi-User Conference");
mi.position = -2000019020;
mi.icolibItem = GetIconHandle(IDI_MUC);
- hMenuContactMUC = Menu_AddContactMenuItem(&mi);
+ hMenuContactMUC = Menu_AddContactMenuItem(&mi, m_szModuleName);
// "Invite to voice chat"
- mir_strcpy(pSvcName, "/ContactMenuVoice");
+ mi.pszService = "/ContactMenuVoice";
CreateProtoService(pSvcName, &TlenProtocol::VoiceContactMenuHandleVoice);
- mi.pszName = LPGEN("Voice Chat");
+ mi.name.a = LPGEN("Voice Chat");
mi.position = -2000019010;
mi.icolibItem = GetIconHandle(IDI_VOICE);
- hMenuContactVoice = Menu_AddContactMenuItem(&mi);
+ hMenuContactVoice = Menu_AddContactMenuItem(&mi, m_szModuleName);
// "Request authorization"
- mir_strcpy(pSvcName, "/RequestAuth");
+ mi.pszService = "/RequestAuth";
CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleRequestAuth);
- mi.pszName = LPGEN("Request authorization");
+ mi.name.a = LPGEN("Request authorization");
mi.position = -2000001001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
- hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi);
+ hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);
// "Grant authorization"
- mir_strcpy(pSvcName, "/GrantAuth");
+ mi.pszService = "/GrantAuth";
CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleGrantAuth);
- mi.pszName = LPGEN("Grant authorization");
+ mi.name.a = LPGEN("Grant authorization");
mi.position = -2000001000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
- hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi);
+ hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
TlenProtocol* tlenProtoInit(const char* pszProtoName, const TCHAR* tszUserName)
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index 6aab96385e..b023a668ba 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -46,7 +46,7 @@ void CToxProto::InitMenus() // Request authorization
mi.pszService = MODULE"/RequestAuth";
- mi.ptszName = LPGENT("Request authorization");
+ mi.name.t = LPGENT("Request authorization");
mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
@@ -54,7 +54,7 @@ void CToxProto::InitMenus() // Grant authorization
mi.pszService = MODULE"/GrantAuth";
- mi.ptszName = LPGENT("Grant authorization");
+ mi.name.t = LPGENT("Grant authorization");
mi.position = CMI_POSITION + CMI_AUTH_GRANT;
mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT);
ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
@@ -62,7 +62,7 @@ void CToxProto::InitMenus() // Start audio call
mi.pszService = MODULE"/Audio/Call";
- mi.ptszName = LPGENT("Call");
+ mi.name.t = LPGENT("Call");
mi.position = -2000020000 + CMI_AUDIO_CALL;
mi.icolibItem = GetIconHandle("audio_start");
ContactMenuItems[CMI_AUDIO_CALL] = Menu_AddContactMenuItem(&mi);
@@ -86,7 +86,7 @@ int CToxProto::OnInitStatusMenu() HGENMENU hStatusMunuRoot = Menu_GetProtocolRoot(m_szModuleName);
if (!hStatusMunuRoot)
{
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = Skin_GetIconHandle("main");
@@ -99,7 +99,7 @@ int CToxProto::OnInitStatusMenu() // Create copy tox id command
mir_strcpy(tDest, "/CopyToxID");
CreateProtoService(tDest, &CToxProto::OnCopyToxID);
- mi.ptszName = LPGENT("Copy Tox ID");
+ mi.name.t = LPGENT("Copy Tox ID");
mi.position = SMI_POSITION + SMI_TOXID_COPY;
Menu_AddProtoMenuItem(&mi);
@@ -107,7 +107,7 @@ int CToxProto::OnInitStatusMenu() // Create group chat command
/*mir_strcpy(tDest, "/CreateChatRoom");
CreateProtoService(tDest, &CToxProto::OnCreateChatRoom);
- mi.ptszName = LPGENT("Create group chat");
+ mi.name.t = LPGENT("Create group chat");
mi.position = SMI_POSITION + SMI_GROUPCHAT_CREATE;
mi.icolibItem = Skin_GetIconHandle("conference");
HGENMENU hCreateChatRoom = Menu_AddProtoMenuItem(&mi);*/
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 2dbbf5f1f7..ba5ebc4672 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -272,7 +272,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM) // "Send Tweet..."
CreateProtoService("/Tweet", &TwitterProto::OnTweet);
mir_strcpy(tDest, "/Tweet");
- mi.ptszName = LPGENT("Send Tweet...");
+ mi.name.t = LPGENT("Send Tweet...");
mi.position = 200001;
mi.icolibItem = GetIconHandle("tweet");
Menu_AddStatusMenuItem(&mi);
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 5c97648203..53606e35a5 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -91,14 +91,14 @@ void InitContactMenus() mi.position = -2000006000;
mi.icolibItem = GetIconHandle("reply");
- mi.ptszName = LPGENT("Reply...");
+ mi.name.t = LPGENT("Reply...");
mi.pszService = "Twitter/ReplyToTweet";
g_hMenuEvts[1] = CreateServiceFunction(mi.pszService, GlobalService<&TwitterProto::ReplyToTweet>);
g_hMenuItems[0] = Menu_AddContactMenuItem(&mi);
mi.position = -2000006000;
mi.icolibItem = GetIconHandle("homepage");
- mi.ptszName = LPGENT("Visit Homepage");
+ mi.name.t = LPGENT("Visit Homepage");
mi.pszService = "Twitter/VisitHomepage";
g_hMenuEvts[2] = CreateServiceFunction(mi.pszService, GlobalService<&TwitterProto::VisitHomepage>);
g_hMenuItems[1] = Menu_AddContactMenuItem(&mi);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 6e52444d8c..c342ba326a 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -202,134 +202,134 @@ void CVkProto::InitMenus() mir_snprintf(szService, "%s%s", m_szModuleName, PS_CREATECHAT);
mi.position = 10009 + PMI_CREATECHAT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
- mi.pszName = LPGEN("Create new chat");
+ mi.name.a = LPGEN("Create new chat");
g_hProtoMenuItems[PMI_CREATECHAT] = Menu_AddProtoMenuItem(&mi);
mir_snprintf(szService, "%s%s", m_szModuleName, PS_SETSTATUSMSG);
mi.position = 10009 + PMI_SETSTATUSMSG;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_STATUS));
- mi.pszName = LPGEN("Status message");
+ mi.name.a = LPGEN("Status message");
g_hProtoMenuItems[PMI_SETSTATUSMSG] = Menu_AddProtoMenuItem(&mi);
mir_snprintf(szService, "%s%s", m_szModuleName, PS_WALLPOST);
mi.position = 10009 + PMI_WALLPOST;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL));
- mi.pszName = LPGEN("Send message to my wall");
+ mi.name.a = LPGEN("Send message to my wall");
g_hProtoMenuItems[PMI_WALLPOST] = Menu_AddProtoMenuItem(&mi);
mir_snprintf(szService, "%s%s", m_szModuleName, PS_LOADVKNEWS);
mi.position = 10009 + PMI_LOADVKNEWS;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
- mi.pszName = LPGEN("Load news from VK");
+ mi.name.a = LPGEN("Load news from VK");
g_hProtoMenuItems[PMI_LOADVKNEWS] = Menu_AddProtoMenuItem(&mi);
mir_snprintf(szService, "%s%s", m_szModuleName, PS_VISITPROFILE);
mi.position = 10009 + PMI_VISITPROFILE;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_VISITPROFILE));
- mi.pszName = LPGEN("Visit profile");
+ mi.name.a = LPGEN("Visit profile");
g_hProtoMenuItems[PMI_VISITPROFILE] = Menu_AddProtoMenuItem(&mi);
// Contact Menu Items
mi.hParentMenu = NULL;
- mi.pszContactOwner = m_szModuleName;
mi.flags = CMIF_TCHAR;
+ mi.pszService = PS_VISITPROFILE;
mi.position = -200001000 + CMI_VISITPROFILE;
- mi.ptszName = LPGENT("Visit profile");
- g_hContactMenuItems[CMI_VISITPROFILE] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Visit profile");
+ g_hContactMenuItems[CMI_VISITPROFILE] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_WALLPOST);
+ mi.pszService = PS_WALLPOST;
mi.position = -200001000 + CMI_WALLPOST;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL));
- mi.ptszName = LPGENT("Send message to user\'s wall");
- g_hContactMenuItems[CMI_WALLPOST] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Send message to user\'s wall");
+ g_hContactMenuItems[CMI_WALLPOST] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_ADDASFRIEND);
+ mi.pszService = PS_ADDASFRIEND;
mi.position = -200001000 + CMI_ADDASFRIEND;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_FRIENDADD));
- mi.ptszName = LPGENT("Add as friend");
- g_hContactMenuItems[CMI_ADDASFRIEND] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Add as friend");
+ g_hContactMenuItems[CMI_ADDASFRIEND] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_DELETEFRIEND);
+ mi.pszService = PS_DELETEFRIEND;
mi.position = -200001000 + CMI_DELETEFRIEND;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_FRIENDDEL));
- mi.ptszName = LPGENT("Delete from friend list");
- g_hContactMenuItems[CMI_DELETEFRIEND] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Delete from friend list");
+ g_hContactMenuItems[CMI_DELETEFRIEND] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_BANUSER);
+ mi.pszService = PS_BANUSER;
mi.position = -200001000 + CMI_BANUSER;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_BAN));
- mi.ptszName = LPGENT("Ban user");
- g_hContactMenuItems[CMI_BANUSER] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Ban user");
+ g_hContactMenuItems[CMI_BANUSER] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_REPORTABUSE);
+ mi.pszService = PS_REPORTABUSE;
mi.position = -200001000 + CMI_REPORTABUSE;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_ABUSE));
- mi.ptszName = LPGENT("Report abuse");
- g_hContactMenuItems[CMI_REPORTABUSE] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Report abuse");
+ g_hContactMenuItems[CMI_REPORTABUSE] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_DESTROYKICKCHAT);
+ mi.pszService = PS_DESTROYKICKCHAT;
mi.position = -200001000 + CMI_DESTROYKICKCHAT;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_FRIENDDEL));
- mi.ptszName = LPGENT("Destroy room");
- g_hContactMenuItems[CMI_DESTROYKICKCHAT] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Destroy room");
+ g_hContactMenuItems[CMI_DESTROYKICKCHAT] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_OPENBROADCAST);
+ mi.pszService = PS_OPENBROADCAST;
mi.position = -200001000 + CMI_OPENBROADCAST;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_BROADCAST));
- mi.ptszName = LPGENT("Open broadcast");
- g_hContactMenuItems[CMI_OPENBROADCAST] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Open broadcast");
+ g_hContactMenuItems[CMI_OPENBROADCAST] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_LOADVKNEWS);
+ mi.pszService = PS_LOADVKNEWS;
mi.position = -200001000 + CMI_LOADVKNEWS;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
- mi.ptszName = LPGENT("Load news from VK");
- g_hContactMenuItems[CMI_LOADVKNEWS] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Load news from VK");
+ g_hContactMenuItems[CMI_LOADVKNEWS] = Menu_AddContactMenuItem(&mi, m_szModuleName);
// Sync history menu
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORY);
+ mi.pszService = PS_GETSERVERHISTORY;
mi.position = -200001000 + CMI_GETSERVERHISTORY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("Reload messages from vk.com...");
- g_hContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Reload messages from vk.com...");
+ g_hContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
mi.hParentMenu = g_hContactMenuItems[CMI_GETSERVERHISTORY];
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORYLAST1DAY);
+ mi.pszService = PS_GETSERVERHISTORYLAST1DAY;
mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST1DAY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("for last 1 day");
- g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST1DAY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("for last 1 day");
+ g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST1DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORYLAST3DAY);
+ mi.pszService = PS_GETSERVERHISTORYLAST3DAY;
mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST3DAY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("for last 3 days");
- g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST3DAY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("for last 3 days");
+ g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST3DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORYLAST7DAY);
+ mi.pszService = PS_GETSERVERHISTORYLAST7DAY;
mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST7DAY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("for last week");
- g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST7DAY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("for last week");
+ g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST7DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORYLAST30DAY);
+ mi.pszService = PS_GETSERVERHISTORYLAST30DAY;
mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST30DAY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("for last 30 days");
- g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST30DAY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("for last 30 days");
+ g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST30DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORYLAST90DAY);
+ mi.pszService = PS_GETSERVERHISTORYLAST90DAY;
mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST90DAY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("for last 90 days");
- g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST90DAY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("for last 90 days");
+ g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST90DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
- mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETALLSERVERHISTORY);
+ mi.pszService = PS_GETALLSERVERHISTORY;
mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETALLSERVERHISTORY;
mi.icolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
- mi.ptszName = LPGENT("for all time");
- g_hContactHistoryMenuItems[CHMI_GETALLSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("for all time");
+ g_hContactHistoryMenuItems[CHMI_GETALLSERVERHISTORY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index d802870dad..4595692cc7 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -59,7 +59,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) mi.position = 500085000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (isOnline() ? 0 : CMIF_GRAYED);
mi.icolibItem = GetIconHandle("whatsApp");
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
@@ -75,7 +75,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) CreateProtoService("/CreateGroup", &WhatsAppProto::OnCreateGroup);
mir_strcpy(tDest, "/CreateGroup");
mi.hParentMenu = hRoot;
- mi.pszName = LPGEN("Create group");
+ mi.name.a = LPGEN("Create group");
mi.icolibItem = GetIconHandle("createGroup");
m_hMenuCreateGroup = Menu_AddProtoMenuItem(&mi);
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 8abedcb60c..6bc8091fd7 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -438,7 +438,6 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
- mi.pszContactOwner = protocolname;
mir_snprintf(temp, _countof(temp), servicefunction, this->id);
//wenn die servicefunktion schon exisitert vernichten, hehe
@@ -447,8 +446,8 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) CreateServiceFunctionParam(temp, StartGame, this->id);
mi.pszService = temp;
mi.position = 500090002 + pos;
- mi.hIcon = this->hicon ? this->hicon : LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.pszName = menuitemtext(this->name);
+ mi.icolibItem = this->hicon ? this->hicon : LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.a = menuitemtext(this->name);
this->menuhandle = Menu_AddMainMenuItem(&mi);
//menu aktualisieren ob hidden
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 344289044a..f62989fec3 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -244,9 +244,8 @@ void Xfire_gamelist::createDummyMenuItem() CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
mi.position = 500090001;
- mi.pszName = Translate("Please wait...");
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.pszContactOwner = protocolname;
+ mi.name.a = Translate("Please wait...");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
dummymenuitem = Menu_AddMainMenuItem(&mi);
}
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index ab06f85b5c..6c4c93412f 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1120,104 +1120,95 @@ extern "C" __declspec(dllexport) int Load(void) char servicefunction[100];
// gotoprofilemenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GotoProfile");
- CreateServiceFunction(servicefunction, GotoProfile);
- mi.pszService = servicefunction;
+ CreateProtoServiceFunction(protocolname, "/GotoProfile", GotoProfile);
+ mi.pszService = "/GotoProfile";
mi.position = 500090000;
- mi.pszContactOwner = protocolname;
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&XFire Online Profile");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("&XFire Online Profile");
+ Menu_AddContactMenuItem(&mi, protocolname);
// gotoxfireclansitemenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GotoXFireClanSite");
- CreateServiceFunction(servicefunction, GotoXFireClanSite);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("XFire &Clan Site");
- gotoclansite = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/GotoXFireClanSite", GotoXFireClanSite);
+ mi.pszService = "/GotoXFireClanSite";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("XFire &Clan Site");
+ gotoclansite = Menu_AddContactMenuItem(&mi, protocolname);
// kopiermenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "GetIPPort");
- CreateServiceFunction(servicefunction, GetIPPort);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("C&opy Server Address and Port");
- copyipport = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/GetIPPort", GetIPPort);
+ mi.pszService = "/GetIPPort";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("C&opy Server Address and Port");
+ copyipport = Menu_AddContactMenuItem(&mi, protocolname);
// kopiermenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "VoiceIPPort");
- CreateServiceFunction(servicefunction, GetVIPPort);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Cop&y Voice Server Address and Port");
- vipport = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/VoiceIPPort", GetVIPPort);
+ mi.pszService = "/VoiceIPPort";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Cop&y Voice Server Address and Port");
+ vipport = Menu_AddContactMenuItem(&mi, protocolname);
// joinmenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "JoinGame");
- CreateServiceFunction(servicefunction, JoinGame);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Join &Game...");
- joingame = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/JoinGame", JoinGame);
+ mi.pszService = "/JoinGame";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Join &Game...");
+ joingame = Menu_AddContactMenuItem(&mi, protocolname);
// playmenüpunkt
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "StartThisGame");
- CreateServiceFunction(servicefunction, StartThisGame);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Play this game...");
- startthisgame = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/StartThisGame", StartThisGame);
+ mi.pszService = "/StartThisGame";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Play this game...");
+ startthisgame = Menu_AddContactMenuItem(&mi, protocolname);
// remove friend
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "RemoveFriend");
- CreateServiceFunction(servicefunction, RemoveFriend);
+ CreateProtoServiceFunction(protocolname, "/RemoveFriend", RemoveFriend);
+ mi.pszService = "/RemoveFriend";
mi.position = 2000070000;
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Remove F&riend...");
- removefriend = Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Remove F&riend...");
+ removefriend = Menu_AddContactMenuItem(&mi, protocolname);
// block user
- mir_strcpy(servicefunction, protocolname);
- mir_strcat(servicefunction, "BlockFriend");
- CreateServiceFunction(servicefunction, BlockFriend);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Block U&ser...");
- blockfriend = Menu_AddContactMenuItem(&mi);
+ CreateProtoServiceFunction(protocolname, "/BlockFriend", BlockFriend);
+ mi.pszService = "/BlockFriend";
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Block U&ser...");
+ blockfriend = Menu_AddContactMenuItem(&mi, protocolname);
+ // main menu items
// my fire profile
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(protocolname), 500090000);
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "GotoProfile2");
CreateServiceFunction(servicefunction, GotoProfile2);
mi.position = 500090000;
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&My XFire Online Profile");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("&My XFire Online Profile");
Menu_AddMainMenuItem(&mi);
// my activity protocol
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "GotoProfileAct");
CreateServiceFunction(servicefunction, GotoProfileAct);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&Activity Report");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("&Activity Report");
Menu_AddMainMenuItem(&mi);
//rescan my games
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "ReScanMyGames");
CreateServiceFunction(servicefunction, ReScanMyGames);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("&Rescan my games...");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("&Rescan my games...");
Menu_AddMainMenuItem(&mi);
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "SetNick");
CreateServiceFunction(servicefunction, SetNickDlg);
- mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- mi.ptszName = LPGENT("Set &Nickname");
+ mi.icolibItem = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
+ mi.name.t = LPGENT("Set &Nickname");
Menu_AddMainMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index a66b451843..f9ea13afd1 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -370,7 +370,7 @@ void CYahooProto::MenuMainInit(void) mi.position = 500015000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_YAHOO);
- mi.ptszName = m_tszUserName;
+ mi.name.t = m_tszUserName;
hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
@@ -389,7 +389,7 @@ void CYahooProto::MenuMainInit(void) mi.position = 290000;
mi.icolibItem = GetIconHandle(IDI_SET_STATUS);
- mi.pszName = LPGEN("Set &Custom Status");
+ mi.name.a = LPGEN("Set &Custom Status");
menuItemsAll[0] = Menu_AddProtoMenuItem(&mi);
@@ -399,7 +399,7 @@ void CYahooProto::MenuMainInit(void) mi.position = 290005;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
- mi.pszName = LPGEN("&Edit My Profile");
+ mi.name.a = LPGEN("&Edit My Profile");
menuItemsAll[1] = Menu_AddProtoMenuItem(&mi);
// Show My profile
@@ -408,7 +408,7 @@ void CYahooProto::MenuMainInit(void) mi.position = 290006;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
- mi.pszName = LPGEN("&My Profile");
+ mi.name.a = LPGEN("&My Profile");
menuItemsAll[2] = Menu_AddProtoMenuItem(&mi);
// Show Yahoo mail
@@ -417,7 +417,7 @@ void CYahooProto::MenuMainInit(void) mi.position = 290010;
mi.icolibItem = GetIconHandle(IDI_INBOX);
- mi.pszName = LPGEN("&Yahoo Mail");
+ mi.name.a = LPGEN("&Yahoo Mail");
menuItemsAll[3] = Menu_AddProtoMenuItem(&mi);
// Show Address Book
@@ -426,7 +426,7 @@ void CYahooProto::MenuMainInit(void) mi.position = 290015;
mi.icolibItem = GetIconHandle(IDI_YAB);
- mi.pszName = LPGEN("&Address Book");
+ mi.name.a = LPGEN("&Address Book");
menuItemsAll[4] = Menu_AddProtoMenuItem(&mi);
// Show Calendar
@@ -435,36 +435,29 @@ void CYahooProto::MenuMainInit(void) mi.position = 290017;
mi.icolibItem = GetIconHandle(IDI_CALENDAR);
- mi.pszName = LPGEN("&Calendar");
+ mi.name.a = LPGEN("&Calendar");
menuItemsAll[5] = Menu_AddProtoMenuItem(&mi);
mir_strcpy(tDest, "/JoinChatRoom");
CreateProtoService("/JoinChatRoom", &CYahooProto::CreateConference);
mi.position = 290018;
mi.icolibItem = GetIconHandle(IDI_YAHOO);
- mi.pszName = LPGEN("Create Conference");
+ mi.name.a = LPGEN("Create Conference");
menuItemsAll[6] = Menu_AddProtoMenuItem(&mi);
}
void CYahooProto::MenuContactInit(void)
{
- char servicefunction[100];
- mir_strcpy(servicefunction, m_szModuleName);
- char* tDest = servicefunction + mir_strlen(servicefunction);
-
CLISTMENUITEM mi = { 0 };
- mi.pszService = servicefunction;
- mi.pszContactOwner = m_szModuleName;
// Show Profile
- mir_strcpy(tDest, YAHOO_SHOW_PROFILE);
CreateProtoService(YAHOO_SHOW_PROFILE, &CYahooProto::OnShowProfileCommand);
+ mi.pszService = YAHOO_SHOW_PROFILE;
mi.position = -2000006000;
mi.icolibItem = GetIconHandle(IDI_PROFILE);
- mi.pszName = LPGEN("&Show Profile");
- hShowProfileMenuItem = Menu_AddContactMenuItem(&mi);
-
+ mi.name.a = LPGEN("&Show Profile");
+ hShowProfileMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
void CYahooProto::MenuUninit(void)
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index 6be4cf1a7e..b3c9f95c44 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -170,7 +170,7 @@ int LoadAwayMsgModule(void) CLISTMENUITEM mi = { 0 };
mi.position = -2000005000;
mi.flags = CMIF_NOTOFFLINE;
- mi.pszName = LPGEN("Re&ad status message");
+ mi.name.a = LPGEN("Re&ad status message");
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu);
diff --git a/src/core/stdemail/src/email.cpp b/src/core/stdemail/src/email.cpp index 52b6e64e5d..87c505b6ea 100644 --- a/src/core/stdemail/src/email.cpp +++ b/src/core/stdemail/src/email.cpp @@ -69,7 +69,7 @@ int LoadSendRecvEMailModule(void) CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
- mi.pszName = LPGEN("&E-mail");
+ mi.name.a = LPGEN("&E-mail");
mi.pszService = MS_EMAIL_SENDEMAIL;
hEMailMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 1a7ad53931..6c0c01c207 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -339,7 +339,7 @@ static int SRFileModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.position = -2000020000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
- mi.pszName = LPGEN("&File");
+ mi.name.a = LPGEN("&File");
mi.pszService = MS_FILE_SENDFILE;
hSRFileMenuItem = Menu_AddContactMenuItem(&mi);
@@ -437,7 +437,7 @@ int LoadSendRecvFileModule(void) CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
- mi.pszName = LPGEN("File &transfers...");
+ mi.name.a = LPGEN("File &transfers...");
mi.pszService = "FtMgr/Show"; //MS_PROTO_SHOWFTMGR;
Menu_AddMainMenuItem(&mi);
diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp index 95fbab090f..d134d9fc26 100644 --- a/src/core/stdhelp/src/help.cpp +++ b/src/core/stdhelp/src/help.cpp @@ -77,25 +77,25 @@ int LoadHelpModule(void) mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("&Help"), 2000090000);
mi.position = 2000090000;
- mi.pszName = LPGEN("&About...");
+ mi.name.a = LPGEN("&About...");
mi.pszService = "Help/AboutCommand";
Menu_AddMainMenuItem(&mi);
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
mi.position = -500050000;
- mi.pszName = LPGEN("&Support");
+ mi.name.a = LPGEN("&Support");
mi.pszService = "Help/IndexCommand";
Menu_AddMainMenuItem(&mi);
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDAWEB);
mi.position = 2000050000;
- mi.pszName = LPGEN("&Miranda NG homepage");
+ mi.name.a = LPGEN("&Miranda NG homepage");
mi.pszService = "Help/WebsiteCommand";
Menu_AddMainMenuItem(&mi);
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.position = 2000040000;
- mi.pszName = LPGEN("&Report bug");
+ mi.name.a = LPGEN("&Report bug");
mi.pszService = "Help/BugCommand";
Menu_AddMainMenuItem(&mi);
return 0;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 330913a4a5..ba2f82ab62 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -282,7 +282,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM) mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
- mi.pszName = LPGEN("&Message");
+ mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index 8ea9ae4aa2..94de89639c 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -404,7 +404,7 @@ int LoadHistoryModule(void) CLISTMENUITEM mi = { 0 };
mi.position = 1000090000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
- mi.pszName = LPGEN("View &history");
+ mi.name.a = LPGEN("View &history");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
hContactMenu = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index ad3476c23a..e6bbf11e77 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -122,7 +122,7 @@ static int SRUrlModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.position = -2000040000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
- mi.pszName = LPGEN("Web page address (&URL)");
+ mi.name.a = LPGEN("Web page address (&URL)");
mi.pszService = MS_URL_SENDURL;
hSRUrlMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index ed003d3954..93511c627f 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -631,12 +631,12 @@ int LoadUserInfoModule(void) CLISTMENUITEM mi = { 0 };
mi.position = 1000050000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
- mi.pszName = LPGEN("User &details");
+ mi.name.a = LPGEN("User &details");
mi.pszService = MS_USERINFO_SHOWDIALOG;
Menu_AddContactMenuItem(&mi);
mi.position = 500050000;
- mi.pszName = LPGEN("View/change my &details...");
+ mi.name.a = LPGEN("View/change my &details...");
Menu_AddMainMenuItem(&mi);
hWindowList = WindowList_Create();
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index fb3b35ea17..b38bf3d194 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -564,14 +564,14 @@ static int ModulesLoaded(WPARAM, LPARAM) mi.position = -2000090001; mi.flags = CMIF_DEFAULT; mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN); - mi.pszName = LPGEN("&Join chat"); + mi.name.a = LPGEN("&Join chat"); mi.pszService = "GChat/JoinChat"; hJoinMenuItem = Menu_AddContactMenuItem(&mi); mi.position = -2000090000; mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE); mi.flags = CMIF_NOTOFFLINE; - mi.pszName = LPGEN("&Leave chat"); + mi.name.a = LPGEN("&Leave chat"); mi.pszService = "GChat/LeaveChat"; hLeaveMenuItem = Menu_AddContactMenuItem(&mi); diff --git a/src/mir_app/src/clistmenus.cpp b/src/mir_app/src/clistmenus.cpp index a3343b8506..6d1e4ec605 100644 --- a/src/mir_app/src/clistmenus.cpp +++ b/src/mir_app/src/clistmenus.cpp @@ -97,17 +97,6 @@ struct BuildContactParam int isOnline;
};
-struct StatusMenuExecParam
-{
- char *proto; //This is unique protoname
- int protoindex;
- int status;
-
- BOOL custom;
- char *svc;
- HANDLE hMenuItem;
-};
-
struct MenuItemData
{
HMENU OwnerMenu;
@@ -173,10 +162,9 @@ static INT_PTR BuildMainMenu(WPARAM, LPARAM) return (INT_PTR)hMainMenu;
}
-static INT_PTR AddMainMenuItem(WPARAM, LPARAM lParam)
+MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(CLISTMENUITEM *mi, int _hLang)
{
TMO_MenuItem tmi;
- CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
if (!cli.pfnConvertMenu(mi, &tmi))
return 0;
@@ -190,6 +178,7 @@ static INT_PTR AddMainMenuItem(WPARAM, LPARAM lParam) tmi.ownerdata = mmep;
TMO_IntMenuItem *pimi = Menu_AddItem(hMainMenuObject, &tmi);
+ pimi->hLangpack = _hLang;
mmep->pimi = pimi;
char* name;
@@ -198,20 +187,15 @@ static INT_PTR AddMainMenuItem(WPARAM, LPARAM lParam) if (mi->pszService)
name = mi->pszService;
else if (mi->flags & CMIF_UNICODE) {
- name = mir_t2a(mi->ptszName);
+ name = mir_t2a(mi->name.t);
needFree = true;
}
- else name = mi->pszName;
+ else name = mi->name.a;
Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, name);
if (needFree) mir_free(name);
- return (INT_PTR)pimi;
-}
-
-int MainMenuCheckService(WPARAM, LPARAM)
-{
- return 0;
+ return pimi;
}
// called with:
@@ -242,40 +226,44 @@ INT_PTR FreeOwnerDataMainMenu(WPARAM, LPARAM lParam) struct ContactMenuExecParam
{
char *szServiceName;
- char *pszContactOwner;//for check proc
+ char *pszContactOwner;
TMO_IntMenuItem *pimi;
};
-static INT_PTR AddContactMenuItem(WPARAM, LPARAM lParam)
+MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(CLISTMENUITEM *mi, const char *pszProto, int _hLang)
{
TMO_MenuItem tmi;
- CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
if (!cli.pfnConvertMenu(mi, &tmi))
return 0;
// owner data
ContactMenuExecParam *cmep = (ContactMenuExecParam*)mir_calloc(sizeof(ContactMenuExecParam));
cmep->szServiceName = mir_strdup(mi->pszService);
- if (mi->pszContactOwner != NULL)
- cmep->pszContactOwner = mir_strdup(mi->pszContactOwner);
+ if (pszProto != NULL)
+ cmep->pszContactOwner = mir_strdup(pszProto);
tmi.ownerdata = cmep;
// may be need to change how UniqueName is formed?
TMO_IntMenuItem *pimi = Menu_AddItem(hContactMenuObject, &tmi);
+ pimi->hLangpack = _hLang;
cmep->pimi = pimi;
+ if (pszProto == NULL)
+ pszProto = "";
+
char buf[256];
- if (mi->pszService)
- mir_snprintf(buf, "%s/%s", (mi->pszContactOwner) ? mi->pszContactOwner : "", (mi->pszService) ? mi->pszService : "");
- else if (mi->ptszName) {
+ if (mi->pszService) {
+ mir_snprintf(buf, "%s/%s", pszProto, (mi->pszService) ? mi->pszService : "");
+ Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
+ }
+ else if (mi->name.t) {
if (tmi.flags & CMIF_UNICODE)
- mir_snprintf(buf, "%s/NoService/%s", (mi->pszContactOwner) ? mi->pszContactOwner : "", _T2A(mi->ptszName));
+ mir_snprintf(buf, "%s/NoService/%S", pszProto, mi->name.t);
else
- mir_snprintf(buf, "%s/NoService/%s", (mi->pszContactOwner) ? mi->pszContactOwner : "", mi->ptszName);
+ mir_snprintf(buf, "%s/NoService/%s", pszProto, mi->name.a);
+ Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
}
- else buf[0] = '\0';
- if (buf[0]) Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
- return (INT_PTR)pimi;
+ return pimi;
}
static INT_PTR BuildContactMenu(WPARAM hContact, LPARAM)
@@ -294,20 +282,22 @@ static INT_PTR BuildContactMenu(WPARAM hContact, LPARAM) return (INT_PTR)hMenu;
}
-//called with:
-//wparam - ownerdata
-//lparam - lparam from winproc
+// called with:
+// wparam - ownerdata
+// lparam - lparam from winproc
INT_PTR ContactMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0) {
ContactMenuExecParam *cmep = (ContactMenuExecParam*)wParam;
- //call with wParam = (MCONTACT)hContact, lparam = popupposition
- CallService(cmep->szServiceName, lParam, cmep->pimi->execParam);
+ if (cmep->pszContactOwner && cmep->szServiceName && cmep->szServiceName[0] == '/')
+ ProtoCallService(cmep->pszContactOwner, cmep->szServiceName, lParam, cmep->pimi->execParam);
+ else
+ CallService(cmep->szServiceName, lParam, cmep->pimi->execParam);
}
return 0;
}
-//true - ok, false ignore
+// true - ok, false ignore
INT_PTR ContactMenuCheckService(WPARAM wParam, LPARAM)
{
TCheckProcParam *pcpp = (TCheckProcParam*)wParam;
@@ -327,14 +317,12 @@ INT_PTR ContactMenuCheckService(WPARAM wParam, LPARAM) if (mir_strcmp(cmep->pszContactOwner, bcp->szProto)) return FALSE;
}
- TMO_MenuItem mi;
- if (Menu_GetItemInfo(pcpp->MenuItemHandle, mi) == 0) {
- if (mi.flags & CMIF_HIDDEN) return FALSE;
- if (mi.flags & CMIF_NOTONLIST && bcp->isOnList) return FALSE;
- if (mi.flags & CMIF_NOTOFFLIST && !bcp->isOnList) return FALSE;
- if (mi.flags & CMIF_NOTONLINE && bcp->isOnline) return FALSE;
- if (mi.flags & CMIF_NOTOFFLINE && !bcp->isOnline) return FALSE;
- }
+ TMO_MenuItem &mi = pcpp->MenuItemHandle->mi;
+ if (mi.flags & CMIF_HIDDEN) return FALSE;
+ if (mi.flags & CMIF_NOTONLIST && bcp->isOnList) return FALSE;
+ if (mi.flags & CMIF_NOTOFFLIST && !bcp->isOnList) return FALSE;
+ if (mi.flags & CMIF_NOTONLINE && bcp->isOnline) return FALSE;
+ if (mi.flags & CMIF_NOTOFFLINE && !bcp->isOnline) return FALSE;
return TRUE;
}
@@ -352,6 +340,53 @@ INT_PTR FreeOwnerDataContactMenu(WPARAM, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// STATUS MENU
+struct StatusMenuExecParam
+{
+ char *szProto; // This is unique protoname
+ int protoindex;
+ int status;
+
+ BOOL custom;
+ char *svc;
+ HANDLE hMenuItem;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(CLISTMENUITEM *mi, const char *pszProto, int _hLangpack)
+{
+ TMO_MenuItem tmi;
+ if (!cli.pfnConvertMenu(mi, &tmi))
+ return 0;
+
+ TMO_IntMenuItem *pRoot = MO_GetIntMenuItem(mi->hParentMenu);
+
+ // owner data
+ StatusMenuExecParam *smep = NULL;
+ if (mi->pszService) {
+ smep = (StatusMenuExecParam*)mir_calloc(sizeof(StatusMenuExecParam));
+ smep->custom = TRUE;
+ smep->svc = mir_strdup(mi->pszService);
+ smep->szProto = mir_strdup(pszProto);
+ tmi.ownerdata = smep;
+ }
+
+ TMO_IntMenuItem *pimi = Menu_AddItem(hStatusMenuObject, &tmi);
+ pimi->hLangpack = _hLangpack;
+ if (smep)
+ smep->hMenuItem = pimi;
+
+ char buf[MAX_PATH + 64];
+ char *p = (pRoot) ? mir_t2a(pRoot->mi.name.t) : NULL;
+ mir_snprintf(buf, "%s/%s", (p) ? p : "", mi->pszService ? mi->pszService : "");
+ mir_free(p);
+
+ Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
+ return pimi;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
BOOL FindMenuHandleByGlobalID(HMENU hMenu, TMO_IntMenuItem *id, MenuItemData* itdat)
{
if (!itdat)
@@ -390,8 +425,8 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) if (!pcpp)
return TRUE;
- TMO_IntMenuItem *timi = MO_GetIntMenuItem(pcpp->MenuItemHandle);
- if (!timi)
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem(pcpp->MenuItemHandle);
+ if (!pimi)
return TRUE;
StatusMenuExecParam *smep = (StatusMenuExecParam*)pcpp->MenuItemOwnerData;
@@ -401,7 +436,7 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) CUSTOM_STATUS cs = { sizeof(cs) };
cs.flags = CSSF_MASK_STATUS;
cs.status = &XStatus;
- if (CallProtoServiceInt(NULL, smep->proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) != 0)
+ if (CallProtoServiceInt(NULL, smep->szProto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) != 0)
XStatus = 0;
char buf[255];
@@ -411,16 +446,16 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) bool reset = wildcmp(smep->svc, "*XStatus0") != 0;
if (check)
- timi->mi.flags |= CMIF_CHECKED;
+ pimi->mi.flags |= CMIF_CHECKED;
else
- timi->mi.flags &= ~CMIF_CHECKED;
+ pimi->mi.flags &= ~CMIF_CHECKED;
if (reset || check) {
- TMO_IntMenuItem *timiParent = MO_GetIntMenuItem(timi->mi.root);
+ TMO_IntMenuItem *timiParent = MO_GetIntMenuItem(pimi->mi.root);
if (timiParent) {
- LPTSTR ptszName = TranslateTH(timi->mi.hLangpack, timi->mi.hIcon ? timi->mi.name.t : LPGENT("Custom status"));
+ LPTSTR ptszName = TranslateTH(pimi->mi.hLangpack, pimi->mi.hIcolibItem ? pimi->mi.name.t : LPGENT("Custom status"));
- timiParent = MO_GetIntMenuItem(timi->mi.root);
+ timiParent = MO_GetIntMenuItem(pimi->mi.root);
MenuItemData it = { 0 };
if (FindMenuHandleByGlobalID(hStatusMenu, timiParent, &it)) {
@@ -430,12 +465,12 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING | MIIM_STATE;
- if (timi->iconId != -1) {
+ if (pimi->iconId != -1) {
mii.fMask |= MIIM_BITMAP;
if (IsWinVerVistaPlus() && IsThemeActive()) {
- if (timi->hBmp == NULL)
- timi->hBmp = ConvertIconToBitmap(NULL, timi->parent->m_hMenuIcons, timi->iconId);
- mii.hbmpItem = timi->hBmp;
+ if (pimi->hBmp == NULL)
+ pimi->hBmp = ConvertIconToBitmap(NULL, pimi->parent->m_hMenuIcons, pimi->iconId);
+ mii.hbmpItem = pimi->hBmp;
}
else mii.hbmpItem = HBMMENU_CALLBACK;
}
@@ -445,9 +480,9 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) SetMenuItemInfo(it.OwnerMenu, it.position, TRUE, &mii);
}
- Menu_ModifyItem(timi->mi.root, ptszName);
+ Menu_ModifyItem(pimi->mi.root, ptszName);
- timiParent->iconId = timi->iconId;
+ timiParent->iconId = pimi->iconId;
if (timiParent->hBmp) DeleteObject(timiParent->hBmp);
timiParent->hBmp = NULL;
}
@@ -455,20 +490,20 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) }
}
else if (smep && smep->status && !smep->custom) {
- int curProtoStatus = (smep->proto) ? CallProtoServiceInt(NULL, smep->proto, PS_GETSTATUS, 0, 0) : cli.pfnGetAverageMode(NULL);
+ int curProtoStatus = (smep->szProto) ? CallProtoServiceInt(NULL, smep->szProto, PS_GETSTATUS, 0, 0) : cli.pfnGetAverageMode(NULL);
if (smep->status == curProtoStatus)
- timi->mi.flags |= CMIF_CHECKED;
+ pimi->mi.flags |= CMIF_CHECKED;
else
- timi->mi.flags &= ~CMIF_CHECKED;
+ pimi->mi.flags &= ~CMIF_CHECKED;
}
- else if ((!smep || smep->proto) && timi->mi.name.a) {
+ else if ((!smep || smep->szProto) && pimi->mi.name.a) {
int curProtoStatus = 0;
BOOL IconNeedDestroy = FALSE;
char* prot;
if (smep)
- prot = smep->proto;
+ prot = smep->szProto;
else {
- char *prn = mir_u2a(timi->mi.name.t);
+ char *prn = mir_u2a(pimi->mi.name.t);
prot = NEWSTR_ALLOCA(prn);
if (prn) mir_free(prn);
}
@@ -479,22 +514,22 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) curProtoStatus = 0;
if (curProtoStatus >= ID_STATUS_OFFLINE && curProtoStatus < ID_STATUS_IDLE)
- timi->mi.hIcon = Skin_LoadProtoIcon(prot, curProtoStatus);
+ pimi->mi.hIcolibItem = Skin_LoadProtoIcon(prot, curProtoStatus);
else {
- timi->mi.hIcon = (HICON)CallProtoServiceInt(NULL, prot, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
- if (timi->mi.hIcon == (HICON)CALLSERVICE_NOTFOUND)
- timi->mi.hIcon = NULL;
+ pimi->mi.hIcolibItem = (HICON)CallProtoServiceInt(NULL, prot, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
+ if (pimi->mi.hIcolibItem == (HICON)CALLSERVICE_NOTFOUND)
+ pimi->mi.hIcolibItem = NULL;
else
IconNeedDestroy = TRUE;
}
- if (timi->mi.hIcon) {
- Menu_ModifyItem(timi, NULL, timi->mi.hIcon);
+ if (pimi->mi.hIcolibItem) {
+ Menu_ModifyItem(pimi, NULL, pimi->mi.hIcolibItem);
if (IconNeedDestroy) {
- DestroyIcon(timi->mi.hIcon);
- timi->mi.hIcon = NULL;
+ DestroyIcon((HICON)pimi->mi.hIcolibItem);
+ pimi->mi.hIcolibItem = NULL;
}
- else IcoLib_ReleaseIcon(timi->mi.hIcon);
+ else IcoLib_ReleaseIcon((HICON)pimi->mi.hIcolibItem);
}
}
@@ -513,14 +548,14 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) return 0;
}
- if (smep->status == 0 && smep->protoindex != 0 && smep->proto != NULL) {
- char *prot = smep->proto;
+ if (smep->status == 0 && smep->protoindex != 0 && smep->szProto != NULL) {
+ char *prot = smep->szProto;
char szHumanName[64] = { 0 };
- PROTOACCOUNT *acc = Proto_GetAccount(smep->proto);
+ PROTOACCOUNT *acc = Proto_GetAccount(smep->szProto);
bool bIsLocked = !Proto_IsAccountLocked(acc);
db_set_b(NULL, prot, "LockMainStatus", bIsLocked);
- CallProtoServiceInt(NULL, smep->proto, PS_GETNAME, (WPARAM)_countof(szHumanName), (LPARAM)szHumanName);
+ CallProtoServiceInt(NULL, smep->szProto, PS_GETNAME, _countof(szHumanName), (LPARAM)szHumanName);
TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)smep->protoindex);
if (pimi == NULL)
@@ -548,9 +583,9 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) return 0;
}
- if (smep->proto != NULL) {
- Proto_SetStatus(smep->proto, smep->status);
- NotifyEventHooks(hStatusModeChangeEvent, smep->status, (LPARAM)smep->proto);
+ if (smep->szProto != NULL) {
+ Proto_SetStatus(smep->szProto, smep->status);
+ NotifyEventHooks(hStatusModeChangeEvent, smep->status, (LPARAM)smep->szProto);
return 0;
}
@@ -580,9 +615,9 @@ INT_PTR FreeOwnerDataStatusMenu(WPARAM, LPARAM lParam) {
StatusMenuExecParam *smep = (StatusMenuExecParam*)lParam;
if (smep != NULL) {
- FreeAndNil((void**)&smep->proto);
- FreeAndNil((void**)&smep->svc);
- FreeAndNil((void**)&smep);
+ mir_free(smep->szProto);
+ mir_free(smep->svc);
+ mir_free(&smep);
}
return (0);
@@ -802,7 +837,7 @@ void RebuildMenuOrder(void) //owner data
StatusMenuExecParam *smep = (StatusMenuExecParam*)mir_calloc(sizeof(StatusMenuExecParam));
- smep->proto = mir_strdup(pa->szModuleName);
+ smep->szProto = mir_strdup(pa->szModuleName);
tmi.ownerdata = smep;
TMO_IntMenuItem *rootmenu = Menu_AddItem(hStatusMenuObject, &tmi);
@@ -815,7 +850,7 @@ void RebuildMenuOrder(void) //owner data
smep = (StatusMenuExecParam*)mir_calloc(sizeof(StatusMenuExecParam));
- smep->proto = mir_strdup(pa->szModuleName);
+ smep->szProto = mir_strdup(pa->szModuleName);
tmi.ownerdata = smep;
if (Proto_IsAccountLocked(pa))
@@ -864,7 +899,7 @@ void RebuildMenuOrder(void) smep->custom = FALSE;
smep->status = statusModeList[j];
smep->protoindex = i;
- smep->proto = mir_strdup(pa->szModuleName);
+ smep->szProto = mir_strdup(pa->szModuleName);
tmi.ownerdata = smep;
hStatusMenuHandles[i].protoindex = i;
@@ -1025,8 +1060,8 @@ int fnConvertMenu(CLISTMENUITEM *mi, TMO_MenuItem *pmi) memset(pmi, 0, sizeof(TMO_MenuItem));
pmi->root = mi->hParentMenu;
pmi->flags = mi->flags;
- pmi->hIcon = mi->hIcon;
- pmi->name.a = mi->pszName;
+ pmi->hIcolibItem = mi->icolibItem;
+ pmi->name.a = mi->name.a;
pmi->position = mi->position;
pmi->hLangpack = mi->hLangpack;
return TRUE;
@@ -1055,47 +1090,6 @@ HGENMENU fnGetProtocolMenu(const char* proto) /////////////////////////////////////////////////////////////////////////////////////////
-static INT_PTR AddStatusMenuItem(WPARAM, LPARAM lParam)
-{
- TMO_MenuItem tmi;
- CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
- if (!cli.pfnConvertMenu(mi, &tmi))
- return 0;
-
- TMO_IntMenuItem *pRoot = MO_GetIntMenuItem(mi->hParentMenu);
-
- // owner data
- StatusMenuExecParam *smep = NULL;
- if (mi->pszService) {
- smep = (StatusMenuExecParam*)mir_calloc(sizeof(StatusMenuExecParam));
- smep->custom = TRUE;
- smep->svc = mir_strdup(mi->pszService);
- {
- char *buf = mir_strdup(mi->pszService);
- int i = 0;
- while (buf[i] != '\0' && buf[i] != '/') i++;
- buf[i] = '\0';
- smep->proto = mir_strdup(buf);
- mir_free(buf);
- }
- tmi.ownerdata = smep;
- }
-
- TMO_IntMenuItem *pimi = Menu_AddItem(hStatusMenuObject, &tmi);
- if (smep)
- smep->hMenuItem = pimi;
-
- char buf[MAX_PATH + 64];
- char *p = (pRoot) ? mir_t2a(pRoot->mi.name.t) : NULL;
- mir_snprintf(buf, "%s/%s", (p) ? p : "", mi->pszService ? mi->pszService : "");
- mir_free(p);
-
- Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
- return (INT_PTR)pimi;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
static INT_PTR HotkeySetStatus(WPARAM, LPARAM lParam)
{
return SetStatusMode(lParam, 0);
@@ -1104,12 +1098,21 @@ static INT_PTR HotkeySetStatus(WPARAM, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// PROTOCOL MENU
-static INT_PTR AddProtoMenuItem(WPARAM wParam, LPARAM lParam)
+MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(CLISTMENUITEM *mi, const char *pszProto, int _hLangpack)
{
+ if (mi == NULL)
+ return NULL;
+
if (db_get_b(NULL, "CList", "MoveProtoMenus", TRUE))
- return AddStatusMenuItem(wParam, lParam);
+ return Menu_AddStatusMenuItem(mi, pszProto, _hLangpack);
- return AddMainMenuItem(wParam, lParam);
+ char szService[100];
+ if (pszProto && mi->pszService && *mi->pszService == '/') {
+ strncpy_s(szService, pszProto, _TRUNCATE);
+ strncat_s(szService, mi->pszService, _TRUNCATE);
+ mi->pszService = szService;
+ }
+ return Menu_AddMainMenuItem(mi, _hLangpack);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1131,20 +1134,15 @@ void InitCustomMenus(void) CreateServiceFunction(MS_CLIST_SETSTATUSMODE, SetStatusMode);
- CreateServiceFunction("CList/AddMainMenuItem", AddMainMenuItem);
- CreateServiceFunction("CList/AddStatusMenuItem", AddStatusMenuItem);
CreateServiceFunction(MS_CLIST_MENUGETMAIN, MenuGetMain);
CreateServiceFunction(MS_CLIST_MENUBUILDMAIN, BuildMainMenu);
- CreateServiceFunction("CList/AddContactMenuItem", AddContactMenuItem);
CreateServiceFunction(MS_CLIST_MENUBUILDCONTACT, BuildContactMenu);
CreateServiceFunction(MS_CLIST_MENUGETSTATUS, BuildStatusMenu);
CreateServiceFunction(MS_CLIST_MENUPROCESSCOMMAND, MenuProcessCommand);
CreateServiceFunction(MS_CLIST_MENUPROCESSHOTKEY, MenuProcessHotkey);
- CreateServiceFunction("CList/AddProtoMenuItem", AddProtoMenuItem);
-
hPreBuildContactMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDCONTACTMENU);
hPreBuildMainMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDMAINMENU);
cli.hPreBuildStatusMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDSTATUSMENU);
@@ -1198,9 +1196,9 @@ void InitCustomMenus(void) CLISTMENUITEM mi = { 0 };
mi.position = 0x7fffffff;
mi.pszService = "CloseAction";
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- AddMainMenuItem(0, (LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
cli.currentStatusMenuItem = ID_STATUS_OFFLINE;
cli.currentDesiredStatusMode = ID_STATUS_OFFLINE;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index c899b5f1f4..dc3413ee4c 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -331,14 +331,14 @@ int LoadCLUIModule(void) CreateServiceFunction("CList/DeleteContactCommand", MenuItem_DeleteContact);
mi.position = 2000070000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- mi.pszName = LPGEN("De&lete");
+ mi.name.a = LPGEN("De&lete");
mi.pszService = "CList/DeleteContactCommand";
Menu_AddContactMenuItem(&mi);
CreateServiceFunction("CList/RenameContactCommand", MenuItem_RenameContact);
mi.position = 2000050000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
- mi.pszName = LPGEN("&Rename");
+ mi.name.a = LPGEN("&Rename");
mi.pszService = "CList/RenameContactCommand";
hRenameMenuItem = Menu_AddContactMenuItem(&mi);
@@ -346,7 +346,7 @@ int LoadCLUIModule(void) mi.position = -2050000000;
mi.flags |= CMIF_NOTONLIST;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
- mi.pszName = LPGEN("&Add permanently to list");
+ mi.name.a = LPGEN("&Add permanently to list");
mi.pszService = "CList/AddToListContactCommand";
Menu_AddContactMenuItem(&mi);
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index ea9efe510c..35da0d8310 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -1031,7 +1031,7 @@ int LoadFindAddModule(void) CLISTMENUITEM mi = { 0 }; mi.position = 500020000; mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER); - mi.pszName = LPGEN("&Find/add contacts..."); + mi.name.a = LPGEN("&Find/add contacts..."); mi.pszService = MS_FINDADD_FINDADD; hMainMenuItem = Menu_AddMainMenuItem(&mi); return 0; diff --git a/src/mir_app/src/framesmenu.cpp b/src/mir_app/src/framesmenu.cpp index d13fdccb82..72f2aa24b4 100644 --- a/src/mir_app/src/framesmenu.cpp +++ b/src/mir_app/src/framesmenu.cpp @@ -35,7 +35,6 @@ static HANDLE hPreBuildFrameMenuEvent; struct FrameMenuExecParam
{
ptrA szServiceName;
- INT_PTR param1;
};
INT_PTR FreeOwnerDataFrameMenu(WPARAM, LPARAM lParam)
@@ -56,7 +55,6 @@ static INT_PTR AddContextFrameMenuItem(WPARAM, LPARAM lParam) FrameMenuExecParam *fmep = new FrameMenuExecParam();
fmep->szServiceName = mir_strdup(mi->pszService);
- fmep->param1 = (INT_PTR)mi->pszContactOwner;
tmi.ownerdata = fmep;
return (INT_PTR)Menu_AddItem(hFrameMenuObject, &tmi);
}
@@ -70,7 +68,7 @@ INT_PTR FrameMenuExecService(WPARAM wParam, LPARAM lParam) if (fmep == NULL)
return -1;
- CallService(fmep->szServiceName, lParam, fmep->param1);
+ CallService(fmep->szServiceName, lParam, 0);
return 0;
}
diff --git a/src/mir_app/src/genmenu.cpp b/src/mir_app/src/genmenu.cpp index 71b1f7b5de..a420ced350 100644 --- a/src/mir_app/src/genmenu.cpp +++ b/src/mir_app/src/genmenu.cpp @@ -355,7 +355,7 @@ MIR_APP_DLL(int) Menu_ModifyItem(HGENMENU hMenuItem, const TCHAR *ptszName, HAND else pimi->iconId = -1, pimi->hIcolibItem = NULL;
}
else {
- pimi->mi.hIcon = (HICON)hIcon;
+ pimi->mi.hIcolibItem = (HICON)hIcon;
if (hIcon != NULL)
pimi->iconId = ImageList_ReplaceIcon(pimi->parent->m_hMenuIcons, pimi->iconId, (HICON)hIcon);
else
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp index 28f321a63b..df4fbe6bd5 100644 --- a/src/mir_app/src/meta_menu.cpp +++ b/src/mir_app/src/meta_menu.cpp @@ -360,7 +360,7 @@ void InitMenus() // main menu item
mi.icolibItem = GetIconHandle(I_MENUOFF);
- mi.pszName = LPGEN("Toggle metacontacts off");
+ mi.name.a = LPGEN("Toggle metacontacts off");
mi.pszService = "MetaContacts/OnOff";
mi.position = 500010000;
hMenuOnOff = Menu_AddMainMenuItem(&mi);
@@ -368,45 +368,45 @@ void InitMenus() // contact menu items
mi.icolibItem = GetIconHandle(I_CONVERT);
mi.position = -200010;
- mi.pszName = LPGEN("Convert to metacontact");
+ mi.name.a = LPGEN("Convert to metacontact");
mi.pszService = "MetaContacts/Convert";
hMenuConvert = Menu_AddContactMenuItem(&mi);
mi.icolibItem = GetIconHandle(I_ADD);
mi.position = -200009;
- mi.pszName = LPGEN("Add to existing metacontact...");
+ mi.name.a = LPGEN("Add to existing metacontact...");
mi.pszService = "MetaContacts/AddTo";
hMenuAdd = Menu_AddContactMenuItem(&mi);
mi.icolibItem = GetIconHandle(I_EDIT);
mi.position = -200010;
- mi.pszName = LPGEN("Edit metacontact...");
+ mi.name.a = LPGEN("Edit metacontact...");
mi.pszService = "MetaContacts/Edit";
hMenuEdit = Menu_AddContactMenuItem(&mi);
mi.icolibItem = GetIconHandle(I_SETDEFAULT);
mi.position = -200009;
- mi.pszName = LPGEN("Set as metacontact default");
+ mi.name.a = LPGEN("Set as metacontact default");
mi.pszService = "MetaContacts/Default";
hMenuDefault = Menu_AddContactMenuItem(&mi);
mi.icolibItem = GetIconHandle(I_REMOVE);
mi.position = -200008;
- mi.pszName = LPGEN("Delete metacontact");
+ mi.name.a = LPGEN("Delete metacontact");
mi.pszService = "MetaContacts/Delete";
hMenuDelete = Menu_AddContactMenuItem(&mi);
mi.position = -99000;
mi.flags = CMIF_HIDDEN;
mi.icolibItem = 0;
- mi.pszName = LPGEN("Subcontacts");
+ mi.name.a = LPGEN("Subcontacts");
hMenuRoot = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_HIDDEN;
mi.hParentMenu = hMenuRoot;
for (int i = 0; i < MAX_CONTACTS; i++) {
mi.position--;
- mi.pszName = "";
+ mi.name.a = "";
char buffer[512];
mir_snprintf(buffer, "MetaContacts/MenuFunc%d", i);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index dd9455a4bc..4daf0930f4 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -221,3 +221,7 @@ Menu_MeasureItem @218 Menu_EnableItem @219
Menu_SetChecked @220
Menu_CreateRoot @221
+Menu_AddContactMenuItem @222
+Menu_AddMainMenuItem @223
+Menu_AddProtoMenuItem @224
+Menu_AddStatusMenuItem @225
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 6f0ce211bd..e115db38c2 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -221,3 +221,7 @@ Menu_MeasureItem @218 Menu_EnableItem @219
Menu_SetChecked @220
Menu_CreateRoot @221
+Menu_AddContactMenuItem @222
+Menu_AddMainMenuItem @223
+Menu_AddProtoMenuItem @224
+Menu_AddStatusMenuItem @225
diff --git a/src/mir_app/src/movetogroup.cpp b/src/mir_app/src/movetogroup.cpp index 7deca5d376..55e90eac34 100644 --- a/src/mir_app/src/movetogroup.cpp +++ b/src/mir_app/src/movetogroup.cpp @@ -70,7 +70,7 @@ static void AddGroupItem(HGENMENU hRoot, TCHAR* name, int pos, WPARAM param, boo CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
mi.position = pos;
- mi.ptszName = PrepareGroupName(name);
+ mi.name.t = PrepareGroupName(name);
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
if (checked)
mi.flags |= CMIF_CHECKED;
@@ -79,7 +79,7 @@ static void AddGroupItem(HGENMENU hRoot, TCHAR* name, int pos, WPARAM param, boo Menu_ConfigureItem(result, MCI_OPT_EXECPARAM, param);
lphGroupsItems.insert((HANDLE*)result);
- mir_free(mi.ptszName);
+ mir_free(mi.name.t);
}
static int OnContactMenuBuild(WPARAM wParam, LPARAM)
@@ -90,7 +90,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) if (!hMoveToGroupItem) {
CLISTMENUITEM mi = { 0 };
mi.position = 100000;
- mi.pszName = LPGEN("&Move to group");
+ mi.name.a = LPGEN("&Move to group");
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUP);
hMoveToGroupItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index aee3be838e..1733efbc26 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -1296,7 +1296,7 @@ static int OptModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
mi.pszService = "Options/OptionsCommand";
Menu_AddMainMenuItem(&mi);
return 0;
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index d2b45a520a..cd98784e71 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -1021,7 +1021,7 @@ int OptProtosLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
- mi.pszName = LPGEN("&Accounts...");
+ mi.name.a = LPGEN("&Accounts...");
mi.pszService = MS_PROTO_SHOWACCMGR;
Menu_AddMainMenuItem(&mi);
return 0;
|