resolving conflicts...

This commit is contained in:
Emmanuel Bretelle 2008-05-19 09:57:41 +01:00
commit d0772c3489
3 changed files with 46 additions and 32 deletions

6
debian/copyright vendored
View File

@ -9,9 +9,13 @@ Upstream Authors:
Huang He Huang He
Kees Cook Kees Cook
Thomas Meire Thomas Meire
Nicolas Valcarcel
Emmanuel Bretelle
Chris Oattes
Artwork: 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: Translations:
Thomas Meire Thomas Meire

View File

@ -85,7 +85,7 @@ Toggle fullscreen
.SH "SEE ALSO" .SH "SEE ALSO"
.BR gnome\-terminal(1),terminatorrc(5) .BR gnome\-terminal(1),terminatorrc(5)
.SH "AUTHOR" .SH "AUTHOR"
Terminator was written by Chris Jones <cmsj@tenshu.net> Terminator was written by Chris Jones <cmsj@tenshu.net> and others.
.PP .PP
This manual page was written by Chris Jones <cmsj@tenshu.net> This manual page was written by Chris Jones <cmsj@tenshu.net>
for the Ubuntu project (but may be used by others). for the Ubuntu project (but may be used by others).

View File

@ -75,12 +75,12 @@ def openurl (url):
except: except:
pass pass
class TerminatorTerm (gtk.VBox):
class TerminatorTerm:
matches = {} matches = {}
def __init__ (self, terminator, profile = None, command = None, cwd = None): def __init__ (self, terminator, profile = None, command = None, cwd = None):
gtk.VBox.__init__ (self)
self.terminator = terminator self.terminator = terminator
self.conf = terminator.conf self.conf = terminator.conf
self.command = command self.command = command
@ -103,10 +103,10 @@ class TerminatorTerm:
self._title.show() self._title.show()
self._titlebox = gtk.EventBox() self._titlebox = gtk.EventBox()
self._titlebox.add(self._title) self._titlebox.add(self._title)
self._box = gtk.VBox ()
self._box.show() self.show()
self._box.pack_start(self._titlebox, False) self.pack_start(self._titlebox, False)
self._box.pack_start(self._termbox) self.pack_start(self._termbox)
if len(self.terminator.term_list) > 0 and self.conf.titlebars: if len(self.terminator.term_list) > 0 and self.conf.titlebars:
if len(self.terminator.term_list) == 1: if len(self.terminator.term_list) == 1:
@ -350,6 +350,19 @@ class TerminatorTerm:
self.reconfigure_vte () self.reconfigure_vte ()
def on_vte_button_press (self, term, event): 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 # Left mouse button should transfer focus to this vte widget
if event.button == 1: if event.button == 1:
self._vte.grab_focus () self._vte.grab_focus ()
@ -451,8 +464,8 @@ class TerminatorTerm:
pangodesc.set_size (fontsize) pangodesc.set_size (fontsize)
self._vte.set_font (pangodesc) self._vte.set_font (pangodesc)
def on_vte_popup_menu (self, term): def on_vte_popup_menu (self, term, event):
self.do_popup () self.do_popup (event)
def do_popup (self, event = None): def do_popup (self, event = None):
menu = self.create_popup_menu (event) menu = self.create_popup_menu (event)
@ -616,9 +629,6 @@ class TerminatorTerm:
if vte.get_window_title (): if vte.get_window_title ():
self.terminator.set_window_title("%s: %s" %(APP_NAME.capitalize(), vte.get_window_title ())) self.terminator.set_window_title("%s: %s" %(APP_NAME.capitalize(), vte.get_window_title ()))
def get_box (self):
return self._box
class Terminator: class Terminator:
def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False): def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False):
self.profile = profile self.profile = profile
@ -676,7 +686,7 @@ class Terminator:
term = (TerminatorTerm (self, self.profile, self.command)) term = (TerminatorTerm (self, self.profile, self.command))
self.term_list = [term] self.term_list = [term]
self.window.add (term.get_box ()) self.window.add (term)
self.window.show () self.window.show ()
def maximize (self): def maximize (self):
@ -762,14 +772,14 @@ class Terminator:
pane = (vertical) and gtk.VPaned () or gtk.HPaned () pane = (vertical) and gtk.VPaned () or gtk.HPaned ()
# get the parent of the provided terminal # get the parent of the provided terminal
parent = widget.get_box ().get_parent () parent = widget.get_parent ()
if isinstance (parent, gtk.Window): if isinstance (parent, gtk.Window):
# We have just one term # We have just one term
widget.get_box ().reparent (pane) widget.reparent (pane)
pane.pack1 (widget.get_box (), True, True) pane.pack1 (widget, True, True)
pane.pack2 (terminal.get_box (), True, True) pane.pack2 (terminal, True, True)
parent.add (pane) parent.add (pane)
@ -778,23 +788,23 @@ class Terminator:
if isinstance (parent, gtk.Paned): if isinstance (parent, gtk.Paned):
# We are inside a split term # We are inside a split term
position = (vertical) and widget.get_box().allocation.height \ position = (vertical) and widget.allocation.height \
or widget.get_box().allocation.width or widget.allocation.width
if (widget.get_box () == parent.get_child1 ()): if (widget == parent.get_child1 ()):
widget.get_box ().reparent (pane) widget.reparent (pane)
parent.pack1 (pane, True, True) parent.pack1 (pane, True, True)
else: else:
widget.get_box ().reparent (pane) widget.reparent (pane)
parent.pack2 (pane, True, True) parent.pack2 (pane, True, True)
pane.pack1 (widget.get_box (), True, True) pane.pack1 (widget, True, True)
pane.pack2 (terminal.get_box (), True, True) pane.pack2 (terminal, True, True)
# show all, set position of the divider # show all, set position of the divider
pane.show () pane.show ()
pane.set_position (position / 2) pane.set_position (position / 2)
terminal.get_box ().show () terminal.show ()
# insert the term reference into the list # insert the term reference into the list
index = self.term_list.index (widget) index = self.term_list.index (widget)
@ -806,7 +816,7 @@ class Terminator:
return (terminal) return (terminal)
def closeterm (self, widget): def closeterm (self, widget):
parent = widget.get_box ().get_parent () parent = widget.get_parent ()
sibling = None sibling = None
if isinstance (parent, gtk.Window): if isinstance (parent, gtk.Window):
@ -820,9 +830,9 @@ class Terminator:
grandparent = parent.get_parent () grandparent = parent.get_parent ()
# Discover sibling while all objects exist # Discover sibling while all objects exist
if widget.get_box () == parent.get_child1 (): if widget == parent.get_child1 ():
sibling = parent.get_child2 () sibling = parent.get_child2 ()
if widget.get_box () == parent.get_child2 (): if widget == parent.get_child2 ():
sibling = parent.get_child1 () sibling = parent.get_child1 ()
if not sibling: if not sibling:
@ -833,12 +843,12 @@ class Terminator:
self.term_list.remove (widget) self.term_list.remove (widget)
grandparent.remove (parent) grandparent.remove (parent)
sibling.reparent (grandparent) sibling.reparent (grandparent)
widget.get_box ().destroy () widget.destroy ()
parent.destroy () parent.destroy ()
if not isinstance (sibling, gtk.Paned): if not isinstance (sibling, gtk.Paned):
for term in self.term_list: for term in self.term_list:
if term.get_box () == sibling: if term == sibling:
term._vte.grab_focus () term._vte.grab_focus ()
break break
else: else:
@ -880,7 +890,7 @@ class Terminator:
vertical = False vertical = False
else: else:
return return
parent = self.get_first_parent_paned(widget.get_box (),vertical) parent = self.get_first_parent_paned(widget,vertical)
if parent == None: if parent == None:
return return