diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-20 16:03:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-20 16:03:04 +0000 |
commit | d7b15f5f89319f1a9077efb50bd3a242a5dc2b52 (patch) | |
tree | a28c1bfd2a40556cb61f95ec67e1d9aabeb82cd5 /protocols | |
parent | 5c7ba495c74de2d7342ad05c59632b43c1d5321f (diff) |
fixes for various hangups & crashes on exit
git-svn-id: http://svn.miranda-ng.org/main/trunk@3652 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.cpp | 47 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 8 |
2 files changed, 37 insertions, 18 deletions
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 94748a39d9..c125213b1b 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -498,7 +498,7 @@ void CJabberProto::CheckAllContactsAreTransported() /////////////////////////////////////////////////////////////////////////////////////////
// Cross-instance shared icons
-static IconItem sharedIconList[] =
+static IconItem sharedIconList1[] =
{
{ LPGEN("Privacy Lists"), "privacylists", IDI_PRIVACY_LISTS },
{ LPGEN("Bookmarks"), "bookmarks", IDI_BOOKMARKS },
@@ -520,24 +520,33 @@ static IconItem sharedIconList[] = { LPGEN("Service Discovery"), "servicediscovery", IDI_SERVICE_DISCOVERY },
{ LPGEN("AdHoc Command"), "adhoc", IDI_COMMAND },
{ LPGEN("XML Console"), "xmlconsole", IDI_CONSOLE },
- { LPGEN("OpenID Request"), "openid", IDI_HTTP_AUTH },
+ { LPGEN("OpenID Request"), "openid", IDI_HTTP_AUTH }
+};
+static IconItem sharedIconList2[] =
+{
{ LPGEN("Discovery succeeded"), "disco_ok", IDI_DISCO_OK },
{ LPGEN("Discovery failed"), "disco_fail", IDI_DISCO_FAIL },
{ LPGEN("Discovery in progress"), "disco_progress", IDI_DISCO_PROGRESS },
{ LPGEN("View as tree"), "sd_view_tree", IDI_VIEW_TREE },
{ LPGEN("View as list"), "sd_view_list", IDI_VIEW_LIST },
{ LPGEN("Apply filter"), "sd_filter_apply", IDI_FILTER_APPLY },
- { LPGEN("Reset filter"), "sd_filter_reset", IDI_FILTER_RESET },
+ { LPGEN("Reset filter"), "sd_filter_reset", IDI_FILTER_RESET }
+};
+static IconItem sharedIconList3[] =
+{
{ LPGEN("Navigate home"), "sd_nav_home", IDI_NAV_HOME },
{ LPGEN("Refresh node"), "sd_nav_refresh", IDI_NAV_REFRESH },
{ LPGEN("Browse node"), "sd_browse", IDI_BROWSE },
{ LPGEN("RSS service"), "node_rss", IDI_NODE_RSS },
{ LPGEN("Server"), "node_server", IDI_NODE_SERVER },
{ LPGEN("Storage service"), "node_store", IDI_NODE_STORE },
- { LPGEN("Weather service"), "node_weather", IDI_NODE_WEATHER },
+ { LPGEN("Weather service"), "node_weather", IDI_NODE_WEATHER }
+};
+static IconItem sharedIconList4[] =
+{
{ LPGEN("Generic privacy list"), "pl_list_any", IDI_PL_LIST_ANY },
{ LPGEN("Active privacy list"), "pl_list_active", IDI_PL_LIST_ACTIVE },
{ LPGEN("Default privacy list"), "pl_list_default", IDI_PL_LIST_DEFAULT },
@@ -550,22 +559,36 @@ static IconItem sharedIconList[] = { LPGEN("Deny Messages"), "pl_msg_deny", IDI_PL_MSG_DENY },
{ LPGEN("Deny Presences (in)"), "pl_prin_deny", IDI_PL_PRIN_DENY },
{ LPGEN("Deny Presences (out)"), "pl_prout_deny", IDI_PL_PROUT_DENY },
- { LPGEN("Deny Queries"), "pl_iq_deny", IDI_PL_QUERY_DENY },
+ { LPGEN("Deny Queries"), "pl_iq_deny", IDI_PL_QUERY_DENY }
};
void g_IconsInit()
{
- Icon_Register(hInst, "Protocols/Jabber", sharedIconList, 21, GLOBAL_SETTING_PREFIX);
- Icon_Register(hInst, "Protocols/Jabber/Dialogs", sharedIconList+21, 7, GLOBAL_SETTING_PREFIX);
- Icon_Register(hInst, "Protocols/Dialogs/Discovery", sharedIconList+28, 7, GLOBAL_SETTING_PREFIX);
- Icon_Register(hInst, "Protocols/Dialogs/Privacy", sharedIconList+35, 13, GLOBAL_SETTING_PREFIX);
+ Icon_Register(hInst, LPGEN("Protocols")"/"LPGEN("Jabber"), sharedIconList1, SIZEOF(sharedIconList1), GLOBAL_SETTING_PREFIX);
+ Icon_Register(hInst, LPGEN("Protocols")"/"LPGEN("Jabber")"/"LPGEN("Dialogs"), sharedIconList2, SIZEOF(sharedIconList2), GLOBAL_SETTING_PREFIX);
+ Icon_Register(hInst, LPGEN("Protocols")"/"LPGEN("Dialogs")"/"LPGEN("Discovery"), sharedIconList3, SIZEOF(sharedIconList3), GLOBAL_SETTING_PREFIX);
+ Icon_Register(hInst, LPGEN("Protocols")"/"LPGEN("Dialogs")"/"LPGEN("Privacy"), sharedIconList4, SIZEOF(sharedIconList4), GLOBAL_SETTING_PREFIX);
}
HANDLE g_GetIconHandle(int iconId)
{
- for (int i=0; i < SIZEOF(sharedIconList); i++)
- if (sharedIconList[i].defIconID == iconId)
- return sharedIconList[i].hIcolib;
+ int i;
+
+ for (i=0; i < SIZEOF(sharedIconList1); i++)
+ if (sharedIconList1[i].defIconID == iconId)
+ return sharedIconList1[i].hIcolib;
+
+ for (i=0; i < SIZEOF(sharedIconList2); i++)
+ if (sharedIconList2[i].defIconID == iconId)
+ return sharedIconList2[i].hIcolib;
+
+ for (i=0; i < SIZEOF(sharedIconList3); i++)
+ if (sharedIconList3[i].defIconID == iconId)
+ return sharedIconList3[i].hIcolib;
+
+ for (i=0; i < SIZEOF(sharedIconList4); i++)
+ if (sharedIconList4[i].defIconID == iconId)
+ return sharedIconList4[i].hIcolib;
return NULL;
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 3ec7c0b4b3..8e18335d19 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -202,14 +202,10 @@ void g_MenuInit(void) List_InsertPtr(&arServices, CreateServiceFunction("Jabber/MenuChoose", JabberMenuChooseService));
- TMenuParam mnu = {0};
- mnu.cbSize = sizeof(mnu);
- mnu.name = "JabberAccountChooser";
- mnu.ExecService = "Jabber/MenuChoose";
+ TMenuParam mnu = { sizeof(mnu), "JabberAccountChooser", "Jabber/MenuChoose" };
hChooserMenu = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&mnu);
- TMO_MenuItem tmi = { 0 };
- tmi.cbSize = sizeof(tmi);
+ TMO_MenuItem tmi = { sizeof(tmi) };
tmi.flags = CMIF_ICONFROMICOLIB;
tmi.pszName = "Cancel";
tmi.position = 9999999;
|