Create default groupnames, selected from the Greek alphabet (Alpha, Beta, etc)

This commit is contained in:
Stephen Boddy 2012-09-27 14:56:42 +02:00
parent d7114596bc
commit 55c3b7d59c

View File

@ -5,6 +5,7 @@
import gtk
import gobject
import random
from version import APP_NAME
from util import dbg
@ -233,6 +234,15 @@ class Titlebar(gtk.EventBox):
def create_group(self):
"""Create a new group"""
defaultgroups=set(['Alpha','Beta','Gamma','Delta','Epsilon','Zeta','Eta',
'Theta','Iota','Kappa','Lambda','Mu','Nu','Xi',
'Omnicron','Pi','Rho','Sigma','Tau','Upsilon','Phi',
'Chi','Psi','Omega'])
currentgroups=set(self.terminator.groups)
freegroups = list(defaultgroups-currentgroups)
random.shuffle(freegroups)
if self.groupentry.get_text()=='' and freegroups:
self.groupentry.set_text(freegroups.pop())
self.groupentry.show()
self.groupentry.grab_focus()
self.update_visibility()