Make this a bit more compact and remove some unneeded show() calls

This commit is contained in:
Chris Jones 2008-02-02 10:47:29 +00:00
parent c5a56e52fc
commit 4f462d771d
1 changed files with 2 additions and 3 deletions

View File

@ -318,19 +318,18 @@ class TerminatorTerm:
if scrollbar_position != self.scrollbar_position: if scrollbar_position != self.scrollbar_position:
if scrollbar_position == 'hidden': if scrollbar_position == 'hidden':
self._scrollbar.hide () self._scrollbar.hide ()
else:
self._scrollbar.show ()
if scrollbar_position == 'right': if scrollbar_position == 'right':
self._box.remove (self._scrollbar) self._box.remove (self._scrollbar)
self._box.remove (self._vte) self._box.remove (self._vte)
self._box.pack_start (self._vte) self._box.pack_start (self._vte)
self._box.pack_start (self._scrollbar) self._box.pack_start (self._scrollbar)
self._scrollbar.show ()
elif scrollbar_position == 'left': elif scrollbar_position == 'left':
self._box.remove (self._vte) self._box.remove (self._vte)
self._box.remove (self._scrollbar) self._box.remove (self._scrollbar)
self._box.pack_start(self._scrollbar) self._box.pack_start(self._scrollbar)
self._box.pack_start(self._vte) self._box.pack_start(self._vte)
self._scrollbar.show ()
self._vte.show ()
self.scrollbar_position = scrollbar_position self.scrollbar_position = scrollbar_position