forked from pool/python-wxPython
74 lines
2.5 KiB
Diff
74 lines
2.5 KiB
Diff
|
From 7a198b8cae9a81cec4d25a0c6c5cc65ad8822bb2 Mon Sep 17 00:00:00 2001
|
||
|
From: Scott Talbert <swt@techie.net>
|
||
|
Date: Mon, 20 Nov 2023 22:12:58 -0500
|
||
|
Subject: [PATCH] Update wxTextCtrl OSX overrides since they're now documented
|
||
|
|
||
|
---
|
||
|
etg/textctrl.py | 48 +++++++++++++++++++++---------------------------
|
||
|
1 file changed, 21 insertions(+), 27 deletions(-)
|
||
|
|
||
|
diff --git a/etg/textctrl.py b/etg/textctrl.py
|
||
|
index af631a53..690d68c4 100644
|
||
|
--- a/etg/textctrl.py
|
||
|
+++ b/etg/textctrl.py
|
||
|
@@ -114,35 +114,29 @@ def parseAndTweakModule():
|
||
|
|
||
|
|
||
|
# OSX methods for controlling native features
|
||
|
- c.addCppMethod('void', 'OSXEnableAutomaticQuoteSubstitution', '(bool enable)',
|
||
|
- doc="Mac-only method for turning on/off automatic quote substitutions.",
|
||
|
- body="""\
|
||
|
- #ifdef __WXMAC__
|
||
|
- self->OSXEnableAutomaticQuoteSubstitution(enable);
|
||
|
- #else
|
||
|
- wxPyRaiseNotImplemented();
|
||
|
- #endif
|
||
|
- """)
|
||
|
+ c.find('OSXEnableAutomaticQuoteSubstitution').setCppCode("""\
|
||
|
+ #ifdef __WXMAC__
|
||
|
+ self->OSXEnableAutomaticQuoteSubstitution(enable);
|
||
|
+ #else
|
||
|
+ wxPyRaiseNotImplemented();
|
||
|
+ #endif
|
||
|
+ """)
|
||
|
|
||
|
- c.addCppMethod('void', 'OSXEnableAutomaticDashSubstitution', '(bool enable)',
|
||
|
- doc="Mac-only method for turning on/off automatic dash substitutions.",
|
||
|
- body="""\
|
||
|
- #ifdef __WXMAC__
|
||
|
- self->OSXEnableAutomaticDashSubstitution(enable);
|
||
|
- #else
|
||
|
- wxPyRaiseNotImplemented();
|
||
|
- #endif
|
||
|
- """)
|
||
|
+ c.find('OSXEnableAutomaticDashSubstitution').setCppCode("""\
|
||
|
+ #ifdef __WXMAC__
|
||
|
+ self->OSXEnableAutomaticDashSubstitution(enable);
|
||
|
+ #else
|
||
|
+ wxPyRaiseNotImplemented();
|
||
|
+ #endif
|
||
|
+ """)
|
||
|
|
||
|
- c.addCppMethod('void', 'OSXDisableAllSmartSubstitutions', '()',
|
||
|
- doc="Mac-only method to disable all automatic text substitutions.",
|
||
|
- body="""\
|
||
|
- #ifdef __WXMAC__
|
||
|
- self->OSXDisableAllSmartSubstitutions();
|
||
|
- #else
|
||
|
- wxPyRaiseNotImplemented();
|
||
|
- #endif
|
||
|
- """)
|
||
|
+ c.find('OSXDisableAllSmartSubstitutions').setCppCode("""\
|
||
|
+ #ifdef __WXMAC__
|
||
|
+ self->OSXDisableAllSmartSubstitutions();
|
||
|
+ #else
|
||
|
+ wxPyRaiseNotImplemented();
|
||
|
+ #endif
|
||
|
+ """)
|
||
|
|
||
|
# TODO: add support for wxTextProofOptions (only supported on MSW/GTK3)
|
||
|
# so will need stubs on other platforms.
|
||
|
--
|
||
|
2.43.0
|
||
|
|