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
1 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@
import gtk import gtk
import gobject import gobject
import random
from version import APP_NAME from version import APP_NAME
from util import dbg from util import dbg
@ -233,6 +234,15 @@ class Titlebar(gtk.EventBox):
def create_group(self): def create_group(self):
"""Create a new group""" """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.show()
self.groupentry.grab_focus() self.groupentry.grab_focus()
self.update_visibility() self.update_visibility()