commit-gnue
[Top][All Lists]
Advanced

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

gnue/navigator/src GNClient.py UItext.py UIwxpy...


From: Jan Ischebeck
Subject: gnue/navigator/src GNClient.py UItext.py UIwxpy...
Date: Fri, 07 Jun 2002 06:11:09 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jan Ischebeck <address@hidden>  02/06/07 06:11:09

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

Log message:
        add about box to UIwxpython, update text client to work with the new 
GNDescription type, add an back button to UIwxweb.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/GNClient.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/UItext.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/UIwxpython.py.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/src/UIwxweb.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: gnue/navigator/src/GNClient.py
diff -c gnue/navigator/src/GNClient.py:1.11 gnue/navigator/src/GNClient.py:1.12
*** gnue/navigator/src/GNClient.py:1.11 Fri Jun  7 01:24:46 2002
--- gnue/navigator/src/GNClient.py      Fri Jun  7 06:11:09 2002
***************
*** 140,148 ****
  
      if self.ui_type == 'text' :
        import UItext as interface
!       interface.Instance(nav).run(self.connections)
!     else:
!       interface.Instance(nav).run()
  
  if __name__ == '__main__':
    GNClient().run()
--- 140,147 ----
  
      if self.ui_type == 'text' :
        import UItext as interface
! 
!     interface.Instance(nav).run(self.connections)
  
  if __name__ == '__main__':
    GNClient().run()
Index: gnue/navigator/src/UItext.py
diff -c gnue/navigator/src/UItext.py:1.3 gnue/navigator/src/UItext.py:1.4
*** gnue/navigator/src/UItext.py:1.3    Thu Jun  6 16:55:40 2002
--- gnue/navigator/src/UItext.py        Fri Jun  7 06:11:09 2002
***************
*** 35,41 ****
    def __init__(self, processes):
      self.processes = processes
  
!   def run(self):
  
      self.buildMenu(self.processes)
  
--- 35,41 ----
    def __init__(self, processes):
      self.processes = processes
  
!   def run(self, connections):
  
      self.buildMenu(self.processes)
  
***************
*** 59,72 ****
  
        for child in process._children:
  
!         count += 1
! 
!         if child._type == 'GNProcess':
!           text = "%s >" % (child.title)
!         elif child._type == 'GNStep':
!           text = child.title
!         self.selections["%s" % count] = child
!         print "%3d: %s" % (count, text)
  
  
        print
--- 59,77 ----
  
        for child in process._children:
  
!         if child._type != 'GNDescription':        
!           
!           count += 1
!           
!           if child._type == 'GNProcess':
!             text = "%s >" % (child.title)
!           elif child._type == 'GNStep':
!             text = child.title
!           else:
!             text = 'unknown type %s' % child._type
!             
!           self.selections["%s" % count] = child
!           print "%3d: %s" % (count, text)
  
  
        print
Index: gnue/navigator/src/UIwxpython.py
diff -c gnue/navigator/src/UIwxpython.py:1.16 
gnue/navigator/src/UIwxpython.py:1.17
*** gnue/navigator/src/UIwxpython.py:1.16       Thu Jun  6 23:03:05 2002
--- gnue/navigator/src/UIwxpython.py    Fri Jun  7 06:11:09 2002
***************
*** 75,80 ****
--- 75,81 ----
      self.frame.SetMenuBar(self.menu)
      
      EVT_MENU (self.frame, ID_EXIT, self.OnClose)        
+     EVT_MENU (self.frame, ID_ABOUT, self.OnAbout)        
  
      self.splitter= wxSplitterWindow(self.frame,-1)
  
***************
*** 131,138 ****
--- 132,156 ----
  
  
    def OnClose(self, event):
+     # close down 
      self.frame.Destroy()
  
+   def OnAbout(self, event):
+     text = _("GNUE Navigator")+"\n"+      \
+     _("  Version : ")+"%s\n"+         \
+     _("  Driver  : UIwxpython")+"\n"+ \
+     _("-= Process Info =-")+"\n"+        \
+     _("  Name   : ")+"%s\n"+          \
+     _("  Version: ")+"%s\n"+          \
+     _("  Author : ")+"%s\n"+          \
+     _("  Description:")+"%s\n"
+     dlg = wxMessageDialog(self.frame,
+                           text % ("0.0.1","","","",""),
+                           _("About"), wxOK | wxICON_INFORMATION)
+     dlg.ShowModal()
+       
+     dlg.Destroy()
+ 
    def buildMenu(self, process):
      self.tree.Expand(process.__node)
      return 1
***************
*** 184,190 ****
    def handleError(self, mesg):
      dlg = wxMessageDialog(self.frame, "Error: %s!" % mesg, \
                            "Error", \
!                           wxCANCEL)  
      dlg.ShowModal()
      
      dlg.Destroy()
--- 202,208 ----
    def handleError(self, mesg):
      dlg = wxMessageDialog(self.frame, "Error: %s!" % mesg, \
                            "Error", \
!                           wxOK)  
      dlg.ShowModal()
      
      dlg.Destroy()
***************
*** 277,279 ****
--- 295,298 ----
      self.Append(self._menu,'&Menu')
      self.Append(self._favorites,'&Favorites')
      self.Append(self._help,'&Help')
+ 
Index: gnue/navigator/src/UIwxweb.py
diff -c gnue/navigator/src/UIwxweb.py:1.6 gnue/navigator/src/UIwxweb.py:1.7
*** gnue/navigator/src/UIwxweb.py:1.6   Thu Jun  6 16:55:40 2002
--- gnue/navigator/src/UIwxweb.py       Fri Jun  7 06:11:09 2002
***************
*** 37,43 ****
      self.processes = processes
      wxApp.__init__(self)
  
!   def run(self):
      self.MainLoop()
  
    def OnInit(self):
--- 37,43 ----
      self.processes = processes
      wxApp.__init__(self)
  
!   def run(self, connections):
      self.MainLoop()
  
    def OnInit(self):
***************
*** 73,78 ****
--- 73,86 ----
  
      self.frame.SetTitle(process._type == 'GNProcesses' and process.title or \
                          process.title)
+     
+     # if this is not the top branch
+     if process!=self.processes:
+ 
+       url = '%s' % id(process._parent)
+       html += self.getHtmlBack(url, process._parent.title, \
+                                process._parent._type)
+       self.selections['%s' % id(process._parent)] = process._parent
  
      html += self.getHtmlFooter()
  
***************
*** 132,137 ****
--- 140,161 ----
  <tr%s><td><a href="%s">%s</a></td></tr>
  """ % (shade,url, description)
  
+   
+   def getHtmlBack(self, url, description, type):
+     if self.shading:
+       shade  = ' bgcolor="#EEEEEE"'
+       shadeA = ""
+     else:
+       shade  = ""
+       shadeA = ' bgcolor="#EEEEEE"'
+ 
+     self.shading = not self.shading
+ 
+     return """
+ <tr%s><td>&nbsp;</td></tr>    
+ <tr%s><td><font size=-1><a href="%s">[back to <i>%s</i>]</a></font></td></tr>
+ """ % (shade,shadeA,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):
***************
*** 150,155 ****
      wxHtmlWindow.__init__(self, *args, **params)
  
    def OnLinkClicked(self, linkinfo):
!     print "Something happened"
      self.instance.OnLinkClicked(linkinfo)
  
--- 174,179 ----
      wxHtmlWindow.__init__(self, *args, **params)
  
    def OnLinkClicked(self, linkinfo):
! #    print "Something happened"
      self.instance.OnLinkClicked(linkinfo)
  



reply via email to

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