some minor tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-04-27 16:41:48 +00:00
parent 5eaa587e28
commit fc2518abb5
7 changed files with 99 additions and 64 deletions

View File

@@ -2,7 +2,7 @@ CHANGES.txt for wxPython
---------------------------------------------------------------------- ----------------------------------------------------------------------
New in 2.1.16 New in 2.1.15
------------- -------------
Fixed wxTreeCtrl.HitTest to return both the tree item as well as the Fixed wxTreeCtrl.HitTest to return both the tree item as well as the

View File

@@ -26,6 +26,12 @@ Service Pack 4+, or the HTML Workshop at
http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp. http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp.
For some features, the latest common controls library from microsoft
is required. You can get this by installing IE 5.0 or Office 2000.
You can also get it independently from here:
http://download.microsoft.com/download/platformsdk/Comctl32/5.80.2614.3600/W9XNT4/EN-US/50comupd.exe
Getting Help Getting Help

View File

@@ -86,7 +86,7 @@ class TestTreeCtrlPanel(wxPanel):
def OnLeftDClick(self, event): def OnLeftDClick(self, event):
pt = event.GetPosition(); pt = event.GetPosition();
item = self.tree.HitTest(pt) item = self.tree.HitTest(pt)[0]
self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item)) self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item))
@@ -110,6 +110,7 @@ class TestTreeCtrlPanel(wxPanel):
self.tree.GetBoundingRect(self.item, true)) self.tree.GetBoundingRect(self.item, true))
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
def runTest(frame, nb, log): def runTest(frame, nb, log):

View File

@@ -3,6 +3,7 @@
import sys, os, string, time import sys, os, string, time
from ftplib import FTP from ftplib import FTP
cwd = os.getcwd()
logfile = 'c:\\temp\\autobuild.log' logfile = 'c:\\temp\\autobuild.log'
WXDIR = os.environ['WXWIN'] WXDIR = os.environ['WXWIN']
@@ -62,11 +63,6 @@ def main():
do('make cleandll FINAL=1') do('make cleandll FINAL=1')
do('makeaddons clean FINAL=1') do('makeaddons clean FINAL=1')
#os.chdir(WXDIR + '/utils/ogl/src')
#do('wxm clean FINAL=1')
#os.chdir(WXDIR + '/utils/glcanvas/win')
#do('wxm clean FINAL=1')
logSeparator("Building Documentation...") logSeparator("Building Documentation...")
os.chdir(WXDIR + '/src/msw') os.chdir(WXDIR + '/src/msw')
do('make touchmanual htmlhelp') do('make touchmanual htmlhelp')
@@ -76,10 +72,9 @@ def main():
os.chdir(WXDIR + '/src/msw') os.chdir(WXDIR + '/src/msw')
do('make dll pch FINAL=1') do('make dll pch FINAL=1')
validateFile(WXDIR + '/lib/wx'+dllVer+'.dll') validateFile(WXDIR + '/lib/wx'+dllVer+'.dll')
do("upx -9 " + WXDIR + '/lib/wx'+dllVer+'.dll')
do('makeaddons FINAL=1') do('makeaddons FINAL=1')
#os.chdir(WXDIR + '/contrib/src/ogl')
#do('wxm FINAL=1')
validateFile(WXDIR + '/contrib/lib/ogl.lib') validateFile(WXDIR + '/contrib/lib/ogl.lib')
validateFile(WXDIR + '/contrib/lib/stc.lib') validateFile(WXDIR + '/contrib/lib/stc.lib')
@@ -122,6 +117,8 @@ FINAL=1
validateFile(WXDIR+'\\utils\\wxPython\\oglc.pyd') validateFile(WXDIR+'\\utils\\wxPython\\oglc.pyd')
validateFile(WXDIR+'\\utils\\wxPython\\stc_c.pyd') validateFile(WXDIR+'\\utils\\wxPython\\stc_c.pyd')
os.chdir(WXDIR+'\\utils\\wxPython')
do("upx -9 *.pyd")
logSeparator("Building installer executable...") logSeparator("Building installer executable...")
os.chdir(WXDIR+'\\utils\\wxPython\\distrib') os.chdir(WXDIR+'\\utils\\wxPython\\distrib')
@@ -157,6 +154,13 @@ FINAL=1
pass pass
logSeparator("Copying built files...")
do("copy %s %s" % (destName, cwd))
do("copy %s %s" % (destZName, cwd))
do("copy %s %s" % (destDName, cwd))
# #*#*#*#*#* Comment this out to allow upload... # #*#*#*#*#* Comment this out to allow upload...
return return
@@ -171,7 +175,7 @@ FINAL=1
logSeparator("Finished!!!") logSeparator("Finished!!!")
finally: finally:
os.system("list " + logfile) ## os.system("list " + logfile)
pass pass

View File

@@ -276,6 +276,36 @@ class FileBrowseButtonWithHistory( FileBrowseButton ):
self.changeCallback(LocalEvent(value)) self.changeCallback(LocalEvent(value))
class DirBrowseButton(FileBrowseButton):
def __init__(self, parent, id = -1,
pos = wxDefaultPosition, size = wxDefaultSize,
style = wxTAB_TRAVERSAL,
labelText = 'Select a directory:',
buttonText = 'Browse',
toolTip = 'Type directory name or browse to select',
dialogTitle = '',
startDirectory = '.',
changeCallback = None,
dialogClass = wxDirDialog):
FileBrowseButton.__init__(self, parent, id, pos, size, style,
labelText, buttonText, toolTip,
dialogTitle, startDirectory,
changeCallback = changeCallback)
#
self._dirDialog = dialogClass(self,
message = dialogTitle,
defaultPath = startDirectory)
#
def OnBrowse(self, ev = None):
dialog = self._dirDialog
if dialog.ShowModal() == wxID_OK:
self.SetValue(dialog.GetPath())
#
def __del__(self):
if self.__dict__.has_key('_dirDialog'):
self._dirDialog.Destroy()
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@@ -288,7 +318,7 @@ if __name__ == "__main__":
print self.tag, event.GetString() print self.tag, event.GetString()
class DemoFrame( wxFrame ): class DemoFrame( wxFrame ):
def __init__(self, parent): def __init__(self, parent):
wxFrame.__init__(self, parent, 2400, "File entry with browse", size=(500,220) ) wxFrame.__init__(self, parent, 2400, "File entry with browse", size=(500,260) )
panel = wxPanel (self,-1) panel = wxPanel (self,-1)
innerbox = wxBoxSizer(wxVERTICAL) innerbox = wxBoxSizer(wxVERTICAL)
control = FileBrowseButton( control = FileBrowseButton(
@@ -319,6 +349,11 @@ if __name__ == "__main__":
changeCallback= SimpleCallback( "With Callback" ), changeCallback= SimpleCallback( "With Callback" ),
) )
innerbox.Add( control, 0, wxEXPAND) innerbox.Add( control, 0, wxEXPAND)
self.bottommostcontrol = control = DirBrowseButton(
panel,
labelText = "Simple dir browse button",
style = wxSUNKEN_BORDER|wxCLIP_CHILDREN)
innerbox.Add( control, 0, wxEXPAND)
ID = wxNewId() ID = wxNewId()
innerbox.Add( wxButton( panel, ID,"Change Label", ), 1, wxEXPAND) innerbox.Add( wxButton( panel, ID,"Change Label", ), 1, wxEXPAND)
EVT_BUTTON( self, ID, self.OnChangeLabel ) EVT_BUTTON( self, ID, self.OnChangeLabel )

View File

@@ -1896,11 +1896,12 @@ static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *ar
wxHtmlWinParser * _arg0; wxHtmlWinParser * _arg0;
wxColour * _arg1; wxColour * _arg1;
PyObject * _argo0 = 0; PyObject * _argo0 = 0;
PyObject * _argo1 = 0; wxColour temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","clr", NULL }; char *_kwnames[] = { "self","clr", NULL };
self = self; self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetLinkColor",_kwnames,&_argo0,&_argo1)) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetLinkColor",_kwnames,&_argo0,&_obj1))
return NULL; return NULL;
if (_argo0) { if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; } if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1909,13 +1910,11 @@ static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *ar
return NULL; return NULL;
} }
} }
if (_argo1) { {
if (_argo1 == Py_None) { _arg1 = NULL; } _arg1 = &temp;
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { if (! wxColour_helper(_obj1, &_arg1))
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinParser_SetLinkColor. Expected _wxColour_p.");
return NULL; return NULL;
} }
}
{ {
wxPy_BEGIN_ALLOW_THREADS; wxPy_BEGIN_ALLOW_THREADS;
wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); wxHtmlWinParser_SetLinkColor(_arg0,*_arg1);
@@ -1967,11 +1966,12 @@ static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject *
wxHtmlWinParser * _arg0; wxHtmlWinParser * _arg0;
wxColour * _arg1; wxColour * _arg1;
PyObject * _argo0 = 0; PyObject * _argo0 = 0;
PyObject * _argo1 = 0; wxColour temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","clr", NULL }; char *_kwnames[] = { "self","clr", NULL };
self = self; self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetActualColor",_kwnames,&_argo0,&_argo1)) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetActualColor",_kwnames,&_argo0,&_obj1))
return NULL; return NULL;
if (_argo0) { if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; } if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1980,13 +1980,11 @@ static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject *
return NULL; return NULL;
} }
} }
if (_argo1) { {
if (_argo1 == Py_None) { _arg1 = NULL; } _arg1 = &temp;
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { if (! wxColour_helper(_obj1, &_arg1))
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinParser_SetActualColor. Expected _wxColour_p.");
return NULL; return NULL;
} }
}
{ {
wxPy_BEGIN_ALLOW_THREADS; wxPy_BEGIN_ALLOW_THREADS;
wxHtmlWinParser_SetActualColor(_arg0,*_arg1); wxHtmlWinParser_SetActualColor(_arg0,*_arg1);
@@ -3471,11 +3469,12 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P
wxHtmlContainerCell * _arg0; wxHtmlContainerCell * _arg0;
wxColour * _arg1; wxColour * _arg1;
PyObject * _argo0 = 0; PyObject * _argo0 = 0;
PyObject * _argo1 = 0; wxColour temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","clr", NULL }; char *_kwnames[] = { "self","clr", NULL };
self = self; self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetBackgroundColour",_kwnames,&_argo0,&_obj1))
return NULL; return NULL;
if (_argo0) { if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; } if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3484,13 +3483,11 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P
return NULL; return NULL;
} }
} }
if (_argo1) { {
if (_argo1 == Py_None) { _arg1 = NULL; } _arg1 = &temp;
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { if (! wxColour_helper(_obj1, &_arg1))
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetBackgroundColour. Expected _wxColour_p.");
return NULL; return NULL;
} }
}
{ {
wxPy_BEGIN_ALLOW_THREADS; wxPy_BEGIN_ALLOW_THREADS;
wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1);
@@ -3508,12 +3505,14 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *a
wxColour * _arg1; wxColour * _arg1;
wxColour * _arg2; wxColour * _arg2;
PyObject * _argo0 = 0; PyObject * _argo0 = 0;
PyObject * _argo1 = 0; wxColour temp;
PyObject * _argo2 = 0; PyObject * _obj1 = 0;
wxColour temp0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","clr1","clr2", NULL }; char *_kwnames[] = { "self","clr1","clr2", NULL };
self = self; self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlContainerCell_SetBorder",_kwnames,&_argo0,&_argo1,&_argo2)) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlContainerCell_SetBorder",_kwnames,&_argo0,&_obj1,&_obj2))
return NULL; return NULL;
if (_argo0) { if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; } if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -3522,20 +3521,16 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *a
return NULL; return NULL;
} }
} }
if (_argo1) { {
if (_argo1 == Py_None) { _arg1 = NULL; } _arg1 = &temp;
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { if (! wxColour_helper(_obj1, &_arg1))
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetBorder. Expected _wxColour_p.");
return NULL; return NULL;
} }
} {
if (_argo2) { _arg2 = &temp0;
if (_argo2 == Py_None) { _arg2 = NULL; } if (! wxColour_helper(_obj2, &_arg2))
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxHtmlContainerCell_SetBorder. Expected _wxColour_p.");
return NULL; return NULL;
} }
}
{ {
wxPy_BEGIN_ALLOW_THREADS; wxPy_BEGIN_ALLOW_THREADS;
wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2);
@@ -3594,20 +3589,19 @@ static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyOb
wxHtmlColourCell * _result; wxHtmlColourCell * _result;
wxColour * _arg0; wxColour * _arg0;
int _arg1 = (int ) (wxHTML_CLR_FOREGROUND); int _arg1 = (int ) (wxHTML_CLR_FOREGROUND);
PyObject * _argo0 = 0; wxColour temp;
PyObject * _obj0 = 0;
char *_kwnames[] = { "clr","flags", NULL }; char *_kwnames[] = { "clr","flags", NULL };
char _ptemp[128]; char _ptemp[128];
self = self; self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxHtmlColourCell",_kwnames,&_argo0,&_arg1)) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxHtmlColourCell",_kwnames,&_obj0,&_arg1))
return NULL; return NULL;
if (_argo0) { {
if (_argo0 == Py_None) { _arg0 = NULL; } _arg0 = &temp;
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { if (! wxColour_helper(_obj0, &_arg0))
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlColourCell. Expected _wxColour_p.");
return NULL; return NULL;
} }
}
{ {
wxPy_BEGIN_ALLOW_THREADS; wxPy_BEGIN_ALLOW_THREADS;
_result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1);

View File

@@ -596,10 +596,8 @@ class wxGridCellEditor
{ {
public: public:
bool IsCreated(); bool IsCreated();
#ifdef POST2115
wxControl* GetControl(); wxControl* GetControl();
void SetControl(wxControl* control); void SetControl(wxControl* control);
#endif
void SetParameters(const wxString& params); void SetParameters(const wxString& params);
@@ -788,11 +786,10 @@ public:
class wxGridCellChoiceEditor : public wxGridCellEditor class wxGridCellChoiceEditor : public wxGridCellEditor
{ {
public: public:
#ifdef POST2115
wxGridCellChoiceEditor(int LCOUNT = 0, wxGridCellChoiceEditor(int LCOUNT = 0,
const wxString* choices = NULL, const wxString* choices = NULL,
bool allowOthers = FALSE); bool allowOthers = FALSE);
#else #ifdef PRE2115
%addmethods { %addmethods {
wxGridCellChoiceEditor(PyObject* choices, wxGridCellChoiceEditor(PyObject* choices,
bool allowOthers = FALSE) { bool allowOthers = FALSE) {
@@ -1363,9 +1360,7 @@ public:
void DisableCellEditControl(); void DisableCellEditControl();
bool CanEnableCellControl() const; bool CanEnableCellControl() const;
bool IsCellEditControlEnabled() const; bool IsCellEditControlEnabled() const;
#ifdef POST2115
bool IsCellEditControlShown() const; bool IsCellEditControlShown() const;
#endif
bool IsCurrentCellReadOnly() const; bool IsCurrentCellReadOnly() const;