Improved notifications a little bit
This commit is contained in:
		| @@ -647,7 +647,7 @@ class Controller(object): | |||||||
|  |  | ||||||
| 	def notify(self, message="", sound="", type="native"): | 	def notify(self, message="", sound="", type="native"): | ||||||
| 		if type == "native": | 		if type == "native": | ||||||
| 			wx.CallAfter(self.window.notify, _("Socializer"), message) | 			self.window.notify(_("Socializer"), message) | ||||||
| 		else: | 		else: | ||||||
| 			if sound != "": | 			if sound != "": | ||||||
| 				self.session.soundplayer.play(sound) | 				self.session.soundplayer.play(sound) | ||||||
|   | |||||||
| @@ -1,10 +1,7 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
| from __future__ import unicode_literals |  | ||||||
| from builtins import range |  | ||||||
| import wx | import wx | ||||||
| import wx.adv | import wx.adv | ||||||
| import application | import application | ||||||
| from wx.lib.agw import toasterbox |  | ||||||
|  |  | ||||||
| class mainWindow(wx.Frame): | class mainWindow(wx.Frame): | ||||||
| 	def makeMenu(self): | 	def makeMenu(self): | ||||||
| @@ -147,5 +144,5 @@ class mainWindow(wx.Frame): | |||||||
| 		return self.tb.RemovePage(pos) | 		return self.tb.RemovePage(pos) | ||||||
|  |  | ||||||
| 	def notify(self, title, text): | 	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() | 		self.notification.Show() | ||||||
		Reference in New Issue
	
	Block a user