[pytango] 119/483: prepare resources

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 080e9b22cc0e2728cff9831531458bf87dc169cc
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Mon Jun 11 13:26:38 2012 +0000

    prepare resources
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@20633 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/ipython/ipython_00_11/ipython_00_11.py |  23 +++++++++++++++++++----
 PyTango/ipython/resource/ctexpchannel.png      | Bin 0 -> 65946 bytes
 PyTango/ipython/resource/motorgroup.png        | Bin 0 -> 65909 bytes
 PyTango/ipython/resource/onedexpchannel.png    | Bin 0 -> 65909 bytes
 PyTango/ipython/resource/pseudocounter.png     | Bin 0 -> 65946 bytes
 PyTango/ipython/resource/twodexpchannel.png    | Bin 0 -> 65909 bytes
 PyTango/ipython/resource/zerodexpchannel.png   | Bin 0 -> 65946 bytes
 7 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/PyTango/ipython/ipython_00_11/ipython_00_11.py b/PyTango/ipython/ipython_00_11/ipython_00_11.py
index 84884fa..c147b42 100644
--- a/PyTango/ipython/ipython_00_11/ipython_00_11.py
+++ b/PyTango/ipython/ipython_00_11/ipython_00_11.py
@@ -831,6 +831,7 @@ def complete(text):
     outcomps = sorted(comps)
     return outcomps
 
+
 __DEV_HTML_TEMPLATE = """\
 <table border="0" cellpadding="2">
 <tr><td rowspan="7" valign="middle" align="center"><img src="{icon}" height="128"/></td>
@@ -883,12 +884,12 @@ def display_deviceproxy_html(dev_proxy):
     except:
         fmt["alias"] = "-----"
 
+    db = dev_proxy.get_device_db()
     try:
-        db = dev_proxy.get_device_db()
         fmt["database"] = db.get_db_host() + ":" + db.get_db_port()
     except:
         try:
-            fmt["database"] = dev_proxy.get_device_db().get_file_name()
+            fmt["database"] = db.get_file_name()
         except:
             fmt["database"]  = "Unknown"
 
@@ -898,8 +899,22 @@ def display_deviceproxy_html(dev_proxy):
     except ValueError:
         fmt["doc_url"] = doc_url
 
-    icon = info.dev_class.lower() + os.path.extsep + "png"
-    icon = os.path.join(__RES_DIR, icon)
+    icon_prop = "__icon"
+    klass = info.dev_class
+        
+    try:
+        icon_filename = dev_proxy.get_property(icon_prop)[icon_prop]
+        if icon_filename:
+            icon_filename = icon_filename[0]
+        else:
+            icon_filename = db.get_class_property(klass, icon_prop)[icon_prop]
+            if icon_filename:
+                icon_filename = icon_filename[0]
+            else:            
+                icon_filename = klass.lower() + os.path.extsep + "png"
+    except:
+        icon_filename = klass.lower() + os.path.extsep + "png"
+    icon = os.path.join(__RES_DIR, icon_filename)
     if not os.path.isfile(icon):
         icon = os.path.join(__RES_DIR, "device.png")
     fmt['icon'] =  icon
diff --git a/PyTango/ipython/resource/ctexpchannel.png b/PyTango/ipython/resource/ctexpchannel.png
new file mode 100644
index 0000000..70dbea5
Binary files /dev/null and b/PyTango/ipython/resource/ctexpchannel.png differ
diff --git a/PyTango/ipython/resource/motorgroup.png b/PyTango/ipython/resource/motorgroup.png
new file mode 100644
index 0000000..fe8de61
Binary files /dev/null and b/PyTango/ipython/resource/motorgroup.png differ
diff --git a/PyTango/ipython/resource/onedexpchannel.png b/PyTango/ipython/resource/onedexpchannel.png
new file mode 100644
index 0000000..0be90be
Binary files /dev/null and b/PyTango/ipython/resource/onedexpchannel.png differ
diff --git a/PyTango/ipython/resource/pseudocounter.png b/PyTango/ipython/resource/pseudocounter.png
new file mode 100644
index 0000000..70dbea5
Binary files /dev/null and b/PyTango/ipython/resource/pseudocounter.png differ
diff --git a/PyTango/ipython/resource/twodexpchannel.png b/PyTango/ipython/resource/twodexpchannel.png
new file mode 100644
index 0000000..b7e4e2c
Binary files /dev/null and b/PyTango/ipython/resource/twodexpchannel.png differ
diff --git a/PyTango/ipython/resource/zerodexpchannel.png b/PyTango/ipython/resource/zerodexpchannel.png
new file mode 100644
index 0000000..70dbea5
Binary files /dev/null and b/PyTango/ipython/resource/zerodexpchannel.png differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list