resolving conflicts...
This commit is contained in:
commit
d0772c3489
6
debian/copyright
vendored
6
debian/copyright
vendored
@ -9,9 +9,13 @@ 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
|
||||
Cory Kontros - Produced our current icon
|
||||
Cristian Grada - Drew our original icon and licenced it to us under this licence
|
||||
|
||||
Translations:
|
||||
Thomas Meire
|
||||
|
@ -85,7 +85,7 @@ Toggle fullscreen
|
||||
.SH "SEE ALSO"
|
||||
.BR gnome\-terminal(1),terminatorrc(5)
|
||||
.SH "AUTHOR"
|
||||
Terminator was written by Chris Jones <cmsj@tenshu.net>
|
||||
Terminator was written by Chris Jones <cmsj@tenshu.net> and others.
|
||||
.PP
|
||||
This manual page was written by Chris Jones <cmsj@tenshu.net>
|
||||
for the Ubuntu project (but may be used by others).
|
||||
|
70
terminator
70
terminator
@ -75,12 +75,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
|
||||
@ -103,10 +103,10 @@ 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:
|
||||
@ -350,6 +350,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 ()
|
||||
@ -451,8 +464,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)
|
||||
@ -616,9 +629,6 @@ class TerminatorTerm:
|
||||
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._box
|
||||
|
||||
class Terminator:
|
||||
def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False):
|
||||
self.profile = profile
|
||||
@ -676,7 +686,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):
|
||||
@ -762,14 +772,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)
|
||||
|
||||
@ -778,23 +788,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)
|
||||
@ -806,7 +816,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):
|
||||
@ -820,9 +830,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:
|
||||
@ -833,12 +843,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:
|
||||
@ -880,7 +890,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user