~sil2100/unity/launcher_dnd_flicker_new

« back to all changes in this revision

Viewing changes to tests/autopilot/autopilot/emulators/unity/launcher.py

  • Committer: Tarmac
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2012-04-30 00:16:55 UTC
  • mfrom: (2349.1.7 launcher-double-icons-fix)
  • Revision ID: tarmac-20120430001655-hpdhzcakwx9rglt1
autopilot: added tests to avoid duplication of icons for applications with no .desktop files. Fixes: . Approved by Thomi Richards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
338
338
 
339
339
        return None
340
340
 
 
341
    def get_icon_by_window_xid(self, xid):
 
342
        """Gets a launcher icon that controls the specified window xid."""
 
343
        icons = [i for i in self.get_children_by_type(SimpleLauncherIcon) if i.xids.contains(xid)]
 
344
        if (len(icons)):
 
345
            return icons[0]
 
346
 
 
347
        return None
 
348
 
341
349
    def get_icons_by_filter(self, **kwargs):
342
350
        """Get a list of icons that satisfy the given filters.
343
351