]> git.saurik.com Git - wxWidgets.git/commitdiff
Final tweaks for 2.1b1
authorRobin Dunn <robin@alldunn.com>
Mon, 28 Jun 1999 04:08:58 +0000 (04:08 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 28 Jun 1999 04:08:58 +0000 (04:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/wxPython/demo/Main.py
utils/wxPython/demo/wxListCtrl.py
utils/wxPython/src/gtk/wx.cpp
utils/wxPython/src/gtk/wx.py

index a5e15feb42b624dc63797da9a76c53273cdcbbb4..949d74710533781f53a8491b4154e7c0f444bf0b 100644 (file)
@@ -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))
         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)
 
     def write(self, txt):
         self.WriteText(txt)
index df3a9f53d29f155761d5e5ff1259cc25066eb3df..54477934b2ea9a343ca0db5cbb7782a273d566ca 100644 (file)
@@ -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)
         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)
 
         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()
 
     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):
         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))
 
     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
         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)
         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")
 
     def OnPopupOne(self, event):
         self.log.WriteText("Popup one\n")
index 05b70958130075fae09fac4ef3af01ea86d6c6df..058428de6b89fd21d80690b97ea5e45f5cb6a3ae 100644 (file)
@@ -33,8 +33,8 @@
  * and things like that.
  *
  * $Log$
  * 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_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));
         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));
index bfc81f6d92b99524968430b2cfba318804bc6f00..e36f5d0779a27a4f3fdb5475e50e4108e4461eda 100644 (file)
@@ -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_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
 wxNO_DEFAULT = wxc.wxNO_DEFAULT
 wxDEFAULT = wxc.wxDEFAULT
 wxDECORATIVE = wxc.wxDECORATIVE