Switch to ordered list of hosts. I don't want crussh to tweak the host order. #1
@ -17,6 +17,7 @@ import math
|
||||
import json
|
||||
import os.path
|
||||
from EntryDialog import EntryDialog
|
||||
from collections import OrderedDict
|
||||
|
||||
|
||||
### Config Dialog ###
|
||||
@ -141,7 +142,8 @@ class HostsMask:
|
||||
HostsConfFrame.add(HostsConfTable)
|
||||
|
||||
i = 0
|
||||
hosts = sorted(self.Terminals.keys(), reverse=False)
|
||||
|
||||
hosts = self.Terminals.keys()
|
||||
for host in hosts:
|
||||
HostTable = gtk.Table(1, 2)
|
||||
HostTable.props.column_spacing = 2
|
||||
@ -183,7 +185,7 @@ class CruSSH:
|
||||
}
|
||||
|
||||
### State Vars ###
|
||||
Terminals = {}
|
||||
Terminals = OrderedDict()
|
||||
TermMinWidth = 1
|
||||
TermMinHeight = 1
|
||||
|
||||
@ -197,7 +199,8 @@ class CruSSH:
|
||||
### Methods ###
|
||||
def reflowTable(self, cols=1, rows=1):
|
||||
# empty table and re-size
|
||||
hosts = sorted(self.Terminals.keys(), reverse=True)
|
||||
hosts = list(self.Terminals.keys())
|
||||
hosts.reverse()
|
||||
for host in hosts:
|
||||
if self.Terminals[host].get_parent() == self.LayoutTable:
|
||||
self.LayoutTable.remove(self.Terminals[host])
|
||||
|
Loading…
Reference in New Issue
Block a user