Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tutorius/TProbe.py76
1 files changed, 0 insertions, 76 deletions
diff --git a/tutorius/TProbe.py b/tutorius/TProbe.py
index 5508d49..7da777f 100644
--- a/tutorius/TProbe.py
+++ b/tutorius/TProbe.py
@@ -422,82 +422,6 @@ class FrameProbe(TProbe):
return "frame://"+window+"/"+(".".join(name))
-class DesktopProbe(TProbe):
- """
- Identical to the base probe except that helper functions are redefined
- to handle the four windows that are part of the Frame.
- """
- # ------------------ Helper functions specific to a component --------------
- def find_widget(self, base, path, ignore_errors=True):
- """
- Finds a widget from a base object. Symmetric with retrieve_path
-
- format for the path for the frame should be:
-
- desktop://<view>/<path>
- where view: home | group | mesh
- path: number[.number]*
-
- @param base the parent widget
- @param path fqdn-style target object name
-
- @return widget found
- """
- protocol, p = path.split("://")
- assert protocol == "desktop"
-
- window, object_id = p.split("/")
- if window == "home":
- return find_widget(base._top_panel, object_id, ignore_errors)
- elif window == "group":
- return find_widget(base._bottom_panel, object_id, ignore_errors)
- elif window == "mesh":
- return find_widget(base._left_panel, object_id, ignore_errors)
- else:
- raise RuntimeWarning("Invalid frame panel: '%s'"%window)
-
- return find_widget(base, path, ignore_errors)
-
- def retrieve_path(self, widget):
- """
- Retrieve the path to access a specific widget.
- Symmetric with find_widget.
-
- format for the path for the frame should be:
-
- desktop://<view>/<path>
- where view: home | group | mesh
- path: number[.number]*
-
- @param widget the widget to find a path for
-
- @return path to the widget
- """
- name = []
- child = widget
- parent = widget.parent
- while parent:
- name.insert(0,str(parent.get_children().index(child)))
- child = parent
- parent = child.parent
-
- name.insert(0,"0") # root object itself
-
- window = ""
- if parent._position == gtk.POS_TOP:
- window = "top"
- elif parent._position == gtk.POS_BOTTOM:
- window = "bottom"
- elif parent._position == gtk.POS_LEFT:
- window = "left"
- elif parent._position == gtk.POS_RIGHT:
- window = "right"
- else:
- raise RuntimeWarning("Invalid root panel in frame: %s"%str(parent))
-
- return "desktop://"+window+"/"+(".".join(name))
-
-
class ProbeProxy:
"""
ProbeProxy is a Proxy class for connecting to a remote TProbe.