From 737c1a1fd1f2ccd2fed11bc6b0aa0c6cbfee7c51 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 13 Dec 2013 17:11:21 +1100 Subject: [PATCH] Remove some more white space --- lib/fakeinput.py | 2 +- lib/fingerscroll.py | 3 +-- lib/fingerscroll2.py | 4 +--- lib/listselect.py | 2 +- lib/scrawl.py | 2 +- lib/tapboard_dextr.py | 4 ++-- lib/wmctrl.py | 10 +++++----- plato/grouptypes.py | 2 +- plato/plato.py | 6 +++--- plato/plato_gsm.py | 8 +++----- plato/plato_internal.py | 4 ++-- plato/plato_sms.py | 4 ++-- 12 files changed, 23 insertions(+), 28 deletions(-) diff --git a/lib/fakeinput.py b/lib/fakeinput.py index 4de5075..e80d7e5 100644 --- a/lib/fakeinput.py +++ b/lib/fakeinput.py @@ -106,7 +106,7 @@ class fakeinput: self.display = Xlib.display.Display() self.UseXTest = UseXTest - + if UseXTest and not self.display.query_extension("XTEST") : self.UseXTest = False diff --git a/lib/fingerscroll.py b/lib/fingerscroll.py index 685aa8e..19eadda 100644 --- a/lib/fingerscroll.py +++ b/lib/fingerscroll.py @@ -88,7 +88,7 @@ if __name__ == "__main__": w.set_title("FingerScroll test") w.show() w.set_default_size(200,200) - + sw = FingerScroll(); sw.show() w.add(sw) @@ -102,4 +102,3 @@ if __name__ == "__main__": gtk.main() - diff --git a/lib/fingerscroll2.py b/lib/fingerscroll2.py index c656e8a..3bad2a7 100644 --- a/lib/fingerscroll2.py +++ b/lib/fingerscroll2.py @@ -91,7 +91,7 @@ if __name__ == "__main__": w.set_title("FingerScroll test") w.show() w.set_default_size(200,200) - + sw = FingerScroll(); sw.show() w.add(sw) @@ -104,5 +104,3 @@ if __name__ == "__main__": l = f.readline() gtk.main() - - diff --git a/lib/listselect.py b/lib/listselect.py index b90178e..0d3539d 100644 --- a/lib/listselect.py +++ b/lib/listselect.py @@ -130,7 +130,7 @@ class ListSelect(gtk.DrawingArea): def press(self, c, ev): self.tap(ev.x, ev.y) - + def draw(self, w, ev): # draw any field that is in the area (x,y,w,h) = ev.area diff --git a/lib/scrawl.py b/lib/scrawl.py index 098a6e1..2b42cdf 100644 --- a/lib/scrawl.py +++ b/lib/scrawl.py @@ -84,7 +84,7 @@ class Scrawl: def first_point(self, x, y): self.line = [ [x, y] ] self.bbox = BBox(Point(x,y)) - + def set_drag(self): self.dragging = True self.dragcall(self.line[0], self.line[-1], False) diff --git a/lib/tapboard_dextr.py b/lib/tapboard_dextr.py index 30694e6..0e6381c 100644 --- a/lib/tapboard_dextr.py +++ b/lib/tapboard_dextr.py @@ -80,7 +80,7 @@ keymap['number'] = [ ['{','7','8','9','/','\\','}'], ['<','#','0','*','=','|','>'], ] - + class TapBoard(gtk.VBox): __gsignals__ = { 'key' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, @@ -255,7 +255,7 @@ class TapBoard(gtk.VBox): base_images['common'][r*8+c] = im self.base_images = base_images - + fd = pango.FontDescription('sans 10') fd.set_absolute_size(size / 1.5 * pango.SCALE) self.modify_font(fd) diff --git a/lib/wmctrl.py b/lib/wmctrl.py index f0c8b0e..d3a84d1 100644 --- a/lib/wmctrl.py +++ b/lib/wmctrl.py @@ -28,7 +28,7 @@ class mywindow: data = (32, [0,0,0,0,0]) ) msg.send_event = 1 - mask = (Xlib.X.SubstructureRedirectMask | + mask = (Xlib.X.SubstructureRedirectMask | Xlib.X.SubstructureNotifyMask) self.list.root.send_event(msg, event_mask = mask) self.win.map() @@ -45,11 +45,11 @@ class mywindow: data = (32, [0,0,0,0,0]) ) msg.send_event = 1 - mask = (Xlib.X.SubstructureRedirectMask | + mask = (Xlib.X.SubstructureRedirectMask | Xlib.X.SubstructureNotifyMask) self.list.root.send_event(msg, event_mask = mask) self.list.display.flush() - + class winlist: def __init__(self, add_handle = None): self.display = Xlib.display.Display() @@ -73,7 +73,7 @@ class winlist: self.root.change_attributes(event_mask = Xlib.X.PropertyChangeMask ) self.get_list() - + def add_win(self, id): if id in self.winfo: @@ -149,7 +149,7 @@ class winlist: self.change_handle = func self.add_handle = add self.del_handle = delete - + if __name__ == '__main__': w = winlist() diff --git a/plato/grouptypes.py b/plato/grouptypes.py index 1ebff72..9b37217 100644 --- a/plato/grouptypes.py +++ b/plato/grouptypes.py @@ -76,7 +76,7 @@ class ListType: words = map(lambda a: a[0].strip('"')+a[1].strip("'")+a[2], re.findall('("[^"]*")?(\'[^\']*\')?([^ "\'][^ "\']*)? *', line))[:-1] - + cmd = words[0].split('.', 1) if len(cmd) == 1: words[0] = "internal."+cmd[0] diff --git a/plato/plato.py b/plato/plato.py index de2293a..2928fcd 100644 --- a/plato/plato.py +++ b/plato/plato.py @@ -391,7 +391,7 @@ class LaunchWin(gtk.Window): self.present() break i += 1 - + def set_buttons(self, list): if not list: # hide the button boxes @@ -451,7 +451,7 @@ class LaunchWin(gtk.Window): def set_embed(self, widget, full): if type(widget) == str: widget, full = self.make_widget(widget) - + if widget == self.embeded_widget and full == self.embeded_full: return if self.embeded_widget: @@ -527,7 +527,7 @@ class LaunchWin(gtk.Window): self.next_group = 0 self.grouplist.select(self.next_group) self.next_group += 1 - + self.present() def ev_activate(self, down, moment, typ, code, value): diff --git a/plato/plato_gsm.py b/plato/plato_gsm.py index 4ead21e..0237c3b 100644 --- a/plato/plato_gsm.py +++ b/plato/plato_gsm.py @@ -140,7 +140,6 @@ class carrier(file): self.read(self.job.stdout, None) - class calls(file): # Monitor 'status' which can be # INCOMING BUSY on-call or empty @@ -270,7 +269,7 @@ class calls(file): def cjdone(self, *a): self.cj.wait() self.cj = None - + def new_win(self, source, win): if win.name == "Dialer": self.dialer_win = win @@ -312,7 +311,7 @@ class corresp: dt, tm = when self.when = time.strptime(dt+'='+tm, '%Y-%m-%d=%H:%M:%S') self.secs = time.mktime(self.when) - + if contacts == None: contacts = contactdb.contacts() if name == None: @@ -365,9 +364,8 @@ def send_number(sel, num): clip_get_data, clip_clear_data, None) - class call_list: - # A list of 'corresp' tasks taken from /var/log/incoming or + # A list of 'corresp' tasks taken from /var/log/incoming or # /var/log/outgoing def __init__(self, win, name, incoming = None): self.win = win diff --git a/plato/plato_internal.py b/plato/plato_internal.py index 2e50cef..425eb81 100644 --- a/plato/plato_internal.py +++ b/plato/plato_internal.py @@ -22,7 +22,7 @@ class date: def get_name(self): - now = _time.time() + now = _time.time() if self.timeout == None: next_hour = int(now/60/60)+1 self.timeout = gobject.timeout_add( @@ -46,7 +46,7 @@ class time: self.owner = owner def get_name(self): - now = _time.time() + now = _time.time() if self.timeout == None: next_min = int(now/60)+1 self.timeout = gobject.timeout_add( diff --git a/plato/plato_sms.py b/plato/plato_sms.py index 05ce4ba..bc13ccd 100644 --- a/plato/plato_sms.py +++ b/plato/plato_sms.py @@ -1,7 +1,7 @@ # # plato plugin for text messages # -# +# import gtk from plato_internal import file @@ -80,7 +80,7 @@ class newmsg(file): c = contacts.find_num(self.who_from) if c: self.who_from = c.name - + if l[0].stamp > self.last_txt: self.last_txt = l[0].stamp self.gowner.update(self, True) -- 2.39.5