Hi,
One thing that has been bothering me for a while is that wxSplashScreen
doesn't time out when I'm using Linux, but it does at Windows systems.
My code is ('stolen' from the demo):
···
======================================================================
#!/usr/bin/python
# -*- encoding: iso-8859-1 -*-
import os
import sys
from bibpathfix import *
import wx
from wxPython import wx
work_path = os.path.dirname(sys.argv[0])
if work_path:
os.chdir(work_path)
######################################################################
class StartupApp(wx.wxApp):
"""Startup application used to present the splash screen"""
def OnInit(self):
global imagens
global principal
wx.wxInitAllImageHandlers()
splashfile = os.path.sep.join([imagens, 'BH_SysB.png'])
bmp = wx.wxImage(splashfile).ConvertToBitmap()
splash = wx.wxSplashScreen(bmp,
wx.wxSPLASH_CENTRE_ON_SCREEN |
wx.wxSPLASH_TIMEOUT,
2000, None, -1,
style = wx.wxSIMPLE_BORDER |
wx.wxFRAME_NO_TASKBAR |
wx.wxSTAY_ON_TOP)
import principal
# OnInit should return a boolean value...
return True
if __name__ == "__main__":
app = StartupApp(0)
app.MainLoop()
# After the time out, call our app.
principal.main()
Another informaton that might help is that when there's focus on the
xterm where I called the app, the timing out works. If I call the app
from an icon on the desktop, I have to pass the mouse over the
splashscreen (I don't need to click or anything) to make it disappear.
I think that it is timing out but it isn't being dismissed without
focus.
Anyone has seen that? Any hints on what I might do to make it work with
GTK as it works with Linux? I'm using KDE with the 'focus follows
mouse' option for focus.
Be seeing you,
--
Godoy. <godoy@ieee.org>