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

history: refactoring: introduce self.incoming_disabled_cmds

Changeset 8e1b3901985d

Parent 91929adba48a

by Adrian Buehlmann

Changes to one file · Browse files at 8e1b3901985d Showing diff from parent 91929adba48a Diff from another changeset...

 
1102
1103
1104
1105
1106
1107
1108
 
1109
1110
1111
1112
1113
1114
 
1171
1172
1173
1174
1175
1176
 
 
 
 
1177
 
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
 
1102
1103
1104
 
1105
1106
 
1107
1108
1109
 
1110
1111
1112
 
1169
1170
1171
 
1172
 
1173
1174
1175
1176
1177
1178
1179
1180
 
 
 
 
 
 
 
 
1181
1182
1183
@@ -1102,13 +1102,11 @@
  self.toolbar.remove(self.toolbar.get_nth_item(0))   self.cmd_set_sensitive('accept', False)   self.cmd_set_sensitive('reject', False) - self.cmd_set_sensitive('add-bundle', True)   for w in self.incoming_disabled:   w.set_sensitive(True) - for cmd in ('incoming', 'outgoing', 'push', 'pull', 'email'): + for cmd in self.incoming_disabled_cmds:   self.cmd_set_sensitive(cmd, True)   -   def reject_clicked(self, button):   self.remove_overlay(False)   @@ -1171,20 +1169,15 @@
    self.cmd_set_sensitive('accept', True)   self.cmd_set_sensitive('reject', True) - self.cmd_set_sensitive('add-bundle', False)   - for cmd in ('incoming', 'outgoing', 'push', 'pull', 'email'): + cmds = ('incoming', 'outgoing', 'push', 'pull', 'email', 'refresh', + 'synchronize', 'mq', 'add-bundle') + self.incoming_disabled_cmds = [] + for cmd in cmds:   self.cmd_set_sensitive(cmd, False) + self.incoming_disabled_cmds.append(cmd)     self.incoming_disabled = [] - for cmd in ('refresh', 'synchronize', 'mq'): - try: - tb = self.get_toolbutton(cmd) - if tb: - tb.set_sensitive(False) - self.incoming_disabled.append(tb) - except KeyError: - pass   def disable_child(w):   if w != self.ppullcombo and w.get_property('sensitive'):   w.set_sensitive(False)