X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=pyatspi%2Fapplicationcache.py;h=68fa65ab65b8e8e444a620140bdf732970b4c2e4;hb=9eb5bf8c3ebea61c1b1907738bc6cc193839326c;hp=96a98307c3bee229f3f3d0a20226f813869c322e;hpb=7461acb2027e2e4f0d8e6fa7a6c6630229192c16;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/pyatspi/applicationcache.py b/pyatspi/applicationcache.py index 96a9830..68fa65a 100644 --- a/pyatspi/applicationcache.py +++ b/pyatspi/applicationcache.py @@ -233,4 +233,16 @@ class ApplicationCache(object): """ return self._connection + def _refresh(self): + new = self._app_register.getApplications() + removed = [item for item in self.application_list if item not in new] + added = [item for item in new if item not in self.application_list] + for item in added: + self.update_handler (self._APPLICATIONS_ADD, item) + for item in removed: + self.update_handler (self._APPLICATIONS_REMOVE, item) + + for item in self.application_cache.values(): + item._refresh() + #END----------------------------------------------------------------------------