Changeset 1414
- Timestamp:
- 06/24/08 16:38:14 (5 months ago)
- Files:
-
- 1 modified
-
trunk/peppy/stcbase.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/stcbase.py
r1399 r1414 18 18 # Mimic the primary selection middle mouse paste on non-X11 platforms, but 19 19 # unfortunately the primary selection will only be application local 20 version = wx.version().split('.') 21 version = int(version[0]) * 100 + int(version[1]) * 10 + int(version[2]) 22 if wx.Platform == "__WXGTK__" and version > 287: 23 use_x11_primary_selection = True 24 else: 25 use_x11_primary_selection = False 20 26 non_x11_primary_selection = None 27 print "version=%d use=%s" % (version, use_x11_primary_selection) 21 28 22 29 def GetClipboardText(primary_selection=False): 30 global use_x11_primary_selection 23 31 global non_x11_primary_selection 24 32 25 33 success = False 26 34 if primary_selection: 27 if wx.Platform == "__WXGTK__":35 if use_x11_primary_selection: 28 36 wx.TheClipboard.UsePrimarySelection(primary_selection) 29 37 else: … … 40 48 41 49 def SetClipboardText(txt, primary_selection=False): 50 global use_x11_primary_selection 42 51 global non_x11_primary_selection 43 52 44 53 if primary_selection: 45 if wx.Platform == "__WXGTK__":54 if use_x11_primary_selection: 46 55 wx.TheClipboard.UsePrimarySelection(primary_selection) 47 56 else:
