/[ascend]/trunk/pygtk/gtkbrowser.py
ViewVC logotype

Diff of /trunk/pygtk/gtkbrowser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 436 by johnpye, Tue Apr 4 11:02:51 2006 UTC revision 455 by johnpye, Wed Apr 5 07:50:22 2006 UTC
# Line 56  ESCAPE_KEY = 65307 Line 56  ESCAPE_KEY = 65307
56    
57  HELP_ROOT = None  HELP_ROOT = None
58    
 ASCEND_ICON = 'glade/ascend.png'  
   
59  BROWSER_FIXED_COLOR = "#008800"  BROWSER_FIXED_COLOR = "#008800"
60  BROWSER_FREE_COLOR = "#000088"  BROWSER_FREE_COLOR = "#000088"
61  #======================================  #======================================
# Line 80  class Browser: Line 78  class Browser:
78              ,help="specify the model to instantiate upon loading modules")                    ,help="specify the model to instantiate upon loading modules")      
79    
80          parser.add_option("--pygtk-assets"          parser.add_option("--pygtk-assets"
81              ,action="store", type="string", dest="assetsdir"              ,action="store", type="string", dest="assets_dir"
82              ,help="override the configuration value for the location of assets"\              ,help="override the configuration value for the location of assets"\
83                  +" required by PyGTK for the ASCEND GUI, optional"                  +" required by PyGTK for the ASCEND GUI, optional"
84              ,default=config.PYGTK_ASSETS              ,default=config.PYGTK_ASSETS
# Line 101  class Browser: Line 99  class Browser:
99          #--------          #--------
100          # initialise ASCEND          # initialise ASCEND
101    
102            self.assets_dir = options.assets_dir
103            
104          _prefpath = self.prefs.getStringPref("Directories","librarypath",None)          _prefpath = self.prefs.getStringPref("Directories","librarypath",None)
105                    
106          if _prefpath:          if _prefpath:
# Line 118  class Browser: Line 118  class Browser:
118          #--------          #--------
119          # Prepare the ASCEND icon          # Prepare the ASCEND icon
120    
121          if config.ASCEND_ICON:          if config.ICON_EXTENSION:
122              _icon = gtk.Image()              _icon = gtk.Image()
123              _icon.set_from_file(options.assetsdir+config.ASCEND_ICON)              _iconpath = self.assets_dir+'ascend'+config.ICON_EXTENSION
124              print "ASCEND_ICON="+options.assetsdir+config.ASCEND_ICON              _icon.set_from_file(_iconpath)
             print "_icon="+repr(_icon)  
125              self.icon = _icon.get_pixbuf()                    self.icon = _icon.get_pixbuf()      
126                    
127          #-------------------          #-------------------
128          # Set up the window and main widget actions          # Set up the window and main widget actions
129    
130          self.glade_file = options.assetsdir+config.GLADE_FILE          self.glade_file = self.assets_dir+config.GLADE_FILE
         print "GLADE_FILE:",self.glade_file  
131          glade = gtk.glade.XML(self.glade_file,"browserwin")          glade = gtk.glade.XML(self.glade_file,"browserwin")
132    
133          self.window = glade.get_widget("browserwin")          self.window = glade.get_widget("browserwin")
# Line 217  class Browser: Line 215  class Browser:
215          # pixbufs for solver_var status          # pixbufs for solver_var status
216    
217          self.fixedimg = gtk.Image()          self.fixedimg = gtk.Image()
218          self.fixedimg.set_from_file(options.assetsdir+'locked.png')          self.fixedimg.set_from_file(options.assets_dir+'locked.png')
219    
220          self.iconstatusunknown = None          self.iconstatusunknown = None
221          self.iconfixed = self.fixedimg.get_pixbuf()          self.iconfixed = self.fixedimg.get_pixbuf()
# Line 251  class Browser: Line 249  class Browser:
249    
250          self.freemenuitem = gtk.ImageMenuItem("F_ree",True);          self.freemenuitem = gtk.ImageMenuItem("F_ree",True);
251          _img = gtk.Image()          _img = gtk.Image()
252          _img.set_from_file(options.assetsdir+'unlocked.png')          _img.set_from_file(options.assets_dir+'unlocked.png')
253          self.freemenuitem.set_image(_img)          self.freemenuitem.set_image(_img)
254    
255          self.plotmenuitem = gtk.ImageMenuItem("P_lot",True);          self.plotmenuitem = gtk.ImageMenuItem("P_lot",True);
256          _img = gtk.Image()          _img = gtk.Image()
257          _img.set_from_file(options.assetsdir+'plot.png')          _img.set_from_file(options.assets_dir+'plot.png')
258          self.plotmenuitem.set_image(_img)          self.plotmenuitem.set_image(_img)
259    
260          self.propsmenuitem = gtk.ImageMenuItem("_Properties",True);          self.propsmenuitem = gtk.ImageMenuItem("_Properties",True);
261          _img = gtk.Image()          _img = gtk.Image()
262          _img.set_from_file(options.assetsdir+'properties.png')          _img.set_from_file(options.assets_dir+'properties.png')
263          self.propsmenuitem.set_image(_img)          self.propsmenuitem.set_image(_img)
264    
265          self.observemenuitem = gtk.ImageMenuItem("_Observe",True);          self.observemenuitem = gtk.ImageMenuItem("_Observe",True);
266          _img = gtk.Image()          _img = gtk.Image()
267          _img.set_from_file(options.assetsdir+'observe.png')          _img.set_from_file(options.assets_dir+'observe.png')
268          self.observemenuitem.set_image(_img)          self.observemenuitem.set_image(_img)
269    
270          self.fixmenuitem.show(); self.fixmenuitem.set_sensitive(False)          self.fixmenuitem.show(); self.fixmenuitem.set_sensitive(False)

Legend:
Removed from v.436  
changed lines
  Added in v.455

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22