commit-gnue
[Top][All Lists]
Advanced

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

gnue/designer/src TreeView.py


From: Jason Cater
Subject: gnue/designer/src TreeView.py
Date: Sun, 22 Jul 2001 22:09:35 -0700

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    01/07/22 22:09:35

Modified files:
        designer/src   : TreeView.py 

Log message:
        Changed hard-coded location of icons to installation-specific directory

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/TreeView.py.diff?cvsroot=OldCVS&tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: gnue/designer/src/TreeView.py
diff -u gnue/designer/src/TreeView.py:1.11 gnue/designer/src/TreeView.py:1.12
--- gnue/designer/src/TreeView.py:1.11  Thu Jul 19 18:35:38 2001
+++ gnue/designer/src/TreeView.py       Sun Jul 22 22:09:35 2001
@@ -196,11 +196,17 @@
 treeIconMap = {}
 treeIconList = wxImageList(24,24,false)
  
-# TODO: This should be pulled from settings passed via gfdesigner script
-iconlocation = '/usr/local/gnue/shared/images'
+if not os.environ.has_key('INSTALL_PREFIX'):
+  iconlocation = os.environ['INSTALL_PREFIX']
+else: 
+  iconlocation = '/usr/local/gnue/shared/images'
+
 for f in ('block','datasource','entry','import','pagewidget',
           'page','trigger','properties'): 
-  treeIconMap[f] = treeIconList.AddIcon(
-      wxIcon('%s/destree_%s.xpm' % (iconlocation, f), wxBITMAP_TYPE_XPM))
+  if os.path.isfile('%s/destree_%s.xpm' % (iconlocation, f)):
+    treeIconMap[f] = treeIconList.AddIcon(
+        wxIcon('%s/destree_%s.xpm' % (iconlocation, f), wxBITMAP_TYPE_XPM))
+  else: 
+    treeIconMap[f] = treeIconList.AddIcon(wxNullIcon)
 
 



reply via email to

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