Commit Graph

145 Commits

Author SHA1 Message Date
Robin Dunn
f00702242f wxOutputStream wrapers and typemaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-02 23:43:46 +00:00
Robin Dunn
1d7b76e4cb Fix reference leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-14 00:32:04 +00:00
Robin Dunn
9e1729e51c fix some warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-05 18:11:20 +00:00
Robin Dunn
9f4a1fed45 Don't decref if the interpreter is not initialized, (eg. it's in its
shutdown process.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-28 02:59:02 +00:00
Robin Dunn
debe38c933 Add wxRect2D
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-27 06:06:20 +00:00
Robin Dunn
61ecd22547 some GTK1 bulkd fixes from Sander Niemeijer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-25 20:47:15 +00:00
Robin Dunn
cd0a59fb7f the Append also does an INCREF, that's one more than we need.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-22 04:13:04 +00:00
Robin Dunn
281c54cc42 helpers and typemaps for new GraphicsContext methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-11 04:42:49 +00:00
Robin Dunn
e12096a94e s_macSupportPCMenuShortcuts no longer exists
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-21 22:42:45 +00:00
Robin Dunn
04a1f76c2a Add items to wx.PlatformInfo for mac core graphics and native toolbar
build status


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-08 20:05:19 +00:00
Robin Dunn
8383c11698 Comment why we don't call PyErr_Print after calling OnInit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-07 17:19:22 +00:00
Robin Dunn
28cc717d5a Add alpha component to wxColour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-26 20:37:29 +00:00
Robin Dunn
4d9de11075 Add wx.App.DisplayAvailable() which can be used to determine if a GUI
can be created in the current environment.  (Still need an
implementation for wxMSW...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-25 21:53:12 +00:00
Robin Dunn
b1dc7b4c5d Change the other OnAssert --> OnAssertFailure
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-22 23:01:44 +00:00
Robin Dunn
a608c09d85 Changes needed for building with Python 2.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-05 00:37:11 +00:00
Robin Dunn
d00077abbe Switch to overriding OnAssertFailure instead of OnAssert
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-10 03:31:01 +00:00
Robin Dunn
57ffa5851d Redo (again) how the stock objects are initialized in wxPython.
Factor out the wxPyTwoIntItem_helper template function so it can be
used in other extension modules.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-04 02:03:39 +00:00
Robin Dunn
99a001dd43 Changed how the stock objects (wx.RED, wx.RED_PEN, wx.RED_BRUSH, etc.)
are initialized.  They are now created as a wrapper object that
initializes itself on first use (when an attribute of the object is
requested.)  This was needed because of similar delayed initialization
functionality that was implemented in wxWidgets, but the end result is
cleaner for wxPython as well, and allowed me to remove some ugly code
under the covers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-18 21:49:48 +00:00
Robin Dunn
369ac260a9 Sometimes we do need to allow recursion of callbacks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-14 01:28:22 +00:00
Robin Dunn
a7a0141800 Changes to how overridable C++ methods are virtualized for Python.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-07 03:56:44 +00:00
Robin Dunn
1ea8df6e6b Changes needed to be able to build with SWIG 1.3.24, 1.3.27 as well as
the upcoming 1.3.28, using #if statements on SWIG_VERSION.

Adjustments to ownership of SWIG objects, add some destructors and
explicitly disown non-window objects when their ownership is
transfered to a C++ object.

Since all window objects are owned by their parent, or by themselves,
always set their thisown attribute to False.

Explicitly set thisown to False after any Destroy() methods are
called, so SWIG doesn't try to destroy them again.

Etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-29 02:33:00 +00:00
Robin Dunn
02b800ce7c Merged modifications from the 2.6 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-12-30 23:02:03 +00:00
Robin Dunn
15c892875c Don't set mac.textcontrol-use-mlte any longer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-25 01:41:15 +00:00
Robin Dunn
ea19c9a899 Ensure that Python is initialized before doing any locking in
wxPyBeginBlockThreads and wxPyEndBlockThreads as these can be
triggered after Python has been finalized in embedding situations.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-11 17:06:22 +00:00
Robin Dunn
f3c2a60b95 Roll wxPyMake_wxSizer into wxPyMake_wxObject.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-02 23:42:16 +00:00
Robin Dunn
10c3910e9b init wxApp->argc and wxApp->argv even when wx has already been initialized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-29 19:00:31 +00:00
Robin Dunn
69ac96fd0d Better handling of the refcount of the wx.App object, so it now
destroyed when expected and also resets the current instance pointer
returned by wx.GetApp().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-11 19:14:34 +00:00
Robin Dunn
c6d4dac5f4 corrected DSM
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-04 15:45:59 +00:00
Robin Dunn
bd07485ce3 Add extern "C" to DllMain
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-04 15:32:17 +00:00
Robin Dunn
bdd9b1ad47 Use MLTE by default for wxPython
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-03 23:54:12 +00:00
Robin Dunn
2809785e15 Put the Python executable pathname in wxTheApp->argv[0] so the
stackwalker won't freak out at trying to find program addresses inside
of .py files!


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-02 01:55:41 +00:00
Robin Dunn
822e03eeff Don't use the PyGILState_* APIs with Python 2.3, it causes a problem
with Boa's debugger.  :-(


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-12 21:03:18 +00:00
Robin Dunn
6e6b35578d Use the PyGILState_* APIs on Python >= 2.3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-09 22:28:52 +00:00
Robin Dunn
43d6e3cae1 Move wxPyCallback back to derive from wxObject
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-08 00:41:35 +00:00
Robin Dunn
d02ea46cad Add copy ctor for wxPyCBInputStream and use it to prevent double
deletion of the wxInputStream passed to wxFSFile


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-03 19:56:42 +00:00
Robin Dunn
ac03a19f93 wxPyCallback needs to derive from wxEvtHandler now since the
wxObjectEventFunction typedef changed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-18 19:28:16 +00:00
Robin Dunn
94fd5e4dc1 Allow the OOR reference to be saved without doing an INCREF. This
solves the circular reference problem with wx.Timer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-20 22:50:29 +00:00
Robin Dunn
27c9e43cc0 Instead of always using the Python default encoding for converting
string and unicode objects to/from wxStrings.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-15 21:15:28 +00:00
Robin Dunn
f464a4f2af Added wxPyInputStream dtor. Use PyLong_FromLongLong iff needed for wxFileOffset
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-19 19:28:46 +00:00
Robin Dunn
ab897a69db Reset LC_NUMERIC to "C" for Python < 2.4. This fixes Python's float parser.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-12 18:12:49 +00:00
Vadim Zeitlin
588066b7a3 replaced wxStream::GetSize() with GetLength() (still keep the former but it will be deprecated) (second part of patch 1063498)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-10 21:10:30 +00:00
Robin Dunn
db301e681f Tweak unicode --> string conversion helper so UnicodeDecodeError is
raised when appropriate instead ofg just catching everything and
raising TypeError


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 19:28:34 +00:00
Robin Dunn
ae13f29275 * Don't reset LC_NUMERIC if on Python 2.4
* Always save the tstate


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 00:54:53 +00:00
Robin Dunn
9fd1fa4b1a check for wxHAS_HUGE_FILES
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-09 01:26:43 +00:00
Robin Dunn
1c97259a91 A better fix for GetXWindow that can handle both the wx widgets and
the native widgets.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-30 01:17:18 +00:00
Robin Dunn
3bc06221f0 off_t --> wxFileOffset changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-29 16:42:36 +00:00
Robin Dunn
ce102f9d50 Corected GetXWindow macro for wxGTK port. (Bug# 1033681)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-24 16:18:37 +00:00
Robin Dunn
4519a2d911 More True/False fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-24 00:11:19 +00:00
Robin Dunn
0320aeddcd ensure that the wxString gets all the wide chars
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-10 21:36:25 +00:00
Robin Dunn
6f845b2215 Only initialize wxWidgets once
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-26 17:07:46 +00:00