Added an experiment (stage 1 of 3)
This commit is contained in:
parent
cf4971a6c4
commit
2f175f5529
@ -425,6 +425,7 @@ class Controller(object):
|
|||||||
r = self.session.vk.client.account.setOnline()
|
r = self.session.vk.client.account.setOnline()
|
||||||
except:
|
except:
|
||||||
log.error("Error in setting online for the current user")
|
log.error("Error in setting online for the current user")
|
||||||
|
self.window.notify("Socializer", "online now!")
|
||||||
|
|
||||||
def set_offline(self):
|
def set_offline(self):
|
||||||
try:
|
try:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
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):
|
||||||
@ -125,8 +126,17 @@ class mainWindow(wx.Frame):
|
|||||||
self.tb.DeletePage(pos)
|
self.tb.DeletePage(pos)
|
||||||
|
|
||||||
def notify(self, title, text):
|
def notify(self, title, text):
|
||||||
try:
|
# try:
|
||||||
self.notification = wx.adv.NotificationMessage(title, text, parent=self)
|
# self.notification = wx.adv.NotificationMessage(title, text, parent=self)
|
||||||
except AttributeError:
|
# except AttributeError:
|
||||||
self.notification = wx.NotificationMessage(title, text)
|
# self.notification = wx.NotificationMessage(title, text)
|
||||||
self.notification.Show()
|
# self.notification.Show()
|
||||||
|
tbb= toasterbox.ToasterBox(self, toasterbox.TB_SIMPLE, windowstyle=toasterbox.TB_CAPTION, closingstyle=toasterbox.TB_ONTIME)
|
||||||
|
tbb.SetPopupSize((200, 100))
|
||||||
|
tbb.SetPopupPauseTime(4000)
|
||||||
|
tbb.SetPopupPositionByInt(3)
|
||||||
|
tbb.SetPopupText(text)
|
||||||
|
tbb.SetTitle(title)
|
||||||
|
tbb.SetUseFocus(True)
|
||||||
|
print("Notifycation print")
|
||||||
|
wx.CallAfter(self.Play)
|
Loading…
Reference in New Issue
Block a user