diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 9fe0d6bd..aa216a53 100644 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -568,6 +568,8 @@ class TabLabel(Gtk.HBox): self.terminator = Terminator() self.config = Config() + self.connect("button-press-event", self.on_button_pressed) + self.label = EditableLabel(title) self.update_angle() @@ -650,4 +652,8 @@ class TabLabel(Gtk.HBox): """The close button has been clicked. Destroy the tab""" self.emit('close-clicked', self) + def on_button_pressed(self, _widget, event): + if event.button == 2: + self.on_close(_widget) + # vim: set expandtab ts=4 sw=4: