MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / notifierInit

Method notifierInit

src/bitmessageqt/__init__.py:1349–1375  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1347
1348 # initialise the message notifier
1349 def notifierInit(self):
1350 def _simple_notify(
1351 title, subtitle, category, label=None, icon=None):
1352 self.tray.showMessage(title, subtitle, 1, 2000)
1353
1354 self._notifier = _simple_notify
1355 # does nothing if isAvailable returns false
1356 self._player = QtGui.QSound.play
1357
1358 if not get_plugins:
1359 return
1360
1361 _plugin = get_plugin('notification.message')
1362 if _plugin:
1363 self._notifier = _plugin
1364 else:
1365 logger.warning("No notification.message plugin found")
1366
1367 self._theme_player = get_plugin('notification.sound', 'theme')
1368
1369 if not QtGui.QSound.isAvailable():
1370 _plugin = get_plugin(
1371 'notification.sound', 'file', fallback='file.fallback')
1372 if _plugin:
1373 self._player = _plugin
1374 else:
1375 logger.warning("No notification.sound plugin found")
1376
1377 def notifierShow(
1378 self, title, subtitle, category, label=None, icon=None):

Callers 1

runFunction · 0.95

Calls 1

get_pluginFunction · 0.90

Tested by

no test coverage detected