Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Edit/TuneInterface.py
diff options
context:
space:
mode:
authoramartin <olpc@localhost.localdomain>2007-02-18 02:27:40 (GMT)
committer amartin <olpc@localhost.localdomain>2007-02-18 02:27:40 (GMT)
commit293b47cd9c714730ab5fdd38414d2e817313a213 (patch)
treeb98a7445f4c601c1d417c9b3b05527ead3abcc47 /Edit/TuneInterface.py
parent413329130347634f7bb567ccf2dfe4a47480067a (diff)
note drawing
Diffstat (limited to 'Edit/TuneInterface.py')
-rw-r--r--Edit/TuneInterface.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Edit/TuneInterface.py b/Edit/TuneInterface.py
index d1d5481..ce61dd3 100644
--- a/Edit/TuneInterface.py
+++ b/Edit/TuneInterface.py
@@ -90,6 +90,10 @@ class TuneInterface( gtk.EventBox ):
self.set_size_request( max( self.baseWidth, width), -1 )
def handleButtonPress( self, widget, event ):
+ if event.button != 1:
+ # bring up properties or something
+ return
+
ind = int(event.x-self.pageOffset)//self.pageSpacing
if ind >= self.noteDB.getPageCount():
if self.dragMode != self.DRAG_MOVE:
@@ -101,10 +105,6 @@ class TuneInterface( gtk.EventBox ):
id = self.noteDB.getPageByIndex( ind )
- if event.state & gtk.gdk.BUTTON2_MASK:
- # bring up properties or something
- return
-
if event.type == gtk.gdk._3BUTTON_PRESS: # triple click -> select all
self.selectAll()
self.owner.displayPage( id )
@@ -130,8 +130,10 @@ class TuneInterface( gtk.EventBox ):
self.owner.setContext( CONTEXT.PAGE )
def handleButtonRelease( self, widget, event ):
- if self.dragMode == self.DRAG_MOVE \
- and event.button == 1:
+ if event.button != 1:
+ return
+
+ if self.dragMode == self.DRAG_MOVE:
self.invalidate_rect( 0, 0, self.width, self.height ) # drop head
if self.dropAt > 0: after = self.noteDB.getPageByIndex( self.dropAt-1 )