From 7b730da177c955d09ce4d22839f9a93d64962ad0 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 15 May 2008 23:22:27 +0100 Subject: [PATCH 1/7] Apply patch from Jesse Michael which should fix bugs #189116 and #230373 --- terminator | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminator b/terminator index 9574ba30..3d96c068 100755 --- a/terminator +++ b/terminator @@ -446,8 +446,8 @@ class TerminatorTerm: pangodesc.set_size (fontsize) self._vte.set_font (pangodesc) - def on_vte_popup_menu (self, term): - self.do_popup () + def on_vte_popup_menu (self, term, event): + self.do_popup (event) def do_popup (self, event = None): menu = self.create_popup_menu (event) From 0d6c018d935775dfeede388e5f9347e2a4fa13c2 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 16 May 2008 13:26:45 +0100 Subject: [PATCH 2/7] Allow ctrl-click to open URLs. Patch from Emilio Pozuelo Monfort in LP bug #211079 --- terminator | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/terminator b/terminator index 3d96c068..c679e3b6 100755 --- a/terminator +++ b/terminator @@ -345,6 +345,19 @@ class TerminatorTerm: self.reconfigure_vte () def on_vte_button_press (self, term, event): + # Left mouse button + Ctrl while over a link should open it + mask = gtk.gdk.CONTROL_MASK + if (event.state & mask) == mask: + if event.button == 1: + url = self._vte.match_check (int (event.x / self._vte.get_char_width ()), int (event.y / self._vte.get_char_height ())) + if url: + if (url[0][0:7] != "mailto:") & (url[1] == self.matches['email']): + address = "mailto:" + url[0] + else: + address = url[0] + openurl ( address ) + return False + # Left mouse button should transfer focus to this vte widget if event.button == 1: self._vte.grab_focus () From 6296fe871f95f58285c03c901fd07bcf849cb170 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 17 May 2008 23:20:17 +0100 Subject: [PATCH 3/7] share the love --- doc/terminator.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/terminator.1 b/doc/terminator.1 index 5a3d5366..9dd051d0 100644 --- a/doc/terminator.1 +++ b/doc/terminator.1 @@ -85,7 +85,7 @@ Toggle fullscreen .SH "SEE ALSO" .BR gnome\-terminal(1),terminatorrc(5) .SH "AUTHOR" -Terminator was written by Chris Jones +Terminator was written by Chris Jones and others. .PP This manual page was written by Chris Jones for the Ubuntu project (but may be used by others). From 67c0d0bb8426ed312ab90ad8e7956daa641ee55e Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 19 May 2008 00:42:08 +0100 Subject: [PATCH 4/7] Make TerminatorTerm extend gtk.VBox rather than having hacks to behave like it. Patch by Chris Oattes. Allows us to beging removing get_box() --- terminator | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/terminator b/terminator index c679e3b6..9713fe74 100755 --- a/terminator +++ b/terminator @@ -72,11 +72,12 @@ def openurl (url): except: pass -class TerminatorTerm: +class TerminatorTerm (gtk.VBox): matches = {} def __init__ (self, terminator, profile = None, command = None, cwd = None): + gtk.VBox.__init__ (self) self.terminator = terminator self.conf = terminator.conf self.command = command @@ -99,10 +100,9 @@ class TerminatorTerm: self._title.show() self._titlebox = gtk.EventBox() self._titlebox.add(self._title) - self._box = gtk.VBox () - self._box.show() - self._box.pack_start(self._titlebox, False) - self._box.pack_start(self._termbox) + self..show() + self.pack_start(self._titlebox, False) + self.pack_start(self._termbox) if len(self.terminator.term_list) > 0 and self.conf.titlebars: if len(self.terminator.term_list) == 1: self.terminator.term_list[0]._titlebox.show() @@ -563,7 +563,7 @@ class TerminatorTerm: self.terminator.set_window_title("%s: %s" %(APP_NAME.capitalize(), vte.get_window_title ())) def get_box (self): - return self._box + return self class Terminator: def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False): From 3854bc2f6e725fe9c498536d6faf2670977ddea2 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 19 May 2008 00:44:59 +0100 Subject: [PATCH 5/7] update copyright file --- debian/copyright | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/copyright b/debian/copyright index 79527aef..9ada8f11 100644 --- a/debian/copyright +++ b/debian/copyright @@ -9,6 +9,9 @@ Upstream Authors: Huang He Kees Cook Thomas Meire + Nicolas Valcarcel + Emmanuel Bretelle + Chris Oattes Artwork: Cristian Grada - Drew our icon and licenced it to us under this licence From 78ca918f74b94c0ae305732e1b9118340be20532 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 19 May 2008 00:47:56 +0100 Subject: [PATCH 6/7] love for cory too --- debian/copyright | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index 9ada8f11..3998c2f0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -14,7 +14,8 @@ Upstream Authors: Chris Oattes Artwork: - Cristian Grada - Drew our icon and licenced it to us under this licence + Cory Kontros - Produced our current icon + Cristian Grada - Drew our original icon and licenced it to us under this licence Translations: Thomas Meire From 549f046904983767eedcd23c06a0cf2633742123 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 19 May 2008 00:50:38 +0100 Subject: [PATCH 7/7] fix a typo in a previous commit, and remove all references to get_box() --- terminator | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/terminator b/terminator index 9713fe74..f1370743 100755 --- a/terminator +++ b/terminator @@ -100,7 +100,7 @@ class TerminatorTerm (gtk.VBox): self._title.show() self._titlebox = gtk.EventBox() self._titlebox.add(self._title) - self..show() + self.show() self.pack_start(self._titlebox, False) self.pack_start(self._termbox) if len(self.terminator.term_list) > 0 and self.conf.titlebars: @@ -562,9 +562,6 @@ class TerminatorTerm (gtk.VBox): if vte.get_window_title (): self.terminator.set_window_title("%s: %s" %(APP_NAME.capitalize(), vte.get_window_title ())) - def get_box (self): - return self - class Terminator: def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False): self.profile = profile @@ -622,7 +619,7 @@ class Terminator: term = (TerminatorTerm (self, self.profile, self.command)) self.term_list = [term] - self.window.add (term.get_box ()) + self.window.add (term) self.window.show () def maximize (self): @@ -708,14 +705,14 @@ class Terminator: pane = (vertical) and gtk.VPaned () or gtk.HPaned () # get the parent of the provided terminal - parent = widget.get_box ().get_parent () + parent = widget.get_parent () if isinstance (parent, gtk.Window): # We have just one term - widget.get_box ().reparent (pane) + widget.reparent (pane) - pane.pack1 (widget.get_box (), True, True) - pane.pack2 (terminal.get_box (), True, True) + pane.pack1 (widget, True, True) + pane.pack2 (terminal, True, True) parent.add (pane) @@ -724,23 +721,23 @@ class Terminator: if isinstance (parent, gtk.Paned): # We are inside a split term - position = (vertical) and widget.get_box().allocation.height \ - or widget.get_box().allocation.width + position = (vertical) and widget.allocation.height \ + or widget.allocation.width - if (widget.get_box () == parent.get_child1 ()): - widget.get_box ().reparent (pane) + if (widget == parent.get_child1 ()): + widget.reparent (pane) parent.pack1 (pane, True, True) else: - widget.get_box ().reparent (pane) + widget.reparent (pane) parent.pack2 (pane, True, True) - pane.pack1 (widget.get_box (), True, True) - pane.pack2 (terminal.get_box (), True, True) + pane.pack1 (widget, True, True) + pane.pack2 (terminal, True, True) # show all, set position of the divider pane.show () pane.set_position (position / 2) - terminal.get_box ().show () + terminal.show () # insert the term reference into the list index = self.term_list.index (widget) @@ -752,7 +749,7 @@ class Terminator: return (terminal) def closeterm (self, widget): - parent = widget.get_box ().get_parent () + parent = widget.get_parent () sibling = None if isinstance (parent, gtk.Window): @@ -766,9 +763,9 @@ class Terminator: grandparent = parent.get_parent () # Discover sibling while all objects exist - if widget.get_box () == parent.get_child1 (): + if widget == parent.get_child1 (): sibling = parent.get_child2 () - if widget.get_box () == parent.get_child2 (): + if widget == parent.get_child2 (): sibling = parent.get_child1 () if not sibling: @@ -779,12 +776,12 @@ class Terminator: self.term_list.remove (widget) grandparent.remove (parent) sibling.reparent (grandparent) - widget.get_box ().destroy () + widget.destroy () parent.destroy () if not isinstance (sibling, gtk.Paned): for term in self.term_list: - if term.get_box () == sibling: + if term == sibling: term._vte.grab_focus () break else: @@ -826,7 +823,7 @@ class Terminator: vertical = False else: return - parent = self.get_first_parent_paned(widget.get_box (),vertical) + parent = self.get_first_parent_paned(widget,vertical) if parent == None: return