def display_splash(self):
"""show splash screen"""
self.splash = gtk.Window()
self.splash.set_decorated(False)
self.splash.set_transient_for(self.winMain)
self.splash.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
self.splash.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
self.splash.set_keep_above(True)
self.splash.set_border_width(self.splash_border_width)
vbox = gtk.VBox()
img = gtk.Image()
self.splash_gfx = os.path.join(CONFIG_DIR, 'layouts', self.layout, 'main-splash.png')
if os.path.exists(self.splash_gfx):
self.log_msg('Custom splash found, loading ' + str(self.splash_gfx))
img.set_from_file(self.splash_gfx)
else:
self.splash_gfx = os.path.join(APP_PATH, 'pixmaps', 'wahcade-logo.png')
self.log_msg('No custom splash found, loading ' + str(self.splash_gfx))
img.set_from_file(self.splash_gfx)
if self.splash_show_text == 1:
lbl = gtk.Label()
lbl.set_alignment(0.5, 0.5)
lbl.set_justify(gtk.JUSTIFY_CENTER)
lbl.set_use_markup(True)
lbl.set_markup('<big><b>Wah!Cade</b></big>\n%s "%s"' % (VERSION, VERSION_NAME))
vbox.pack_end(lbl)
vbox.pack_start(img)
self.splash.add(vbox)
self.splash.show_all()
if not self.tw_api:
self.twitter_api = self.auth_twitter() ## Auth Twitter during startup
self.wait_with_events(0.25)
评论列表
文章目录