I can't even be bothered listing it all
|
@ -159,10 +159,10 @@ class MenuSelector(clutter.Texture):
|
|||
self.set_pixbuf(pixbuf)
|
||||
self.set_width(self.width)
|
||||
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file("ui/spinner1.gif")
|
||||
self.spinner = clutter.Texture()
|
||||
self.spinner.set_pixbuf(pixbuf)
|
||||
self.spinner.hide()
|
||||
#pixbuf = gtk.gdk.pixbuf_new_from_file("ui/spinner1.gif")
|
||||
#self.spinner = clutter.Texture()
|
||||
#self.spinner.set_pixbuf(pixbuf)
|
||||
#self.spinner.hide()
|
||||
|
||||
|
||||
def selectItem(self, selectee, timeline):
|
||||
|
|
BIN
MenuMgr.pyc
|
@ -14,9 +14,9 @@ class Spinner (clutter.Texture):
|
|||
self.timeline = clutter.Timeline(40,20)
|
||||
self.timeline.set_loop(True)
|
||||
alpha = clutter.Alpha(self.timeline, clutter.ramp_inc_func)
|
||||
spin_behaviour = clutter.BehaviourRotate(alpha, clutter.Z_AXIS, clutter.ROTATE_CW, 0, 359)
|
||||
spin_behaviour.set_center(self.get_width()/2,self.get_height()/2, 0)
|
||||
spin_behaviour.apply(self)
|
||||
self.spin_behaviour = clutter.BehaviourRotate(alpha, clutter.Z_AXIS, clutter.ROTATE_CW, 0, 359)
|
||||
self.spin_behaviour.set_center(self.get_width()/2,self.get_height()/2, 0)
|
||||
self.spin_behaviour.apply(self)
|
||||
self.timeline.start()
|
||||
|
||||
def stop(self):
|
||||
|
|
BIN
Spinner.pyc
|
@ -0,0 +1,80 @@
|
|||
import pygtk
|
||||
import gtk
|
||||
import pygst
|
||||
import gst
|
||||
import gobject
|
||||
import pango
|
||||
import clutter
|
||||
from Spinner import Spinner
|
||||
|
||||
class SplashScr():
|
||||
font = "Lucida Grande "
|
||||
message_font_size = 30
|
||||
detail_font_size = 22
|
||||
|
||||
def __init__(self, stage):
|
||||
self.stage = stage
|
||||
|
||||
self.backdrop = clutter.Rectangle()
|
||||
self.backdrop.set_color(clutter.color_parse('Black'))
|
||||
self.backdrop.set_width(self.stage.get_width())
|
||||
self.backdrop.set_height(self.stage.get_height())
|
||||
|
||||
|
||||
self.main_group = clutter.Group()
|
||||
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file("ui/splash_box.png")
|
||||
self.box = clutter.Texture()
|
||||
self.box.set_pixbuf(pixbuf)
|
||||
self.box.set_opacity(int(255 * 0.75))
|
||||
self.box.set_height(int(self.stage.get_height()* 0.15))
|
||||
self.main_group.add(self.box)
|
||||
|
||||
self.spinner = Spinner()
|
||||
height = int(self.box.get_height() * 0.90)
|
||||
height = height + (height % 2) # Make sure that the dimension is even
|
||||
self.spinner.set_height(height)
|
||||
self.spinner.set_width(height)
|
||||
self.spinner.set_position(5, int(self.box.get_height() * 0.05 ) )
|
||||
self.main_group.add(self.spinner)
|
||||
|
||||
self.message = clutter.Label()
|
||||
self.message.set_font_name(self.font + str(self.message_font_size))
|
||||
self.message.set_color(clutter.color_parse('White'))
|
||||
pos_x = self.spinner.get_x()
|
||||
pos_x = pos_x + int (self.spinner.get_width() * 1.1)
|
||||
self.message.set_position(pos_x, 0)
|
||||
self.main_group.add(self.message)
|
||||
|
||||
self.detail = clutter.Label()
|
||||
self.detail.set_font_name(self.font + str(self.detail_font_size))
|
||||
self.detail.set_color(clutter.color_parse('White'))
|
||||
self.main_group.add(self.detail)
|
||||
|
||||
|
||||
def display(self):
|
||||
self.stage.add(self.backdrop)
|
||||
self.backdrop.show()
|
||||
|
||||
self.stage.add(self.main_group)
|
||||
self.main_group.show_all()
|
||||
group_x = (self.stage.get_width()/2) - (self.box.get_width()/2)
|
||||
group_y = (self.stage.get_height()/2) - (self.box.get_height()/2)
|
||||
self.main_group.set_position(group_x, group_y)
|
||||
self.main_group.show()
|
||||
|
||||
self.spinner.start()
|
||||
|
||||
def remove(self):
|
||||
self.stage.remove(self.main_group)
|
||||
self.stage.remove(self.backdrop)
|
||||
|
||||
|
||||
def set_msg(self, msg):
|
||||
self.message.set_text(msg)
|
||||
|
||||
def set_details(self, detail):
|
||||
self.detail.set_test(detail)
|
||||
|
||||
|
||||
|
46
gloss.py
|
@ -3,6 +3,8 @@ import clutter
|
|||
#import gobject
|
||||
import pygtk
|
||||
import gtk
|
||||
import thread
|
||||
from SplashScr import SplashScr
|
||||
from Menu import Menu
|
||||
from MenuMgr import MenuMgr
|
||||
from Slideshow import Slideshow
|
||||
|
@ -24,16 +26,22 @@ class MainApp:
|
|||
self.stage.set_property("fullscreen", True)
|
||||
self.stage.connect('button-press-event', self.on_button_press_event)
|
||||
self.stage.show_all()
|
||||
#clutter.main()
|
||||
|
||||
#hide the cursor
|
||||
self.stage.hide_cursor()
|
||||
|
||||
#Display a loading / splash screen
|
||||
self.splashScreen = SplashScr(self.stage)
|
||||
self.splashScreen.display()
|
||||
|
||||
def loadGloss(self, arg):
|
||||
|
||||
#color = clutter.Color(0xff, 0xcc, 0xcc, 0xdd)
|
||||
color = clutter.Color(0, 0, 0, 0)
|
||||
|
||||
self.menuMgr = MenuMgr(self.stage)
|
||||
self.stage.connect('key-press-event', self.menuMgr.on_key_press_event)
|
||||
|
||||
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Creating menus")
|
||||
menu1 = Menu(self.menuMgr)
|
||||
menu1.addItem("TV", "ui/dvd.png")
|
||||
menu1.addItem("Slideshow", "ui/gallery.png")
|
||||
|
@ -43,12 +51,10 @@ class MainApp:
|
|||
menu1.addItem("nothing", "ui/dvd.png")
|
||||
menu1.addItem("nothing", "ui/dvd.png")
|
||||
menu1.addItem("nothing", "ui/dvd.png")
|
||||
|
||||
|
||||
#menu1.setListFont('Tahoma 42')
|
||||
menu1.setMenuPositionByName("center")
|
||||
self.menu1 = menu1
|
||||
self.menu1.display()
|
||||
self.menu1.selectFirst(True)
|
||||
|
||||
self.menu2 = Menu(self.menuMgr)
|
||||
self.menu2.addItem("Nothing", "ui/dvd.png")
|
||||
|
@ -61,17 +67,28 @@ class MainApp:
|
|||
self.menu2.addItem("blah4", "ui/dvd.png")
|
||||
#self.menu2.setListFont('Tahoma 42')
|
||||
self.menu2.setMenuPositionByName("center")
|
||||
|
||||
|
||||
|
||||
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Connecting to MythTV server")
|
||||
#Create a master mySQL connection
|
||||
self. dbMgr = mythDB()
|
||||
self.dbMgr = mythDB()
|
||||
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Loading gallery")
|
||||
self.mySlideshow = Slideshow(self.menuMgr, self.dbMgr)
|
||||
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Loading videos")
|
||||
self.vidPlayer = VideoPlayer(self.stage, self.dbMgr)
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Setting up TV player")
|
||||
self.tvPlayer = TVPlayer(self.stage, self.dbMgr)
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Setting up DVD player")
|
||||
self.dvdPlayer = DvdPlayer(self.stage)
|
||||
#Update splash status msg
|
||||
self.splashScreen.set_msg("Setting up Music player")
|
||||
self.musicPlayer = MusicPlayer(self.stage)
|
||||
|
||||
menu1.getItem(0).setAction(self.tvPlayer)
|
||||
|
@ -83,6 +100,10 @@ class MainApp:
|
|||
|
||||
self.menu2.getItem(1).setAction(self.menu1)
|
||||
|
||||
self.splashScreen.remove()
|
||||
self.stage.connect('key-press-event', self.menuMgr.on_key_press_event)
|
||||
self.menu1.display()
|
||||
self.menu1.selectFirst(True)
|
||||
#print self.menuMgr.get_selector_bar().get_abs_position()
|
||||
#self.menuMgr.get_selector_bar().set_spinner(True)
|
||||
|
||||
|
@ -101,7 +122,12 @@ class MainApp:
|
|||
|
||||
def main (args):
|
||||
app = MainApp()
|
||||
#thread.start_new_thread(app.run, (None,))
|
||||
#thread.start_new_thread(app.loadGloss, (None,))
|
||||
app.loadGloss(None)
|
||||
app.run()
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
BIN
images/1.jpg
Before Width: | Height: | Size: 60 KiB |
BIN
images/tmp/2.jpg
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 382 KiB |
Before Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 84 KiB |