From 713964bd8b9d84155701f8357ede529a73704bd5 Mon Sep 17 00:00:00 2001 From: Vincent Vinet Date: Wed, 09 Dec 2009 01:06:30 +0000 Subject: remove the desktop probe, unused --- (limited to 'tutorius/TProbe.py') 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:/// - 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:/// - 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. -- cgit v0.9.1