Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Jam/Desktop.py
diff options
context:
space:
mode:
authoramartin <olpc@xo-05-28-21.localdomain>2007-08-31 09:33:44 (GMT)
committer amartin <olpc@xo-05-28-21.localdomain>2007-08-31 09:33:44 (GMT)
commit1204c5b72630555a5e86dc5de58081baa48f7709 (patch)
treef58890a2a810335c49688a39a47604378e619e0f /Jam/Desktop.py
parentc72c8119c18fca5f277cb3efd61acead578cd4d0 (diff)
Jam popups
Diffstat (limited to 'Jam/Desktop.py')
-rw-r--r--Jam/Desktop.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/Jam/Desktop.py b/Jam/Desktop.py
index 568695d..7380385 100644
--- a/Jam/Desktop.py
+++ b/Jam/Desktop.py
@@ -56,8 +56,9 @@ class Desktop( gtk.EventBox ):
self.rightClicked = False
self.popup = {}
- self.popup[Popup.Shortcut] = Popup.Shortcut( _("Assign Key"), self.owner )
self.popup[Popup.Instrument] = Popup.Instrument( _("Instrument Properties"), self.owner )
+ self.popup[Popup.Drum] = Popup.Drum( _("Drum Kit Properties"), self.owner )
+ self.popup[Popup.Shortcut] = Popup.Shortcut( _("Assign Key"), self.owner )
def dumpToStream( self, ostream ):
for b in self.blocks:
@@ -235,7 +236,17 @@ class Desktop( gtk.EventBox ):
if self.clickedBlock:
if self.clickedBlock.type == Block.Instrument:
self.popup[Popup.Instrument].setBlock( self.clickedBlock )
- self.popup[Popup.Instrument].popup()
+ if self.popup[Popup.Instrument].is_up():
+ self.popup[Popup.Instrument].updatePosition()
+ else:
+ self.popup[Popup.Instrument].popup( True )
+
+ elif self.clickedBlock.type == Block.Drum:
+ #self.popup[Popup.Drum].setBlock( self.clickedBlock )
+ if self.popup[Popup.Drum].is_up():
+ self.popup[Popup.Drum].updatePosition()
+ else:
+ self.popup[Popup.Drum].popup( True )
self.clickedBlock = None
self.rightClicked = False