Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12704/src

Modified Files:
        controlpanel.py eventhandler.py 
Log Message:
move context handling from eventhandler to input

Index: eventhandler.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/eventhandler.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** eventhandler.py     15 Jul 2005 20:41:34 -0000      1.28
--- eventhandler.py     16 Jul 2005 08:41:11 -0000      1.29
***************
*** 55,58 ****
--- 55,59 ----
  import sysconfig
  import plugin
+ import input
  
  from event import *
***************
*** 147,151 ****
          self.popups       = []
          self.applications = []
-         self.context      = None
          self.stack_change = None
          # idle timer variable
--- 148,151 ----
***************
*** 182,188 ****
              previous, app = None, self.applications[-1]
          if not self.popups:
!             self.context = app.get_eventmap()
          else:
!             self.context = self.popups[-1].event_context
  
          fade = app.animated
--- 182,188 ----
              previous, app = None, self.applications[-1]
          if not self.popups:
!             input.set_mapping(app.get_eventmap())
          else:
!             input.set_mapping(self.popups[-1].get_eventmap())
  
          fade = app.animated
***************
*** 231,235 ****
          """
          self.popups.append(window)
!         self.context = window.event_context
  
          
--- 231,235 ----
          """
          self.popups.append(window)
!         input.set_mapping(window.get_eventmap())
  
          
***************
*** 245,251 ****
          self.popups.remove(window)
          if self.popups:
!             self.context = self.popups[-1].event_context
          else:
!             self.context = self.applications[-1].get_eventmap()
                  
  
--- 245,251 ----
          self.popups.remove(window)
          if self.popups:
!             input.set_mapping(self.popups[-1].get_eventmap())
          else:
!             input.set_mapping(self.applications[-1].get_eventmap())
                  
  

Index: controlpanel.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/controlpanel.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** controlpanel.py     25 Jun 2005 08:52:24 -0000      1.7
--- controlpanel.py     16 Jul 2005 08:41:11 -0000      1.8
***************
*** 71,75 ****
          self.plugins = []
          self.p_ctrl          = -1
-         self.event_context   = 'input'
  
          self.container = gui.widgets.Container()
--- 71,74 ----
***************
*** 191,212 ****
              return True
  
!         elif event.context == self.event_context:
!             # pass events to selected plugin
!             plugin = self.plugins[self.p_ctrl]
  
!             if plugin and plugin.visible:
!                 # okay, visible -- check event
  
!                 if event == INPUT_EXIT:
!                     # hide the plugin
!                     self.hide()
!                     self.p_ctrl = -1
!                     gui.display.update()
!                     return True
  
!                 # pass the event to the plugin
!                 elif plugin.eventhandler(event):
!                     gui.display.update()
!                     return True
  
          return False
--- 190,211 ----
              return True
  
!         print event
!         # pass events to selected plugin
!         plugin = self.plugins[self.p_ctrl]
  
!         if plugin and plugin.visible:
!             # okay, visible -- check event
  
!             if event == INPUT_EXIT:
!                 # hide the plugin
!                 self.hide()
!                 self.p_ctrl = -1
!                 gui.display.update()
!                 return True
  
!             # pass the event to the plugin
!             elif plugin.eventhandler(event):
!                 gui.display.update()
!                 return True
  
          return False



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to