← Back to team overview

clicompanion-devs team mailing list archive

[Merge] lp:~dcaro/clicompanion/fix-915606 into lp:clicompanion

 

David Caro has proposed merging lp:~dcaro/clicompanion/fix-915606 into lp:clicompanion.

Requested reviews:
  CLI Companion Development Team (clicompanion-devs)
Related bugs:
  Bug #915606 in CLI Companion: "Reorder terminal tabs"
  https://bugs.launchpad.net/clicompanion/+bug/915606

For more details, see:
https://code.launchpad.net/~dcaro/clicompanion/fix-915606/+merge/88422

Added the reorderable tabs
-- 
https://code.launchpad.net/~dcaro/clicompanion/fix-915606/+merge/88422
Your team CLI Companion Development Team is requested to review the proposed merge of lp:~dcaro/clicompanion/fix-915606 into lp:clicompanion.
=== modified file 'plugins/LocalCommandList.py'
--- plugins/LocalCommandList.py	2012-01-10 21:00:04 +0000
+++ plugins/LocalCommandList.py	2012-01-12 20:49:23 +0000
@@ -24,6 +24,7 @@
 import pygtk
 pygtk.require('2.0')
 import gobject
+import collections
 
 try:
     import gtk
@@ -346,7 +347,7 @@
             orig = [fld.strip() for fld in orig]
             # fill the empty fields
             if len(orig) < 3:
-                orig = orig + ('', ) * (3 - len(orig))
+                orig = list(orig) + ['', ] * (3 - len(orig))
             dbg('Got drop of command %s' % '_\t_'.join(orig))
 
             if drop_info:
@@ -359,9 +360,8 @@
                     self.cmnds.drag_n_drop(orig, dest, before=False)
             else:
                 dbg('\t to the end')
-                self.cmnds[len(cmnds)] = orig
-        if context.action == gtk.gdk.ACTION_MOVE:
-            context.finish(True, True, etime)
+                self.cmnds[len(self.cmnds)] = orig
+        context.finish(True, True, time)
         self.sync_cmnds()
 
     def main(self):