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

thgimport: disable destination combo if MQ isn't loaded

Changeset 52c121844b5f

Parent 6b16ba2dc9c4

by Yuki KODAMA

Changes to one file · Browse files at 52c121844b5f Showing diff from parent 6b16ba2dc9c4 Diff from another changeset...

 
46
47
48
 
49
50
51
 
112
113
114
115
116
117
118
 
 
 
 
 
119
120
121
 
207
208
209
210
211
 
 
 
 
 
 
212
213
214
215
216
 
 
217
218
219
 
46
47
48
49
50
51
52
 
113
114
115
 
 
 
 
116
117
118
119
120
121
122
123
 
209
210
211
 
 
212
213
214
215
216
217
218
219
220
221
 
222
223
224
225
226
@@ -46,6 +46,7 @@
  self.repo = repo   self.set_title(_('Import - %s') % hglib.get_reponame(repo))   self.done = False + self.mqloaded = hasattr(self.repo, 'mq')     # persistent settings   self.settings = settings.Settings('import') @@ -112,10 +113,11 @@
  gtklib.idle_add_single_call(self.after_init)     def after_init(self): - # dest combo - self.dest_combo.show_all() - self.dest_combo.hide() - self.infobox.pack_start(self.dest_combo, False, False, 6) + if self.mqloaded: + # dest combo + self.dest_combo.show_all() + self.dest_combo.hide() + self.infobox.pack_start(self.dest_combo, False, False, 6)     # CmdWidget   self.cmd = hgcmd.CmdWidget() @@ -207,13 +209,18 @@
    def update_status(self, count):   if count: - info = _('<span weight="bold">%s patches</span> will' - ' be imported to the') % count + if self.mqloaded: + info = _('<span weight="bold">%s patches</span> will' + ' be imported to the') % count + else: + info = _('<span weight="bold">%s patches</span> will' + ' be imported to the repository') % count   else:   info = '<span weight="bold" foreground="#880000">%s</span>' \   % _('Nothing to import')   self.infolbl.set_markup(info) - self.dest_combo.set_property('visible', bool(count)) + if self.mqloaded: + self.dest_combo.set_property('visible', bool(count))   self.importbtn.set_sensitive(bool(count))     def get_filepaths(self):