Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

thgimport: support drag & drop patches from file manager

Changeset 1b21c5031ed0

Parent 37f3dfa2884b

by Yuki KODAMA

Changes to one file · Browse files at 1b21c5031ed0 Showing diff from parent 37f3dfa2884b Diff from another changeset...

 
77
78
79
 
80
81
82
 
116
117
118
 
 
 
 
 
 
 
119
120
121
 
175
176
177
178
 
179
180
181
 
77
78
79
80
81
82
83
 
117
118
119
120
121
122
123
124
125
126
127
128
129
 
183
184
185
 
186
187
188
189
@@ -77,6 +77,7 @@
  self.files_btn.connect('clicked', self.files_clicked)   self.dir_btn.connect('clicked', self.dir_clicked)   self.cslist.connect('list-updated', self.list_updated) + self.cslist.connect('files-dropped', self.files_dropped)   self.source_entry.connect('changed', lambda e: self.preview(queue=True))     # prepare to show @@ -116,6 +117,13 @@
  def list_updated(self, cslist, total, sel, *args):   self.update_status(sel)   + def files_dropped(self, cslist, files, *args): + src = self.source_entry.get_text() + if src: + files = [src] + files + self.source_entry.set_text(os.pathsep.join(files)) + self.preview() +   def dialog_response(self, dialog, response_id):   def abort():   self.cmd.stop() @@ -175,7 +183,7 @@
  files = []   for path in src.split(os.pathsep):   path = path.strip('\r\n\t ') - if not os.path.exists(path): + if not os.path.exists(path) or path in files:   continue   if os.path.isdir(path):   entries = os.listdir(path)