@@ -16,20 +16,24 @@
1616# You should have received a copy of the GNU General Public License
1717# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
19−from autopilot.input import Touch
19+from autopilot.input import Pointer, Touch
2020
21−from unity8.indicators.emulators import IndicatorEmulatorBase
21+from unity8.shell.emulators import UnityEmulatorBase
2222
2323
24−class DefaultIndicatorWidget(IndicatorEmulatorBase):
24+class DefaultIndicatorWidget(UnityEmulatorBase):
2525
2626 """The indicator's icon in the menu-bar."""
2727
28+ def __init__(self, *args, **kwargs):
29+ super(DefaultIndicatorWidget, self).__init__(*args, **kwargs)
30+ self.pointer = Pointer(Touch.create())
31+
2832 # TODO: submit to autopilot.introspection.types.Rectangle
29− def get_center(global_rect):
33+ def get_center(self):
3034 """Returns (x, y) representing the center of a globalRect."""
31− return (self.global_rect[0]+int(self.global_rect[2]/2),
32− self.global_rect[1]+int(self.global_rect[3]/2))
35+ return (self.globalRect[0]+int(self.globalRect[2]/2),
36+ self.globalRect[1]+int(self.globalRect[3]/2))
3337
3438 def swipe_to_open_indicator(self, window):
3539 """Swipe to open the indicator, wait until it's open."""