From: Robin Dunn Date: Wed, 27 Mar 2002 01:10:28 +0000 (+0000) Subject: Updates for new wxToolBar API X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c12de7f83ada39e1f80d8bb55a893177e928153c Updates for new wxToolBar API git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/wxFloatBar.py b/wxPython/demo/wxFloatBar.py index ad3057584e..5a7afb92eb 100644 --- a/wxPython/demo/wxFloatBar.py +++ b/wxPython/demo/wxFloatBar.py @@ -21,28 +21,27 @@ class TestFloatBar(wxFrame): tb.SetTitle("Floating!") self.CreateStatusBar() - tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'") + tb.AddSimpleTool(10, '', images.getNewBitmap(), "New", "Long help for 'New'") EVT_TOOL(self, 10, self.OnToolClick) EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick) - tb.AddSimpleTool(20, images.getOpenBitmap(), "Open") + tb.AddSimpleTool(20, '', images.getOpenBitmap(), "Open") EVT_TOOL(self, 20, self.OnToolClick) EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick) tb.AddSeparator() - tb.AddSimpleTool(30, images.getCopyBitmap(), "Copy") + tb.AddSimpleTool(30, '', images.getCopyBitmap(), "Copy") EVT_TOOL(self, 30, self.OnToolClick) EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick) - tb.AddSimpleTool(40, images.getPasteBitmap(), "Paste") + tb.AddSimpleTool(40, '', images.getPasteBitmap(), "Paste") EVT_TOOL(self, 40, self.OnToolClick) EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick) tb.AddSeparator() - tb.AddTool(60, images.getTog1Bitmap(), images.getTog2Bitmap(), - shortHelpString="Toggle with 2 bitmaps", isToggle=true) + tb.AddCheckTool(60, '', images.getTog1Bitmap(), images.getTog2Bitmap()) EVT_TOOL(self, 60, self.OnToolClick) EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick) tb.Realize() @@ -65,8 +64,6 @@ class TestFloatBar(wxFrame): def OnToolRClick(self, event): self.log.WriteText("tool %s right-clicked\n" % event.GetId()) - # def test(self, event): - # self.log.WriteText("Button clicked!") #--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxToolBar.py b/wxPython/demo/wxToolBar.py index d2a2267866..a3a5fa712b 100644 --- a/wxPython/demo/wxToolBar.py +++ b/wxPython/demo/wxToolBar.py @@ -23,32 +23,32 @@ class TestToolBar(wxFrame): self.CreateStatusBar() - tb.AddSimpleTool(10, images.getNewBitmap(), "New", "Long help for 'New'") + tb.AddSimpleTool(10, '', images.getNewBitmap(), "New", "Long help for 'New'") EVT_TOOL(self, 10, self.OnToolClick) EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick) - tb.AddSimpleTool(20, images.getOpenBitmap(), "Open", "Long help for 'Open'") + tb.AddSimpleTool(20, '', images.getOpenBitmap(), "Open", "Long help for 'Open'") EVT_TOOL(self, 20, self.OnToolClick) EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick) tb.AddSeparator() - tb.AddSimpleTool(30, images.getCopyBitmap(), "Copy", "Long help for 'Copy'") + tb.AddSimpleTool(30, '', images.getCopyBitmap(), "Copy", "Long help for 'Copy'") EVT_TOOL(self, 30, self.OnToolClick) EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick) - tb.AddSimpleTool(40, images.getPasteBitmap(), "Paste", "Long help for 'Paste'") + tb.AddSimpleTool(40, '', images.getPasteBitmap(), "Paste", "Long help for 'Paste'") EVT_TOOL(self, 40, self.OnToolClick) EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick) tb.AddSeparator() - tool = tb.AddTool(50, images.getTog1Bitmap(), - shortHelpString="Toggle this", isToggle=true) + tool = tb.AddCheckTool(50, '', images.getTog1Bitmap(), + shortHelp="Toggle this") EVT_TOOL(self, 50, self.OnToolClick) - tb.AddTool(60, images.getTog1Bitmap(), images.getTog2Bitmap(), - shortHelpString="Toggle with 2 bitmaps", isToggle=true) - EVT_TOOL(self, 60, self.OnToolClick) + #tb.AddCheckTool(60, '', images.getTog1Bitmap(), images.getTog2Bitmap(), + # shortHelp="Toggle with 2 bitmaps") + #EVT_TOOL(self, 60, self.OnToolClick) EVT_TOOL_ENTER(self, -1, self.OnToolEnter) EVT_TOOL_RCLICKED(self, -1, self.OnToolRClick) # Match all diff --git a/wxPython/distrib/make_installer.py b/wxPython/distrib/make_installer.py index f8b14332ae..868b98d79f 100644 --- a/wxPython/distrib/make_installer.py +++ b/wxPython/distrib/make_installer.py @@ -69,7 +69,7 @@ Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwayssk Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core Source: "%(WXDIR)s\lib\%(WXDLL)s"; DestDir: "{app}\wxPython"; Components: core -;;%(MSLU)s +%(MSLU)s Source: "wxPython\wxc.pyd"; DestDir: "{app}\wxPython"; Components: core Source: "wxPython\wxc.pyd.manifest"; DestDir: "{app}\wxPython"; Components: core Source: "wxPython\gridc.pyd"; DestDir: "{app}\wxPython"; Components: core @@ -310,8 +310,8 @@ def main(): PYVER = PYVER + "-hybrid" MSLU='' -## if len(sys.argv) > 1 and sys.argv[1] == "UNICODE=1": -## MSLU=r'Source: "%(WXDIR)s\lib\unicows.dll"; DestDir: "{app}\wxPython"; Components: core' % vars() + if len(sys.argv) > 1 and sys.argv[1] == "UNICODE=1": + MSLU=r'Source: "%(WXDIR)s\lib\unicows.dll"; DestDir: "{code:GetPythonDir}"; Components: core' % vars() f = open(ISSFILE, "w") f.write(ISS_Template % vars()) diff --git a/wxPython/setup.py b/wxPython/setup.py index d68ad98d98..cc03abb6cc 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -13,7 +13,7 @@ from my_distutils import run_swig, contrib_copy_tree # flags and values that affect this script #---------------------------------------------------------------------- -VERSION = "2.3.3pre2u" +VERSION = "2.3.3pre2" DESCRIPTION = "Cross platform GUI toolkit for Python" AUTHOR = "Robin Dunn" AUTHOR_EMAIL = "Robin Dunn " diff --git a/wxPython/src/__version__.py b/wxPython/src/__version__.py index eb749d7dc6..e4ca44172f 100644 --- a/wxPython/src/__version__.py +++ b/wxPython/src/__version__.py @@ -1 +1 @@ -ver = '2.3.3pre2u' +ver = '2.3.3pre2' diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index c600fd4dae..2524b61b1a 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -1748,8 +1748,8 @@ static PyObject *_wrap_wxToolBarBase_AddCheckTool(PyObject *self, PyObject *args wxString * _arg2; wxBitmap * _arg3; wxBitmap * _arg4 = (wxBitmap *) &wxNullBitmap; - wxString * _arg5 = (wxString *) &wxEmptyString; - wxString * _arg6 = (wxString *) &wxEmptyString; + wxString * _arg5 = (wxString *) &wxPyEmptyString; + wxString * _arg6 = (wxString *) &wxPyEmptyString; PyObject * _arg7 = (PyObject *) NULL; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -1842,8 +1842,8 @@ static PyObject *_wrap_wxToolBarBase_AddRadioTool(PyObject *self, PyObject *args wxString * _arg2; wxBitmap * _arg3; wxBitmap * _arg4 = (wxBitmap *) &wxNullBitmap; - wxString * _arg5 = (wxString *) &wxEmptyString; - wxString * _arg6 = (wxString *) &wxEmptyString; + wxString * _arg5 = (wxString *) &wxPyEmptyString; + wxString * _arg6 = (wxString *) &wxPyEmptyString; PyObject * _arg7 = (PyObject *) NULL; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -1938,8 +1938,8 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, wxBitmap * _arg4; wxBitmap * _arg5 = (wxBitmap *) &wxNullBitmap; wxItemKind _arg6 = (wxItemKind ) wxITEM_NORMAL; - wxString * _arg7 = (wxString *) &wxEmptyString; - wxString * _arg8 = (wxString *) &wxEmptyString; + wxString * _arg7 = (wxString *) &wxPyEmptyString; + wxString * _arg8 = (wxString *) &wxPyEmptyString; PyObject * _arg9 = (PyObject *) NULL; PyObject * _argo0 = 0; PyObject * _obj3 = 0; @@ -2030,8 +2030,8 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * wxString * _arg3; wxBitmap * _arg4; wxItemKind _arg5 = (wxItemKind ) wxITEM_NORMAL; - wxString * _arg6 = (wxString *) &wxEmptyString; - wxString * _arg7 = (wxString *) &wxEmptyString; + wxString * _arg6 = (wxString *) &wxPyEmptyString; + wxString * _arg7 = (wxString *) &wxPyEmptyString; PyObject * _argo0 = 0; PyObject * _obj3 = 0; PyObject * _argo4 = 0; diff --git a/wxPython/src/stattool.i b/wxPython/src/stattool.i index d209ba87e7..51887643c4 100644 --- a/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -206,8 +206,8 @@ public: const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, - const wxString& shortHelp = wxEmptyString, - const wxString& longHelp = wxEmptyString, + const wxString& shortHelp = wxPyEmptyString, + const wxString& longHelp = wxPyEmptyString, PyObject *clientData = NULL) { wxPyUserData* udata = NULL; @@ -223,8 +223,8 @@ public: const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, - const wxString& shortHelp = wxEmptyString, - const wxString& longHelp = wxEmptyString, + const wxString& shortHelp = wxPyEmptyString, + const wxString& longHelp = wxPyEmptyString, PyObject *clientData = NULL) { wxPyUserData* udata = NULL; @@ -242,8 +242,8 @@ public: const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, - const wxString& shortHelp = wxEmptyString, - const wxString& longHelp = wxEmptyString, + const wxString& shortHelp = wxPyEmptyString, + const wxString& longHelp = wxPyEmptyString, PyObject *clientData = NULL) { wxPyUserData* udata = NULL; @@ -259,8 +259,8 @@ public: const wxString& label, const wxBitmap& bitmap, wxItemKind kind = wxITEM_NORMAL, - const wxString& shortHelp = wxEmptyString, - const wxString& longHelp = wxEmptyString) + const wxString& shortHelp = wxPyEmptyString, + const wxString& longHelp = wxPyEmptyString) { return self->InsertTool(pos, id, label, bitmap, wxNullBitmap, kind, shortHelp, longHelp); diff --git a/wxPython/tools/XRCed/xrced.py b/wxPython/tools/XRCed/xrced.py index 503c1b1b0f..1bacff33c9 100644 --- a/wxPython/tools/XRCed/xrced.py +++ b/wxPython/tools/XRCed/xrced.py @@ -1058,18 +1058,18 @@ class Frame(wxFrame): # Create toolbar tb = self.CreateToolBar(wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT) tb.SetToolBitmapSize((24, 23)) - tb.AddSimpleTool(wxID_NEW, images.getNewBitmap(), 'New', 'New file') - tb.AddSimpleTool(wxID_OPEN, images.getOpenBitmap(), 'Open', 'Open file') - tb.AddSimpleTool(wxID_SAVE, images.getSaveBitmap(), 'Save', 'Save file') + tb.AddSimpleTool(wxID_NEW, '', images.getNewBitmap(), 'New', 'New file') + tb.AddSimpleTool(wxID_OPEN, '', images.getOpenBitmap(), 'Open', 'Open file') + tb.AddSimpleTool(wxID_SAVE, '', images.getSaveBitmap(), 'Save', 'Save file') tb.AddControl(wxStaticLine(tb, -1, size=(-1,23), style=wxLI_VERTICAL)) - tb.AddSimpleTool(wxID_CUT, images.getCutBitmap(), 'Cut', 'Cut') - tb.AddSimpleTool(wxID_COPY, images.getCopyBitmap(), 'Copy', 'Copy') - tb.AddSimpleTool(wxID_PASTE, images.getPasteBitmap(), 'Paste', 'Paste') + tb.AddSimpleTool(wxID_CUT, '', images.getCutBitmap(), 'Cut', 'Cut') + tb.AddSimpleTool(wxID_COPY, '', images.getCopyBitmap(), 'Copy', 'Copy') + tb.AddSimpleTool(wxID_PASTE, '', images.getPasteBitmap(), 'Paste', 'Paste') tb.AddControl(wxStaticLine(tb, -1, size=(-1,23), style=wxLI_VERTICAL)) - tb.AddSimpleTool(self.ID_TEST, images.getTestBitmap(), 'Test', 'Test window') - tb.AddSimpleTool(self.ID_REFRESH, images.getRefreshBitmap(), + tb.AddSimpleTool(self.ID_TEST, '', images.getTestBitmap(), 'Test', 'Test window') + tb.AddSimpleTool(self.ID_REFRESH, '', images.getRefreshBitmap(), 'Refresh', 'Refresh view') - tb.AddSimpleTool(self.ID_AUTO_REFRESH, images.getAutoRefreshBitmap(), + tb.AddSimpleTool(self.ID_AUTO_REFRESH, '', images.getAutoRefreshBitmap(), 'Auto-refresh', 'Toggle auto-refresh mode', true) if wxGetOsVersion()[0] == wxGTK: tb.AddSeparator() # otherwise auto-refresh sticks in status line @@ -1910,7 +1910,7 @@ class App(wxApp): wc.Flush() def main(): - app = App() + app = App(0) app.MainLoop() app.OnExit()