From: Robin Dunn Date: Mon, 28 Jun 1999 04:08:58 +0000 (+0000) Subject: Final tweaks for 2.1b1 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/64be6958940c1aea9c69c386b6bac9eb463f60a9 Final tweaks for 2.1b1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxPython/demo/Main.py b/utils/wxPython/demo/Main.py index a5e15feb42..949d747105 100644 --- a/utils/wxPython/demo/Main.py +++ b/utils/wxPython/demo/Main.py @@ -154,6 +154,7 @@ class wxPythonDemo(wxFrame): numLines = h/self.charHeight x, y = self.log.PositionToXY(self.log.GetLastPosition()) self.log.ShowPosition(self.log.XYToPosition(x, y-numLines+1)) + self.log.SetInsertionPointEnd() def write(self, txt): self.WriteText(txt) diff --git a/utils/wxPython/demo/wxListCtrl.py b/utils/wxPython/demo/wxListCtrl.py index df3a9f53d2..54477934b2 100644 --- a/utils/wxPython/demo/wxListCtrl.py +++ b/utils/wxPython/demo/wxListCtrl.py @@ -49,13 +49,19 @@ class TestListCtrlPanel(wxPanel): self.currentItem = 0 EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) EVT_LEFT_DCLICK(self.list, self.OnDoubleClick) - EVT_COMMAND_RIGHT_CLICK(self.list, tID, self.OnRightClick) EVT_RIGHT_DOWN(self.list, self.OnRightDown) + # for wxMSW + EVT_COMMAND_RIGHT_CLICK(self.list, tID, self.OnRightClick) + + # for wxGTK + EVT_RIGHT_UP(self.list, self.OnRightClick) + def OnRightDown(self, event): self.x = event.GetX() - self.log.WriteText("x = %d\n" % self.x) + self.y = event.GetY() + self.log.WriteText("x, y = %s\n" % str((self.x, self.y))) event.Skip() def OnItemSelected(self, event): @@ -68,18 +74,17 @@ class TestListCtrlPanel(wxPanel): def OnRightClick(self, event): self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem)) - menu = wxPyMenu() + self.menu = wxMenu() tPopupID1 = 0 tPopupID2 = 1 tPopupID3 = 2 - menu.Append(tPopupID1, "One") - menu.Append(tPopupID2, "Two") - menu.Append(tPopupID3, "Three") + self.menu.Append(tPopupID1, "One") + self.menu.Append(tPopupID2, "Two") + self.menu.Append(tPopupID3, "Three") EVT_MENU(self, tPopupID1, self.OnPopupOne) EVT_MENU(self, tPopupID2, self.OnPopupTwo) EVT_MENU(self, tPopupID3, self.OnPopupThree) - pos = self.list.GetItemPosition(self.currentItem) - self.PopupMenu(menu, self.x, pos.y) + self.PopupMenu(self.menu, self.x, self.y) def OnPopupOne(self, event): self.log.WriteText("Popup one\n") diff --git a/utils/wxPython/src/gtk/wx.cpp b/utils/wxPython/src/gtk/wx.cpp index 05b7095813..058428de6b 100644 --- a/utils/wxPython/src/gtk/wx.cpp +++ b/utils/wxPython/src/gtk/wx.cpp @@ -33,8 +33,8 @@ * and things like that. * * $Log$ - * Revision 1.13 1999/06/22 17:45:34 RD - * wxPython 2.1b1: Very minor changes needed for wxGTK + * Revision 1.14 1999/06/28 04:08:58 RD + * Final tweaks for 2.1b1 * ************************************************************************/ @@ -1497,6 +1497,9 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxPD_AUTO_HIDE", PyInt_FromLong((long) wxPD_AUTO_HIDE)); PyDict_SetItemString(d,"wxPD_APP_MODAL", PyInt_FromLong((long) wxPD_APP_MODAL)); PyDict_SetItemString(d,"wxPD_CAN_ABORT", PyInt_FromLong((long) wxPD_CAN_ABORT)); + PyDict_SetItemString(d,"wxPD_ELAPSED_TIME", PyInt_FromLong((long) wxPD_ELAPSED_TIME)); + PyDict_SetItemString(d,"wxPD_ESTIMATED_TIME", PyInt_FromLong((long) wxPD_ESTIMATED_TIME)); + PyDict_SetItemString(d,"wxPD_REMAINING_TIME", PyInt_FromLong((long) wxPD_REMAINING_TIME)); PyDict_SetItemString(d,"wxNO_DEFAULT", PyInt_FromLong((long) wxNO_DEFAULT)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); diff --git a/utils/wxPython/src/gtk/wx.py b/utils/wxPython/src/gtk/wx.py index bfc81f6d92..e36f5d0779 100644 --- a/utils/wxPython/src/gtk/wx.py +++ b/utils/wxPython/src/gtk/wx.py @@ -333,6 +333,9 @@ wxACCEL_SHIFT = wxc.wxACCEL_SHIFT wxPD_AUTO_HIDE = wxc.wxPD_AUTO_HIDE wxPD_APP_MODAL = wxc.wxPD_APP_MODAL wxPD_CAN_ABORT = wxc.wxPD_CAN_ABORT +wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME +wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME +wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME wxNO_DEFAULT = wxc.wxNO_DEFAULT wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE