コード例 #1
0
ファイル: dbclient.py プロジェクト: activityworkshop/Murmeli
	def _updateAvatar(userid, outputdir):
		picname = "avatar-" + userid + ".jpg"
		outpath = os.path.join(outputdir, picname)
		try: os.remove(outpath)
		except: pass # it wasn't there anyway
		# We export pics for all the contacts but only the ones whose jpg doesn't exist already
		DbClient.exportAvatars(outputdir)
		# Inform all interested listeners that there's been some change with the given url
		DbResourceNotifier.getInstance().notify(picname)
コード例 #2
0
ファイル: gui.py プロジェクト: activityworkshop/Murmeli
 def __init__(self, parent):
     QtWebKit.QWebView.__init__(self)
     self.parent = parent
     self.navInterceptor = NavigationInterceptor(parent)
     self.setPage(Webpage())
     self.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateExternalLinks)
     self.page().setNetworkAccessManager(self.navInterceptor)
     self.connect(self.page(), QtCore.SIGNAL("linkClicked(const QUrl&)"), parent.slotLinkClicked)
     DbResourceNotifier.getInstance().addListener(self)
コード例 #3
0
 def _updateAvatar(userid, outputdir):
     picname = "avatar-" + userid + ".jpg"
     outpath = os.path.join(outputdir, picname)
     # print("outpath = ", outpath)
     try:
         os.remove(outpath)
     except:
         pass  # it wasn't there anyway
     # We export pics for all the contacts but only the ones whose jpg doesn't exist already
     DbI.exportAllAvatars(outputdir)
     # Inform all interested listeners that there's been some change with the given url
     DbResourceNotifier.getInstance().notify(picname)