diff options
author | George Hazan <george.hazan@gmail.com> | 2012-08-04 18:57:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-08-04 18:57:44 +0000 |
commit | d716f207aa8b71f35e3872fd6b34651703c2beb7 (patch) | |
tree | 1ddff4e84ac5bc8e73e3796f1d9b07d7b6599388 /plugins | |
parent | c3fbe61899fda92575cdaec8e29301ea2707d8e6 (diff) |
links to options don't work with langpacks
git-svn-id: http://svn.miranda-ng.org/main/trunk@1355 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Alarms/src/frame.cpp | 2 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/settingsdlg.cpp | 13 | ||||
-rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 4 | ||||
-rw-r--r-- | plugins/BossKeyPlus/src/Options.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/main_window.cpp | 2 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/MenuItemEx/src/main.cpp | 31 | ||||
-rw-r--r-- | plugins/ModernOpt/src/modernopt.cpp | 2 | ||||
-rw-r--r-- | plugins/ModernOpt/src/mopt_home.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Options.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/opt_class.cpp | 2 | ||||
-rw-r--r-- | plugins/QuickReplies/src/events.cpp | 4 | ||||
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 2 | ||||
-rwxr-xr-x | plugins/StopSpamMod/src/utilities.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/mir_smileys.cpp | 10 |
17 files changed, 37 insertions, 51 deletions
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 6ebb459026..15fa91accc 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -407,7 +407,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar oop.pszGroup = Translate("Events");
oop.pszPage = Translate("Alarms");
oop.pszTab = 0;
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&oop);
+ Options_Open(&oop);
}
break;
case ID_REMINDERFRAMECONTEXT_SUSPEND:
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 377882b3c1..046ddb322b 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -326,12 +326,13 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR }
break;
case IDC_URL_IDLE:
- { OPENOPTIONSDIALOG ood;
- ood.cbSize=sizeof(ood);
- ood.pszGroup="Status"; /* autotranslated */
- ood.pszPage="Idle"; /* autotranslated */
- ood.pszTab=NULL;
- CallService(MS_OPT_OPENOPTIONS,0,(LPARAM)&ood);
+ {
+ OPENOPTIONSDIALOG ood;
+ ood.cbSize = sizeof(ood);
+ ood.pszGroup = "Status"; /* autotranslated */
+ ood.pszPage = "Idle"; /* autotranslated */
+ ood.pszTab = NULL;
+ Options_Open(&ood);
return TRUE;
}
case IDC_COMBO_SHUTDOWNTYPE:
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 0226f87508..a518914278 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -593,7 +593,7 @@ void OpenOptions(char* group, char* page, char* tab = NULL) op.pszGroup = group;
op.pszPage = page;
op.pszTab = tab;
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&op);
+ Options_Open(&op);
}
#define DlgReturn(ret){\
@@ -668,7 +668,7 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP OPENOPTIONSDIALOG opd = {0};
opd.cbSize = sizeof(OPENOPTIONSDIALOG);
opd.pszPage = LPGEN("History");
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&opd);
+ Options_Open(&opd);
DlgReturn(TRUE);
}
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp index eefb5bac96..838f329673 100644 --- a/plugins/BossKeyPlus/src/Options.cpp +++ b/plugins/BossKeyPlus/src/Options.cpp @@ -244,7 +244,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Hotkeys";
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
return (true);
} break;
}
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index f3ca4f21da..934ed51487 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -566,7 +566,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) odp.pszGroup = "Services";
odp.pszPage = modFullname;
odp.pszTab = 0;
- CallService(MS_OPT_OPENOPTIONS,0,(LPARAM)&odp);
+ Options_Open(&odp);
break;
}
return TRUE; // case WM_COMMAND
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index ef94ab8872..601cfe88e4 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -268,7 +268,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Folders";
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
break;
}
}
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 760520ce91..ca7a914527 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -19,8 +19,8 @@ const int vf_default = VF_VS|VF_HFL|VF_IGN|VF_CID|VF_SHOWID|VF_RECV|VF_STAT|VF_SMNAME|VF_CIDN|VF_CIP;
HINSTANCE hinstance;
-HANDLE hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuthReq;
-HANDLE hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
+HGENMENU hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuthReq;
+HGENMENU hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
static HANDLE hIgnoreItem[9], hProtoItem[MAX_PROTOS], hHooks[8], hServices[12];
HICON hIcon[5];
BOOL bMetaContacts, bMir_08;
@@ -914,20 +914,17 @@ INT_PTR onIgnore(WPARAM wparam,LPARAM lparam) return 0;
}
-static HANDLE AddSubmenuItem(HANDLE hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
+static HANDLE AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
{
- CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
- mi.hParentMenu = (HGENMENU)hRoot;
- mi.pszPopupName = (char*)hRoot; // for Miranda 0.7
- mi.popupPosition = param;
- mi.position = pos;
- mi.ptszName = name;
- mi.hIcon = icon;
- mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP;
- if (flag)
- mi.flags |= flag;
- mi.pszService = service;
+ CLISTMENUITEM mi = { 0 };
+ mi.cbSize = sizeof(mi);
+ mi.hParentMenu = hRoot;
+ mi.popupPosition = param;
+ mi.position = pos;
+ mi.ptszName = name;
+ mi.hIcon = icon;
+ mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP | flag;
+ mi.pszService = service;
return Menu_AddContactMenuItem(&mi);
}
@@ -1094,7 +1091,7 @@ int EnumProtoSubmenu(WPARAM wparam, LPARAM lparam) protoCount = MAX_PROTOS;
for (i = 0; i < protoCount; i++)
{
- hProtoItem[i] = AddSubmenuItem((HGENMENU)hmenuProto, accs[i]->tszAccountName,
+ hProtoItem[i] = AddSubmenuItem(hmenuProto, accs[i]->tszAccountName,
LoadSkinnedProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE), CMIF_KEEPUNTRANSLATED,
MS_PROTO, pos++, (int)accs[i]->szModuleName);
}
@@ -1270,7 +1267,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) ood.cbSize = sizeof(ood);
ood.pszGroup = "Events";
ood.pszPage = "Ignore";
- AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, MS_OPT_OPENOPTIONS, pos, (int)&ood );
+ AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood );
mi.pszPopupName = 0;
if (bMir_08) {
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index 5dd9dc302e..3c616bbcc2 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -273,7 +273,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, ood.pszGroup = obj->optObject.lpzClassicGroup;
ood.pszPage = obj->optObject.lpzClassicPage;
ood.pszTab = obj->optObject.lpzClassicTab;
- HWND hwndOpt = (HWND)CallService(MS_OPT_OPENOPTIONSPAGE, 0, (LPARAM)&ood);
+ HWND hwndOpt = Options_OpenPage(&ood);
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
}
else {
diff --git a/plugins/ModernOpt/src/mopt_home.cpp b/plugins/ModernOpt/src/mopt_home.cpp index b9ef4a3ffb..214a0d664b 100644 --- a/plugins/ModernOpt/src/mopt_home.cpp +++ b/plugins/ModernOpt/src/mopt_home.cpp @@ -57,7 +57,7 @@ INT_PTR CALLBACK ModernOptHome_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L {
OPENOPTIONSDIALOG ood = {0};
ood.cbSize = sizeof(ood);
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
}
break;
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 8c02d2eeb8..9a3d9e4c55 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -249,7 +249,7 @@ INT_PTR CALLBACK DlgProcGeneralOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Sounds";
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
return FALSE;
}
}
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index a8464746c6..14c44f0937 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -108,7 +108,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ood.cbSize = sizeof(ood);
ood.pszGroup = "Customize";
ood.pszPage = "Hotkeys";
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
}
return true;
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index bba0731eda..82d71b288a 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -397,7 +397,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l ood.cbSize = sizeof(OPENOPTIONSDIALOG);
ood.pszGroup = "Customize";
ood.pszPage = "Fonts & Colors";
- CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
}
break;
case IDC_SOFFLINE: case IDC_SONLINE: case IDC_SAWAY: case IDC_SNA: case IDC_SOCCUPIED:
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index 2227c6d6f1..4fdf1827fb 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -111,9 +111,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) ood.pszGroup = "Message Sessions";
ood.pszPage = "Quick Replies";
ood.pszTab = buttonName;
-
- CallService(MS_OPT_OPENOPTIONS, NULL, (LPARAM)&ood);
-
+ Options_Open(&ood);
return 0;
}
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index f688efc50a..fb660d59d7 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -829,7 +829,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, ood.pszGroup = "Customize";
ood.pszPage = "Fonts & Colors";
ood.pszTab = NULL;
- CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ Options_Open(&ood);
}
break;
case IDC_LOADCOUNT:
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 3685091b25..6d60d22106 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -511,7 +511,7 @@ std::string toUTF8(std::wstring str) try{ utf8::utf16to8(str.begin(), str.end(), back_inserter(ustr)); } - catch(const std::exception &e) + catch(const std::exception&) { //TODO: handle utf8cpp exceptions } @@ -532,7 +532,7 @@ std::wstring toUTF16(std::string str) //convert as much as possible utf8::replace_invalid(str.begin(), str.end(), back_inserter(tmpstr)); utf8::utf8to16(tmpstr.begin(), tmpstr.end(), back_inserter(ustr)); } - catch(const std::exception &e) + catch(const std::exception &) { //TODO: handle utf8cpp exceptions } diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 2c933a61cb..a2f09e2d45 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -485,7 +485,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) ood.pszPage = "Message Sessions";
ood.pszTab = NULL;
M->WriteByte(SRMSGMOD_T, "opage", 3); // force 3th tab to appear
- CallService (MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ Options_Open(&ood);
return 1;
}
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 9ba815eac3..f736bf991c 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -22,16 +22,6 @@ Boston, MA 02111-1307, USA. #include "options.h"
#include "mir_smileys.h"
-
-
-void *mir_calloc(size_t size)
-{
- void *ptr = mir_alloc(size);
- if (ptr) memset(ptr, 0, size);
-
- return ptr;
-}
-
int InitTipperSmileys()
{
// Register smiley category
|