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

thgmq: rename 'Move' to 'Reorder' for patch moving

This change is mainly for translation quality, 'Move' conflicts
with other features in some dialogs: status, bookmark and commit.
And 'Reorder' is more proper word to explain that operation.

Changeset 1aba6aa0cebc

Parent 99d670c682b3

by Yuki KODAMA

Changes to one file · Browse files at 1aba6aa0cebc Showing diff from parent 99d670c682b3 Diff from another changeset...

 
29
30
31
32
 
33
34
35
 
225
226
227
228
229
230
231
 
 
 
 
232
233
234
 
445
446
447
448
 
449
450
 
451
452
453
 
502
503
504
505
 
506
507
 
508
509
 
510
511
512
 
516
517
518
519
 
520
521
522
 
689
690
691
692
 
693
694
 
695
696
 
697
698
699
 
700
701
 
702
703
704
 
29
30
31
 
32
33
34
35
 
225
226
227
 
 
 
 
228
229
230
231
232
233
234
 
445
446
447
 
448
449
 
450
451
452
453
 
502
503
504
 
505
506
 
507
508
 
509
510
511
512
 
516
517
518
 
519
520
521
522
 
689
690
691
 
692
693
 
694
695
 
696
697
698
 
699
700
 
701
702
703
704
@@ -29,7 +29,7 @@
 INDEX_SEPARATOR = -1  INDEX_QPARENT = -2   -# Move patch operations +# Available operations for patch reordering  MOVE_TOP = 1  MOVE_UP = 2  MOVE_DOWN = 3 @@ -225,10 +225,10 @@
  def add(name, key, func, *args):   self.list.add_accelerator(name, accelgroup, key, mod, 0)   self.list.connect(name, lambda *a: func(*args)) - add('mq-move-top', gtk.keysyms.Page_Up, self.qmove_ui, MOVE_TOP) - add('mq-move-up', gtk.keysyms.Up, self.qmove_ui, MOVE_UP) - add('mq-move-down', gtk.keysyms.Down, self.qmove_ui, MOVE_DOWN) - add('mq-move-bottom', gtk.keysyms.Page_Down, self.qmove_ui, + add('mq-move-top', gtk.keysyms.Page_Up, self.qreorder_ui, MOVE_TOP) + add('mq-move-up', gtk.keysyms.Up, self.qreorder_ui, MOVE_UP) + add('mq-move-down', gtk.keysyms.Down, self.qreorder_ui, MOVE_DOWN) + add('mq-move-bottom', gtk.keysyms.Page_Down, self.qreorder_ui,   MOVE_BOTTOM)   add('mq-pop', gtk.keysyms.Left, self.qpop)   add('mq-push', gtk.keysyms.Right, self.qpush) @@ -445,9 +445,9 @@
  cmdline = ['hg', 'qfold'] + unapplied   self.cmd.execute(cmdline, self.cmd_done)   - def qmove(self, patch, op): + def qreorder(self, patch, op):   """ - [MQ] Move patch. This is NOT standard API of MQ. + [MQ] Reorder a patch. This is NOT standard API of MQ.     patch: the patch name or an index to specify the patch.   op: the operator for moving the patch: MOVE_TOP, MOVE_UP, @@ -502,11 +502,11 @@
  for i in xrange(begin, max(oldidx, newidx) + 1):   self.model[i][MQ_INDEX] = i + offset   - def qmove_ui(self, op): + def qreorder_ui(self, op):   """ - [MQ] Move selected patch in the list. + [MQ] Reorder selected patch in the list.   - Return True if succeed to move; otherwise False. + Return True if succeed to reorder; otherwise False.     op: the operator for moving the patch: MOVE_TOP, MOVE_UP,   MOVE_DOWN or MOVE_BOTTOM. @@ -516,7 +516,7 @@
  model, paths = sel.get_selected_rows()   patch = model[paths[0]][MQ_NAME]   if patch: - return self.qmove(patch, op) + return self.qreorder(patch, op)   return False     def has_mq(self): @@ -689,16 +689,16 @@
  append(_('F_old'), self.fold_activated, gtk.STOCK_DIRECTORY)   if self.get_num_unapplied() > 1:   sub = gtklib.MenuBuilder() - sub.append(_('Top'), lambda *a: self.qmove_ui(MOVE_TOP), + sub.append(_('Top'), lambda *a: self.qreorder_ui(MOVE_TOP),   gtk.STOCK_GOTO_TOP, args=[row]) - sub.append(_('Up'), lambda *a: self.qmove_ui(MOVE_UP), + sub.append(_('Up'), lambda *a: self.qreorder_ui(MOVE_UP),   gtk.STOCK_GO_UP, args=[row]) - sub.append(_('Down'), lambda *a: self.qmove_ui(MOVE_DOWN), + sub.append(_('Down'), lambda *a: self.qreorder_ui(MOVE_DOWN),   gtk.STOCK_GO_DOWN, args=[row])   sub.append(_('Bottom'), - lambda *a: self.qmove_ui(MOVE_BOTTOM), + lambda *a: self.qreorder_ui(MOVE_BOTTOM),   gtk.STOCK_GOTO_BOTTOM, args=[row]) - m.append_submenu(_('Move'), sub.build(), gtk.STOCK_INDEX) + m.append_submenu(_('Reorder'), sub.build(), gtk.STOCK_INDEX)     menu = m.build()   if len(menu.get_children()) > 0: