From 2b8c2cadc5b8e840114356b64175fa0db8e56ad2 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 16 Mar 2009 23:55:57 +0000 Subject: [PATCH] set close button style regardless of the handle size being correct. Closes LP: #343607 --- terminatorlib/terminator.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index f54c5af5..6c432480 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -71,7 +71,7 @@ class TerminatorNotebookTabLabel(gtk.HBox): self._button.add(self._icon) self._button.connect('clicked', self.on_close) self._button.set_name("terminator-tab-close-button") - self.connect("style-set", self.on_style_set) + self._button.connect("style-set", self.on_style_set) if hasattr(self._button, "set_tooltip_text"): self._button.set_tooltip_text(_("Close Tab")) self.pack_start(self._button, False, False) @@ -221,6 +221,7 @@ class Terminator: self.keybindings.configure(self.conf.keybindings) self.set_handle_size (self.conf.handle_size) + self.set_closebutton_style () self.window = gtk.Window () self.window.set_title (APP_NAME.capitalize()) @@ -288,15 +289,16 @@ class Terminator: class "GtkPaned" style "terminator-paned-style" """ % self.conf.handle_size) - gtk.rc_parse_string(""" + def set_closebutton_style (self): + gtk.rc_parse_string(""" style "terminator-tab-close-button-style" { GtkWidget::focus-padding = 0 GtkWidget::focus-line-width = 0 xthickness = 0 ythickness = 0 - } - widget "*.terminator-tab-close-button" style "terminator-tab-close-button-style" - """) + } + widget "*.terminator-tab-close-button" style "terminator-tab-close-button-style" + """) def enable_rgba (self, rgba = False): screen = self.window.get_screen()