Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

sync: accept text/URL drops

Changeset 76ab8656000a

Parent 30bfef638c68

by Steve Borho

Changes to one file · Browse files at 76ab8656000a Showing diff from parent 30bfef638c68 Diff from another changeset...

 
34
35
36
 
37
38
39
 
216
217
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
220
221
 
34
35
36
37
38
39
40
 
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
@@ -34,6 +34,7 @@
  layout = QVBoxLayout()   layout.setSpacing(4)   self.setLayout(layout) + self.setAcceptDrops(True)     self.log = log   if not log: @@ -216,6 +217,23 @@
  self.updateInProgress = False   self.refreshUrl()   + def dragEnterEvent(self, event): + event.acceptProposedAction() + + def dragMoveEvent(self, event): + event.acceptProposedAction() + + def dropEvent(self, event): + data = event.mimeData() + if data.hasUrls(): + url = hglib.fromunicode(data.urls()[0]) + self.setUrl(url) + event.accept() + elif data.hasText(): + text = hglib.fromunicode(data.text()) + self.setUrl(text) + event.accept() +   def urlparse(self, path):   m = re.match(r'^ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?$', path)   if m: