From 29ef91225065f66528bd4a9003f89f7790d71246 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Mon, 12 Jan 2009 17:08:12 +0100 Subject: [PATCH] Some small fixes after discussion and testing over irc --- terminatorlib/terminator.py | 9 +++++---- terminatorlib/terminatorterm.py | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 78f89d41..5618404d 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -134,7 +134,7 @@ class Terminator: self.term_list = [] self.gnome_client = None self.groupsend = 1 # 0 off, 1 group (d), 2 all - self.splittogroup = 1 # 0 no group, 1 new takes orginators group (d) + self.splittogroup = 0 # 0 no group (d), 1 new takes orginators group self.autocleangroups = 1 # 0 off, 1 on (d) stores = [] @@ -840,11 +840,12 @@ class Terminator: self.toggle_zoom(widget, not self._maximised) widget_group = widget._group - for term in self.term_list: + all_closed = True + for term in self.term_list[:]: if term._group == widget_group and not self.remove(term): - return False + all_closed = False self.group_hoover() - return True + return all_closed def go_to (self, term, selector): current = self.term_list.index (term) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index f5f7f2fe..dc8e437f 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -79,7 +79,6 @@ class TerminatorTerm (gtk.VBox): self._title = gtk.Label() self._title.show() self._titlegroup = gtk.Label() - self._titlegroup.show() self._titlegroupbox = gtk.EventBox () self._titlegroupbox.set_visible_window(True) self._titlegrouphbox = gtk.HBox() @@ -88,6 +87,7 @@ class TerminatorTerm (gtk.VBox): self._titlegrouphbox.show () self._titlegroupbox.add (self._titlegrouphbox) self._titlegroupbox.show_all() + self._titlegroup.hide() self._titlesep = gtk.VSeparator () self._titlesep.show() self._titlebox = gtk.EventBox () @@ -1042,7 +1042,7 @@ text/plain item.set_active (self._titlebox.get_property ('visible')) item.connect ("toggled", lambda menu_item: self.do_title_toggle ()) if self._group: - item.set_sensitive (False) + item.set_sensitive (True) menu.append (item) self._do_encoding_items (menu) @@ -1181,12 +1181,12 @@ text/plain widget.append (item) if self._group != None: - item = gtk.MenuItem (_("Ungroup ") + self._group) + item = gtk.MenuItem (_("Remove %s group ") % (self._group)) item.connect ("activate", self.ungroup, self._group) widget.append (item) if len (self.terminator.groupings) > 0: - item = gtk.MenuItem (_("_Ungroup all")) + item = gtk.MenuItem (_("Remove all groups")) item.connect ("activate", self.ungroup_all) widget.append (item) @@ -1227,6 +1227,8 @@ text/plain item = gtk.CheckMenuItem (_("Split to this group")) item.set_active (self.terminator.splittogroup) item.connect ("toggled", lambda menu_item: self.do_splittogroup_toggle ()) + if self._group == None: + item.set_sensitive(False) widget.append (item) item = gtk.CheckMenuItem (_("Autoclean groups"))