Improved notifications a little bit

This commit is contained in:
Manuel Cortez 2019-01-22 16:35:52 -06:00
parent d741035707
commit a53a3d595c
2 changed files with 2 additions and 5 deletions

View File

@ -647,7 +647,7 @@ class Controller(object):
def notify(self, message="", sound="", type="native"):
if type == "native":
wx.CallAfter(self.window.notify, _("Socializer"), message)
self.window.notify(_("Socializer"), message)
else:
if sound != "":
self.session.soundplayer.play(sound)

View File

@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from builtins import range
import wx
import wx.adv
import application
from wx.lib.agw import toasterbox
class mainWindow(wx.Frame):
def makeMenu(self):
@ -147,5 +144,5 @@ class mainWindow(wx.Frame):
return self.tb.RemovePage(pos)
def notify(self, title, text):
self.notification = wx.adv.NotificationMessage(title, text, parent=self)
self.notification = wx.adv.NotificationMessage(title=title, message=text, parent=self)
self.notification.Show()