mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Use UTI strings for custom data format names.
It seems to be required on macOS now.
This commit is contained in:
@@ -76,7 +76,7 @@ class DoodlePad(wx.Window):
|
|||||||
|
|
||||||
# create our own data format and use it in a
|
# create our own data format and use it in a
|
||||||
# custom data object
|
# custom data object
|
||||||
ldata = wx.CustomDataObject("DoodleLines")
|
ldata = wx.CustomDataObject("application.DoodleLines")
|
||||||
ldata.SetData(linesdata)
|
ldata.SetData(linesdata)
|
||||||
|
|
||||||
# Also create a Bitmap version of the drawing
|
# Also create a Bitmap version of the drawing
|
||||||
@@ -119,7 +119,7 @@ class DoodleDropTarget(wx.DropTarget):
|
|||||||
self.dv = window
|
self.dv = window
|
||||||
|
|
||||||
# specify the type of data we will accept
|
# specify the type of data we will accept
|
||||||
self.data = wx.CustomDataObject("DoodleLines")
|
self.data = wx.CustomDataObject("application.DoodleLines")
|
||||||
self.SetDataObject(self.data)
|
self.SetDataObject(self.data)
|
||||||
|
|
||||||
|
|
||||||
@@ -200,8 +200,6 @@ class CustomDnDPanel(wx.Panel):
|
|||||||
def __init__(self, parent, log):
|
def __init__(self, parent, log):
|
||||||
wx.Panel.__init__(self, parent, -1)
|
wx.Panel.__init__(self, parent, -1)
|
||||||
|
|
||||||
self.SetFont(wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False))
|
|
||||||
|
|
||||||
# Make the controls
|
# Make the controls
|
||||||
text1 = wx.StaticText(self, -1,
|
text1 = wx.StaticText(self, -1,
|
||||||
"Draw a little picture in this window\n"
|
"Draw a little picture in this window\n"
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class DataObjTests(wtc.WidgetTestCase):
|
|||||||
class MyDataObject(wx.DataObject):
|
class MyDataObject(wx.DataObject):
|
||||||
def __init__(self, value=''):
|
def __init__(self, value=''):
|
||||||
wx.DataObject.__init__(self)
|
wx.DataObject.__init__(self)
|
||||||
self.myFormats = [wx.DataFormat("My Custom DataFormat")]
|
self.myFormats = [wx.DataFormat("application.MyCustomDataFormat")]
|
||||||
self.myData = wtc.mybytes(value)
|
self.myData = wtc.mybytes(value)
|
||||||
|
|
||||||
def GetAllFormats(self, d):
|
def GetAllFormats(self, d):
|
||||||
@@ -216,7 +216,7 @@ class DataObjTests(wtc.WidgetTestCase):
|
|||||||
class MyDataObject(wx.DataObjectSimple):
|
class MyDataObject(wx.DataObjectSimple):
|
||||||
def __init__(self, value=''):
|
def __init__(self, value=''):
|
||||||
wx.DataObjectSimple.__init__(self)
|
wx.DataObjectSimple.__init__(self)
|
||||||
self.SetFormat(wx.DataFormat("My Custom Data Format"))
|
self.SetFormat(wx.DataFormat("application.MyCustomDataFormat"))
|
||||||
self.myData = wtc.mybytes(value)
|
self.myData = wtc.mybytes(value)
|
||||||
|
|
||||||
def GetDataSize(self):
|
def GetDataSize(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user