Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable history: extract the method to update URL list

Changeset a5ce1c216ae7

Parent 9990598892ab

by Yuki KODAMA

Changes to one file · Browse files at a5ce1c216ae7 Showing diff from parent 9990598892ab Diff from another changeset...

 
928
929
930
931
 
 
932
933
934
 
937
938
939
940
941
942
943
944
 
945
946
947
 
1391
1392
1393
1394
 
 
 
 
1395
1396
1397
1398
 
1399
1400
 
1401
1402
1403
 
928
929
930
 
931
932
933
934
935
 
938
939
940
 
 
 
 
 
941
942
943
944
 
1388
1389
1390
 
1391
1392
1393
1394
1395
1396
1397
 
1398
1399
 
1400
1401
1402
1403
@@ -928,7 +928,8 @@
  self.stop_button = stop     ## target path combobox - urllist = gtk.ListStore(str, str) + urllist = gtk.ListStore(str, # path (utf-8) + str) # alias (utf-8)   urlcombo = gtk.ComboBoxEntry(urllist, 0)   cell = gtk.CellRendererText()   urlcombo.pack_end(cell, False) @@ -937,11 +938,7 @@
  self.pathentry = urlcombo.get_child()   syncbox.append_widget(urlcombo, expand=True)   - for alias, path in self.repo.ui.configitems('paths'): - path = url.hidepassword(path) - urllist.append([hglib.toutf(path), hglib.toutf(alias)]) - if alias == 'default': - urlcombo.set_active(len(urllist)-1) + self.update_urllist()     incoming.connect('clicked', self.incoming_clicked)   pull.connect('clicked', self.pull_clicked) @@ -1391,13 +1388,16 @@
  dlg.hide()     self.refreshui() - urllist = combo.get_model() + self.update_urllist() + + def update_urllist(self): + urllist = self.urlcombo.get_model()   urllist.clear()   for alias, path in self.repo.ui.configitems('paths'):   path = url.hidepassword(path) - urllist.append([hglib.toutf(path), hglib.toutf(alias)]) + urllist.append((hglib.toutf(path), hglib.toutf(alias)))   if alias == 'default': - combo.set_active(len(urllist)-1) + self.urlcombo.set_active(len(urllist) - 1)     def realize_settings(self):   self.vpaned.set_position(self.setting_vpos)