def OnData(self, x, y, d): if not self.GetData(): return dragged = self.dragged dropped = util.Storage(files = dragged.file.GetFilenames(), bitmap = dragged.bitmap.GetBitmap(), text = dragged.text.GetText(), blist_item = dragged.blist_item.GetData()) import contacts.contactsdnd as contactsdnd #print 'format count', dragged.GetFormatCount() #print 'is supported', dragged.IsSupported(contactsdnd.dataformat()) #print 'BLIST_ITEM', repr(dropped.blist_item) if dropped.files: self.imwin.Top.Raise() contactdialogs.send_files(self.imwin, self.imwin.convo.buddy, dropped.files) return True if dropped.bitmap: return True if dropped.text: self.imwin.input_area.SetValue(dropped.text) self.imwin.input_area.tc.SetSelection(-1, -1) return True return False
def OnData(self, x, y, d): if not self.GetData(): return dragged = self.dragged dropped = util.Storage(files=dragged.file.GetFilenames(), bitmap=dragged.bitmap.GetBitmap(), text=dragged.text.GetText(), blist_item=dragged.blist_item.GetData()) import contacts.contactsdnd as contactsdnd #print 'format count', dragged.GetFormatCount() #print 'is supported', dragged.IsSupported(contactsdnd.dataformat()) #print 'BLIST_ITEM', repr(dropped.blist_item) if dropped.files: self.imwin.Top.Raise() contactdialogs.send_files(self.imwin, self.imwin.convo.buddy, dropped.files) return True if dropped.bitmap: return True if dropped.text: self.imwin.input_area.SetValue(dropped.text) self.imwin.input_area.tc.SetSelection(-1, -1) return True return False
def later(): if hasattr(obj, 'send_file') and caps.FILES in obj.caps: window = self.list.Top window.Raise() from gui.contactdialogs import send_files send_files(window, obj, dropped.files) else: msg = _("This buddy can't accept file transfers") wx.MessageBox(msg, _("Send File"))