diff options
author | amartin <olpc@localhost.localdomain> | 2007-02-19 03:10:58 (GMT) |
---|---|---|
committer | amartin <olpc@localhost.localdomain> | 2007-02-19 03:10:58 (GMT) |
commit | 5dc1902fead1d72bcd1115b9576ac121abbb7b34 (patch) | |
tree | 7a5fb567d4a2e15c9d25b2eabb40355c9e463f74 /Edit/TrackInterface.py | |
parent | ba93fb5ee02025223d74018df9bbcacf31d165a9 (diff) |
context buttons, updated Image*Buttons,
Diffstat (limited to 'Edit/TrackInterface.py')
-rw-r--r-- | Edit/TrackInterface.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Edit/TrackInterface.py b/Edit/TrackInterface.py index 5d9da92..364a68f 100644 --- a/Edit/TrackInterface.py +++ b/Edit/TrackInterface.py @@ -66,6 +66,7 @@ class TrackInterface( gtk.EventBox ): self.curAction = False # stores the current mouse action self.curActionObject = False # stores the object that in handling the action + self.clickButton = 0 # used in release and motion events to make sure we where actually the widget originally clicked. (hack for popup windows) self.buttonPressCount = 1 # used on release events to indicate double/triple releases self.clickLoc = [0,0] # location of the last click self.marqueeLoc = False # current drag location of the marquee @@ -289,6 +290,8 @@ class TrackInterface( gtk.EventBox ): TP.ProfileBegin( "TI::handleButtonPress" ) + self.clickButton = event.button + if event.button != 1: print "Should bring up some note parameters or something!" #self.noteParameters = NoteParametersWindow( self.trackDictionary, self.getNoteParameters ) @@ -368,6 +371,9 @@ class TrackInterface( gtk.EventBox ): def handleButtonRelease( self, widget, event ): + if not self.clickButton: return # we recieved this event but were never clicked! (probably a popup window was open) + self.clickButton = 0 + TP.ProfileBegin( "TI::handleButtonRelease" ) if event.button != 1: @@ -416,6 +422,12 @@ class TrackInterface( gtk.EventBox ): TP.ProfileEnd( "TI::handleMotion::Common" ) + if not self.clickButton and self.curAction != "paste": # we recieved this event but were never clicked! (probably a popup window was open) + TP.ProfileBegin( "TI::handleMotion::Hover" ) + self.updateTooltip( event ) + TP.ProfileEnd( "TI::handleMotion::Hover" ) + return + if self.curAction == "paste": TP.ProfileBegin( "TI::handleMotion::Paste" ) top = Config.NUMBER_OF_TRACKS |