Beispiel #1
0
 def attach_drag_data_received(self, widget, context, x, y, selection, info,
                               timestamp):
     record = self.screen.current_record
     if not record or record.id < 0:
         return
     win_attach = Attachment(
         record, lambda: self.update_attachment_count(reload=True))
     if info == 0:
         for uri in selection.data.splitlines():
             # Win32 cut&paste terminates the list with a NULL character
             if not uri or uri == '\0':
                 continue
             win_attach.add_uri(uri)
Beispiel #2
0
 def attach_drag_data_received(self, widget, context, x, y, selection, info,
         timestamp):
     record = self.screen.current_record
     if not record or record.id < 0:
         return
     win_attach = Attachment(record,
         lambda: self.update_attachment_count(reload=True))
     if info == 0:
         for uri in selection.data.splitlines():
             # Win32 cut&paste terminates the list with a NULL character
             if not uri or uri == '\0':
                 continue
             win_attach.add_uri(uri)
Beispiel #3
0
 def attach_drag_data_received(self, widget, context, x, y, selection, info,
                               timestamp):
     record = self.screen.current_record
     if not record or record.id < 0:
         return
     win_attach = Attachment(record,
                             lambda: self.refresh_resources(reload=True))
     if info == 0:
         if selection.get_uris():
             for uri in selection.get_uris():
                 # Win32 cut&paste terminates the list with a NULL character
                 if not uri or uri == '\0':
                     continue
                 win_attach.add_uri(uri)
         else:
             win_attach.add_uri(selection.get_text())