Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gridcreate.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-11-08 13:50:53 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-11-08 14:07:41 (GMT)
commit250ef794ed67960da1c3f8231ebf3b19c4f4388c (patch)
treead7aef54ea48ab36f3ce9e55f85750380157724d /gridcreate.py
parentdba223f5749f510735692a06f246acee30ab50bf (diff)
Pep8 & pyflakes fixes
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'gridcreate.py')
-rw-r--r--gridcreate.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/gridcreate.py b/gridcreate.py
index 9115566..c240934 100644
--- a/gridcreate.py
+++ b/gridcreate.py
@@ -4,12 +4,12 @@ from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GObject
+
class GridCreateWidget(Gtk.DrawingArea):
__gsignals__ = {
'create-table': (
- GObject.SignalFlags.RUN_FIRST, None, [int, int]),
- }
+ GObject.SignalFlags.RUN_FIRST, None, [int, int]), }
def __init__(self):
super(GridCreateWidget, self).__init__()
@@ -29,15 +29,16 @@ class GridCreateWidget(Gtk.DrawingArea):
self.connect('event', self.__event_cb)
def __event_cb(self, widget, event):
- if event.type in (Gdk.EventType.TOUCH_BEGIN,
+ if event.type in (
+ Gdk.EventType.TOUCH_BEGIN,
Gdk.EventType.TOUCH_CANCEL, Gdk.EventType.TOUCH_END,
Gdk.EventType.TOUCH_UPDATE, Gdk.EventType.BUTTON_PRESS,
Gdk.EventType.BUTTON_RELEASE, Gdk.EventType.MOTION_NOTIFY):
x = event.get_coords()[1]
y = event.get_coords()[2]
- seq = str(event.touch.sequence)
- if event.type in (Gdk.EventType.TOUCH_BEGIN,
+ if event.type in (
+ Gdk.EventType.TOUCH_BEGIN,
Gdk.EventType.TOUCH_UPDATE, Gdk.EventType.BUTTON_PRESS,
Gdk.EventType.MOTION_NOTIFY):
# update rows and cols
@@ -74,7 +75,7 @@ class GridCreateWidget(Gtk.DrawingArea):
# draw grid
cr.set_source_rgb(1.0, 1.0, 1.0)
self._draw_grid(cr, self._min_rows, self._min_col, self._width,
- self._height)
+ self._height)
cr.set_source_rgb(0.0, 0.0, 0.0)
self._draw_grid(cr, self._rows, self._columns, width, height)