Style; remove double lines after some methods.

This commit is contained in:
Thomas Hurst 2008-08-11 20:06:41 +01:00
parent 3a7822253a
commit 07457a29bd
1 changed files with 0 additions and 13 deletions

View File

@ -186,21 +186,17 @@ class TerminatorTerm (gtk.VBox):
dbg ('openurl: url_show failed. No URL for you') dbg ('openurl: url_show failed. No URL for you')
pass pass
def on_resize_window(self, widget, width, height): def on_resize_window(self, widget, width, height):
dbg ('Resize window triggered on %s: %dx%d' % (widget, width, height)) dbg ('Resize window triggered on %s: %dx%d' % (widget, width, height))
def on_drag_begin(self, widget, drag_context, data): def on_drag_begin(self, widget, drag_context, data):
dbg ('Drag begins') dbg ('Drag begins')
widget.drag_source_set_icon_pixbuf(self.terminator.icon_theme.load_icon (APP_NAME, 48, 0)) widget.drag_source_set_icon_pixbuf(self.terminator.icon_theme.load_icon (APP_NAME, 48, 0))
def on_drag_data_get(self,widget, drag_context, selection_data, info, time, data): def on_drag_data_get(self,widget, drag_context, selection_data, info, time, data):
dbg ("Drag data get") dbg ("Drag data get")
selection_data.set("vte",info, str(data.terminator.term_list.index (self))) selection_data.set("vte",info, str(data.terminator.term_list.index (self)))
def on_expose_event(self, widget, event): def on_expose_event(self, widget, event):
if widget._expose_data is None: if widget._expose_data is None:
return False return False
@ -223,7 +219,6 @@ class TerminatorTerm (gtk.VBox):
#context.paint() #context.paint()
return False return False
def on_drag_motion(self, widget, drag_context, x, y, time, data): def on_drag_motion(self, widget, drag_context, x, y, time, data):
dbg ("Drag Motion on ") dbg ("Drag Motion on ")
""" """
@ -286,12 +281,10 @@ text/plain
widget.disconnect(connec) widget.disconnect(connec)
widget._expose_data = None widget._expose_data = None
def on_drag_drop(self, widget, drag_context, x, y, time): def on_drag_drop(self, widget, drag_context, x, y, time):
parent = widget.get_parent() parent = widget.get_parent()
dbg ('Drag drop on %s'%parent) dbg ('Drag drop on %s'%parent)
def on_drag_data_received(self, widget, drag_context, x, y, selection_data, info, time, data): def on_drag_data_received(self, widget, drag_context, x, y, selection_data, info, time, data):
dbg ("Drag Data Received") dbg ("Drag Data Received")
if selection_data.type == 'text/plain': if selection_data.type == 'text/plain':
@ -324,7 +317,6 @@ text/plain
data.terminator.add(self, widgetsrc,pos) data.terminator.add(self, widgetsrc,pos)
return return
def get_location(self, vte, x, y): def get_location(self, vte, x, y):
pos = "" pos = ""
#get the diagonales function for the receiving widget #get the diagonales function for the receiving widget
@ -353,7 +345,6 @@ text/plain
pos = "bottom" pos = "bottom"
return pos return pos
def add_matches (self, posix = True): def add_matches (self, posix = True):
userchars = "-A-Za-z0-9" userchars = "-A-Za-z0-9"
passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'" passchars = "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
@ -385,7 +376,6 @@ text/plain
self.matches['email'] = self._vte.match_add (lboundry + "(mailto:)?[a-zA-Z0-9][a-zA-Z0-9.+-]*@[a-zA-Z0-9][a-zA-Z0-9-]*\.[a-zA-Z0-9][a-zA-Z0-9-]+[.a-zA-Z0-9-]*" + rboundry) self.matches['email'] = self._vte.match_add (lboundry + "(mailto:)?[a-zA-Z0-9][a-zA-Z0-9.+-]*@[a-zA-Z0-9][a-zA-Z0-9-]*\.[a-zA-Z0-9][a-zA-Z0-9-]+[.a-zA-Z0-9-]*" + rboundry)
self.matches['nntp'] = self._vte.match_add (lboundry + '''news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?''' + rboundry) self.matches['nntp'] = self._vte.match_add (lboundry + '''news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?''' + rboundry)
def _path_lookup(self, command): def _path_lookup(self, command):
if os.path.isabs (command): if os.path.isabs (command):
if os.path.isfile (command): if os.path.isfile (command):
@ -413,7 +403,6 @@ text/plain
dbg('path_lookup: Unable to locate "%s"' % command) dbg('path_lookup: Unable to locate "%s"' % command)
def _shell_lookup(self): def _shell_lookup(self):
shells = [os.getenv('SHELL'), pwd.getpwuid(os.getuid())[6], shells = [os.getenv('SHELL'), pwd.getpwuid(os.getuid())[6],
'bash', 'zsh', 'tcsh', 'ksh', 'csh', 'sh'] 'bash', 'zsh', 'tcsh', 'ksh', 'csh', 'sh']
@ -430,7 +419,6 @@ text/plain
dbg('shell_lookup: Unable to locate a shell') dbg('shell_lookup: Unable to locate a shell')
def spawn_child (self, event=None): def spawn_child (self, event=None):
update_records = self.conf.update_records update_records = self.conf.update_records
login = self.conf.login_shell login = self.conf.login_shell
@ -485,7 +473,6 @@ text/plain
err (_('Unable to start shell: ') + shell) err (_('Unable to start shell: ') + shell)
return (-1) return (-1)
def get_cwd (self): def get_cwd (self):
""" Return the current working directory of the subprocess. """ Return the current working directory of the subprocess.
This function requires OS specific behaviours This function requires OS specific behaviours