summaryrefslogtreecommitdiff
path: root/include/m_options.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-18 20:53:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-18 20:53:59 +0000
commit3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch)
tree3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /include/m_options.h
parent537b94169bf2483798a651ee3b96f7904eebe7b4 (diff)
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively - total internal redesign of options' translation - code reformatting git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_options.h')
-rw-r--r--include/m_options.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/m_options.h b/include/m_options.h
index 75c2df4057..5da817a71a 100644
--- a/include/m_options.h
+++ b/include/m_options.h
@@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_OPTIONS_H__
#define M_OPTIONS_H__
+extern int hLangpack;
+
/* Opt/Initialise
The user opened the options dialog. Modules should do whatever initialisation
they need and call opt/addpage one or more times if they want pages displayed
@@ -77,18 +79,15 @@ typedef struct {
int nExpertOnlyControls; //v0.1.2.1+ these controls will be hidden in simple mode. Array must remain valid for duration of dlg.
union {
- char* pszTab; //v0.6.0.0+ [TRANSLATED-BY-CORE]
- TCHAR* ptszTab; //v0.6.0.0+
- };
+ char* pszTab; //v0.6.0.0+ [TRANSLATED-BY-CORE]
+ TCHAR* ptszTab; //v0.6.0.0+
+ };
LPARAM dwInitParam; //v0.8.0.0+ a value to pass to lParam of WM_INITDIALOG message
+ int hLangpack;
}
OPTIONSDIALOGPAGE;
-#define OPTIONPAGE_OLD_SIZE (offsetof(OPTIONSDIALOGPAGE, flags))
-#define OPTIONPAGE_OLD_SIZE2 (offsetof(OPTIONSDIALOGPAGE, pszTab))
-#define OPTIONPAGE_OLD_SIZE3 (offsetof(OPTIONSDIALOGPAGE, dwInitParam))
-
#define ODPF_SIMPLEONLY 1 // page is only shown when in simple mode
#define ODPF_EXPERTONLY 2 // " expert mode
#define ODPF_BOLDGROUPS 4 // give group box titles a bold font
@@ -96,7 +95,7 @@ typedef struct {
#define ODPF_USERINFOTAB 16 // options page is tabbed
#define ODPF_DONTTRANSLATE 32 // do not translate option page title
-#if defined( _UNICODE )
+#if defined(_UNICODE)
#define ODPF_TCHAR ODPF_UNICODE
#else
#define ODPF_TCHAR 0
@@ -105,7 +104,11 @@ typedef struct {
#define PSN_EXPERTCHANGED 2 //sent to pages via WM_NOTIFY when the expert checkbox is clicked. lParam=new state
#define PSM_ISEXPERT (WM_USER+101) //returns true/false
#define PSM_GETBOLDFONT (WM_USER+102) //returns HFONT used for group box titles
-#define MS_OPT_ADDPAGE "Opt/AddPage"
+
+__inline static INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
+{ odp->hLangpack = hLangpack;
+ return CallService("Opt/AddPage", wParam, (LPARAM)odp);
+}
//Opens the options dialog, optionally at the specified page v0.1.2.1+
//wParam=0
@@ -120,7 +123,9 @@ typedef struct {
//specific page
const char *pszTab; //set to NULL to just open the options at no
//specific tab
-} OPENOPTIONSDIALOG;
+}
+ OPENOPTIONSDIALOG;
+
#define MS_OPT_OPENOPTIONS "Opt/OpenOptions"
//Opens the options dialog, with only specified page v0.8.0.x+