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: add apply and reject buttons to syncbar

Changeset a340ec303a12

Parent 54b1074f6746

by Adrian Buehlmann

Changes to one file · Browse files at a340ec303a12 Showing diff from parent 54b1074f6746 Diff from another changeset...

 
926
927
928
 
 
 
 
929
930
931
932
933
 
 
934
 
 
935
936
937
 
950
951
952
 
 
953
954
955
 
1148
1149
1150
 
 
1151
1152
1153
 
1231
1232
1233
 
1234
1235
1236
 
1237
1238
1239
1240
 
 
 
1241
1242
1243
 
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
 
958
959
960
961
962
963
964
965
 
1158
1159
1160
1161
1162
1163
1164
1165
 
1243
1244
1245
1246
1247
1248
 
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
@@ -926,12 +926,20 @@
  _('Push outgoing changesets'))   email = syncbox.append_stock(gtk.STOCK_GOTO_LAST,   _('Email outgoing changesets')) + apply = syncbox.append_stock(gtk.STOCK_APPLY, + _('Accept changes from Bundle preview')) + reject = syncbox.append_stock(gtk.STOCK_DIALOG_ERROR, + _('Reject changes from Bundle preview'))   conf = syncbox.append_stock(gtk.STOCK_PREFERENCES,   _('Configure aliases and after pull behavior'))   stop = syncbox.append_stock(gtk.STOCK_STOP,   _('Stop current transaction'))   stop.set_sensitive(False) + apply.set_sensitive(False) + reject.set_sensitive(False)   self.stop_button = stop + self.syncbar_apply = apply + self.syncbar_reject = reject     ## target path combobox   urllist = gtk.ListStore(str, # path (utf-8) @@ -950,6 +958,8 @@
  pull.connect('clicked', self.pull_clicked)   outgoing.connect('clicked', self.outgoing_clicked)   push.connect('clicked', self.push_clicked) + apply.connect('clicked', self.apply_clicked) + reject.connect('clicked', self.reject_clicked)   conf.connect('clicked', self.conf_clicked, urlcombo)   email.connect('clicked', self.email_clicked)   @@ -1148,6 +1158,8 @@
  self.toolbar.remove(self.toolbar.get_nth_item(0))   self.cmd_set_sensitive('accept', False)   self.cmd_set_sensitive('reject', False) + self.syncbar_apply.set_sensitive(False) + self.syncbar_reject.set_sensitive(False)   for w in self.incoming_disabled:   w.set_sensitive(True)   for cmd in self.incoming_disabled_cmds: @@ -1231,13 +1243,17 @@
  self.cmd_set_sensitive(cmd, False)   self.incoming_disabled_cmds.append(cmd)   + ignore = (self.syncbar_apply, self.syncbar_reject, self.ppullcombo)   self.incoming_disabled = []   def disable_child(w): - if w != self.ppullcombo and w.get_property('sensitive'): + if (w not in ignore) and w.get_property('sensitive'):   w.set_sensitive(False)   self.incoming_disabled.append(w)   self.syncbox.foreach(disable_child)   + self.syncbar_apply.set_sensitive(True) + self.syncbar_reject.set_sensitive(True) +   self.bfile = bfile   oldtip = len(self.repo)   self.repo = hg.repository(self.ui, path=bfile)