commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/navigator setup.py src/GNClient.py src/GNO...


From: James Thompson
Subject: gnue/navigator setup.py src/GNClient.py src/GNO...
Date: Wed, 13 Feb 2002 15:38:43 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     James Thompson <address@hidden> 02/02/13 15:38:42

Modified files:
        navigator      : setup.py 
        navigator/src  : GNClient.py GNObjects.py GNParser.py UItext.py 
                         UIwxpython.py UIwxweb.py 

Log message:
        added type='app' support to steps
        added hourglass feedback on form/app launch
        fixed setup to include Actions package on install

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/setup.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/GNClient.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/GNObjects.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/GNParser.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/UItext.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/UIwxpython.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/UIwxweb.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gnue/navigator/setup.py
diff -c gnue/navigator/setup.py:1.1 gnue/navigator/setup.py:1.2
*** gnue/navigator/setup.py:1.1 Tue Jan  8 17:31:20 2002
--- gnue/navigator/setup.py     Wed Feb 13 15:38:42 2002
***************
*** 188,194 ****
  #                       'doc/user_guide.pdf'])],
         data_files = [],
  
!        packages = ["gnue.navigator"],
         package_dir = {"gnue.navigator" : "src"},
         scripts = ["client/gnuenav"]
         )
--- 188,194 ----
  #                       'doc/user_guide.pdf'])],
         data_files = [],
  
!        packages = ["gnue.navigator","gnue.navigator.Actions"],
         package_dir = {"gnue.navigator" : "src"},
         scripts = ["client/gnuenav"]
         )
Index: gnue/navigator/src/GNClient.py
diff -c gnue/navigator/src/GNClient.py:1.4 gnue/navigator/src/GNClient.py:1.5
*** gnue/navigator/src/GNClient.py:1.4  Thu Jan 10 20:14:54 2002
--- gnue/navigator/src/GNClient.py      Wed Feb 13 15:38:42 2002
***************
*** 106,117 ****
  
      # Handle any action commands
      if self.OPTIONS['kde_menu']:
!       from Actions import kde_menu
        kde_menu.run(nav, self.ARGUMENTS[1:])
        sys.exit()
  
      if self.OPTIONS['gnome_menu']:
!       from Actions import gnome_menu
        gnome_menu.run(nav, self.ARGUMENTS[1:])
        sys.exit()
  
--- 106,117 ----
  
      # Handle any action commands
      if self.OPTIONS['kde_menu']:
!       from gnue.navigator.Actions import kde_menu
        kde_menu.run(nav, self.ARGUMENTS[1:])
        sys.exit()
  
      if self.OPTIONS['gnome_menu']:
!       from gnue.navigator.Actions import gnome_menu
        gnome_menu.run(nav, self.ARGUMENTS[1:])
        sys.exit()
  
Index: gnue/navigator/src/GNObjects.py
diff -c gnue/navigator/src/GNObjects.py:1.2 gnue/navigator/src/GNObjects.py:1.3
*** gnue/navigator/src/GNObjects.py:1.2 Tue Jan 22 20:25:45 2002
--- gnue/navigator/src/GNObjects.py     Wed Feb 13 15:38:42 2002
***************
*** 44,49 ****
--- 44,50 ----
      self._clientHandlers = {
        'form': self._runForm,
        'report': self._runReport,
+       'app': self._runApp,
      }
  
    def setClientHandlers(self, handlers):
***************
*** 58,74 ****
      formCommand = GConfig.get('runFormCommand','')
  
      if not formCommand:
!       formCommand = "gfcvs %s" % step.location
!     else:
!       formCommand = "%s %s" % (formCommand,step.location)
  
!     GDebug.printMesg(1,'Running "%s"'%formCommand)
  
!     os.system(formCommand)
  
  
    def _runReport(self, step):
      pass
  
  
  class GNProcess(GNObject):
--- 59,89 ----
      formCommand = GConfig.get('runFormCommand','')
  
      if not formCommand:
!       formCommand = "gfcvs"
! 
!     GDebug.printMesg(1,'Running "%s on form %s "'%(formCommand,step.location))
  
!     if sys.platform != 'win32':
!       
os.spawnlpe(os.P_NOWAIT,formCommand,formCommand,step.location,os.environ)
!     else:
!       # TODO: Not tested
!       os.spawnle(os.P_NOWAIT,formCommand,formCommand,step.location,os.environ)
  
!   def _runApp(self, step):
  
+     GDebug.printMesg(1,'Running app "%s"'%(step.location))
  
+     command = string.split(step.location)
+     
+     if sys.platform != 'win32':
+       os.spawnvpe(os.P_NOWAIT,command[0],command,os.environ)
+     else:
+       # TODO: Not tested
+       os.spawnve(os.P_NOWAIT,command[0],command,os.environ)
+       
    def _runReport(self, step):
      pass
+ 
  
  
  class GNProcess(GNObject):
Index: gnue/navigator/src/GNParser.py
diff -c gnue/navigator/src/GNParser.py:1.1 gnue/navigator/src/GNParser.py:1.2
*** gnue/navigator/src/GNParser.py:1.1  Tue Jan  8 17:16:55 2002
--- gnue/navigator/src/GNParser.py      Wed Feb 13 15:38:42 2002
***************
*** 103,108 ****
--- 103,109 ----
              'type': {
                 'Required': 1,
                 'ValueSet': {
+                  'app': {},
                   'form': {},
                   'report': {} },
                 'Typecast': GTypecast.name },
Index: gnue/navigator/src/UItext.py
diff -c gnue/navigator/src/UItext.py:1.1 gnue/navigator/src/UItext.py:1.2
*** gnue/navigator/src/UItext.py:1.1    Tue Jan  8 19:07:36 2002
--- gnue/navigator/src/UItext.py        Wed Feb 13 15:38:42 2002
***************
*** 98,103 ****
--- 98,114 ----
        else:
          process = object
  
+   # Called whenever forms goes into a "wait" state in which user cannot
+   # interact with interface (e.g., while waiting for a query or a commit)
+   def beginWait (self):
+     pass
+ 
+   # Called whenever forms leaves a "wait" state
+   def endWait (self):
+     pass
+ 
+ 
+ 
  
  def getInput(message, default, responseSet=None):
    print ""
Index: gnue/navigator/src/UIwxpython.py
diff -c gnue/navigator/src/UIwxpython.py:1.3 
gnue/navigator/src/UIwxpython.py:1.4
*** gnue/navigator/src/UIwxpython.py:1.3        Fri Jan 18 15:57:06 2002
--- gnue/navigator/src/UIwxpython.py    Wed Feb 13 15:38:42 2002
***************
*** 30,35 ****
--- 30,37 ----
  
  
  from wxPython.wx import *
+ from time import sleep
+ from gnue.common import GConfig
  
  class Instance(wxApp):
    def __init__(self, processes):
***************
*** 91,98 ****
--- 93,132 ----
  
      object = self.selections[self.selection]
  
+ 
+ 
      if object._type != 'GNStep':
        self.buildMenu(object)
      else:
+       delay = GConfig.get('hourglassDelay','')
+       if not delay:
+         delay = 2
+       else:
+         delay = int(delay)
+ 
+       self.beginWait()
        object.run()
+       sleep(delay)
+       self.endWait()
+ 
+ 
+   # Called whenever forms goes into a "wait" state in which user cannot
+   # interact with interface (e.g., while waiting for a query or a commit)
+   def beginWait (self):
+     wxBeginBusyCursor()
+ 
+   # Called whenever forms leaves a "wait" state
+   def endWait (self):
+     wxEndBusyCursor()
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
  
Index: gnue/navigator/src/UIwxweb.py
diff -c gnue/navigator/src/UIwxweb.py:1.3 gnue/navigator/src/UIwxweb.py:1.4
*** gnue/navigator/src/UIwxweb.py:1.3   Mon Jan 21 18:56:46 2002
--- gnue/navigator/src/UIwxweb.py       Wed Feb 13 15:38:42 2002
***************
*** 83,93 ****
--- 83,95 ----
  
    def OnLinkClicked(self, event):
      print "Here!"
+     self.beginWait()
      object = self.selections[event.GetHref()]
      if object._type == 'GNStep':
        object.run()
      else:
        self.buildMenu(object)
+     self.endWait()
  
    #
    # Default HTML Template
***************
*** 132,137 ****
--- 134,149 ----
      return """
  <tr%s><td><a href="%s">%s</a></td></tr>
  """ % (shading,url, description)
+ 
+   # Called whenever forms goes into a "wait" state in which user cannot
+   # interact with interface (e.g., while waiting for a query or a commit)
+   def beginWait (self):
+     wxBeginBusyCursor()
+ 
+   # Called whenever forms leaves a "wait" state
+   def endWait (self):
+     wxEndBusyCursor()
+ 
  
  
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]