- Included README file

- Fix for http://code.google.com/p/gloss-mc/issues/detail?id=9
This commit is contained in:
noisymime 2008-07-04 23:11:32 +00:00
parent d28725d636
commit 544747ebf8
8 changed files with 134 additions and 28 deletions

View File

@ -150,11 +150,11 @@ class GlossMgr:
self.currentMenu = self.menuHistory[-1]
#print event.hardware_keycode
def kill_plugin(self):
def kill_plugin(self, kill_plugin=True):
"""Kills any currently running plugin/module"""
if not self.currentPlugin is None:
self.currentPlugin.stop()
if kill_plugin: self.currentPlugin.stop()
self.currentPlugin = None
timeline_stop = clutter.Timeline(10,30)

100
README Normal file
View File

@ -0,0 +1,100 @@
Gloss 0.1 README.
===================
Gloss is intended to be a drop-in replacement for the existing MythTV frontend.
It is written in Python however uses the Clutter OpenGL framework with the intent of
producing a visually richer interface than the existing MythTV frontend.
Gloss currently requires:
* Clutter >= 0.6
* Clutter-gst
* Clutter-cairo
* pyclutter
* eyed3
* MythTV backend = 0.21
The official website is:
http://gloss-project.org
The developer blog is at
http://noisymime.org/blog/?cat=11
Please log any bugs at:
http://code.google.com/p/gloss-mc/issues/list
Gloss is GPLv3 licensed.
INSTALLATION
====
Gloss does not need to be compiled or installed to be executed, you simply need
to run the included 'gloss' script, optionally with 1 or more of the following arguments:
--help
Show these options
--debug
Turn on debugging (default=no):
Show extra debug message as gloss is running. Use if possible when providing bug reports
--theme <name>
Specify the theme to use.
--show-themes
Display a list of available themes
--tests
Turn on the tests module
--version
Print the current gloss version
VERSIONING
====
Gloss uses the common "Linux kernel" versioning system, where
even-numbered minor versions are stable and odd-numbered minor
versions are development snapshots.
HACKING
====
If you want to hack on and improve gloss, please join the chat on channel #gloss @ chat.freenode.net
BUGS
====
Before logging any bugs, please see the FAQ at:
http://code.google.com/p/gloss-mc/wiki/FAQs
Bugs should be reported to the Gloss tracker at:
http://code.google.com/p/gloss-mc/issues/list
In the report you should include:
* what system you're running Gloss on;
* which version of Clutter you are using;
* which version of Mythtv backend;
* which video card and which drivers you are using;
* a backtrace if applicable;
* how to reproduce the bug.
If the bug exposes a crash, the exact text printed
RELEASE NOTES
====
Release Notes for Gloss 0.1.0
-------------------------------
* First major release. Should be considered a developers version only as it requires significant testing. However:
* All modules included with 0.1 have been tested to work on a standard, unaltered MythTV 0.21 setup. This does not mean, however,
that they will work on *your* MythTV 0.21 system.
* Live TV playback is dependant on gstreamers ability to play whatever format your video is capture in. This is
known to work at least with DVB-T mpeg2-ts broadcasts

View File

@ -33,16 +33,6 @@ class SplashScr(clutter.Group):
self.box = RoundedRectangle(width, height, clutter.color_parse('White'))
self.box.set_opacity(int(255 * 0.55))
"""
backbox1 = RoundedRectangle(width+10, height+10, clutter.color_parse('Black'))
backbox1.set_opacity(200)
backbox1.set_position(-5, -5)
backbox2 = RoundedRectangle(width+12, height+12, clutter.color_parse('White'))
backbox2.set_position(-6, -6)
self.centre_group.add(backbox2)
self.centre_group.add(backbox1)
"""
self.centre_group.add(self.box)
self.spinner = Spinner(self.glossMgr)
@ -124,6 +114,14 @@ class SplashScr(clutter.Group):
def set_msg(self, msg):
self.message.set_text(msg)
(x1, y1, x2, y2) = self.message.get_coords()
if x2 > self.box.get_width():
new_width = int(x2 * 1.10)
self.box.set_width(new_width)
new_x = int( (self.stage.get_width() - new_width) / 2 )
self.centre_group.set_x(new_x)
def set_details(self, detail):
self.detail.set_text(detail)

4
gloss
View File

@ -1,7 +1,7 @@
#!/bin/bash
install_dir=/usr/share/gloss
install_dir=/home/josh/eclipse/gloss
version="0.1 (r255)"
install_dir=/home/josh/eclipse/gloss-mc
version="0.1 (r258)"
print_help()
{

View File

@ -135,8 +135,10 @@ class MainApp:
if self.glossMgr.debug: print "Loading module: %s" % title
self.splashScreen.set_msg("Loading "+title)
#while gtk.events_pending():
#x=0
#while (gtk.events_pending()) and (x<5):
# gtk.main_iteration(0)
# x += 1
temp_menu_item = MainMenu.addItem(title)
temp_menu_item.add_image_from_texture(tempMod.menu_image)
temp_menu_item.setAction(tempMod.action())

View File

@ -144,9 +144,9 @@ class Interface(clutter.Group):
self.input_queue.set_timeline(self.label_list.timeline)
#Show the current menu item's graphic
self.label_list.get_current_item().get_item_textures().show()
self.image_group.add(self.label_list.get_current_item().get_item_textures())
#self.menuItems[self.selected].itemTexturesGroup.show()
if not self.label_list.get_current_item() is None:
self.label_list.get_current_item().get_item_textures().show()
self.image_group.add(self.label_list.get_current_item().get_item_textures())
def get_current_item(self):
return self.label_list.get_current_item()

View File

@ -205,7 +205,6 @@ class MythBackendConnection(threading.Thread):
print "Ending playback"
self.videoPlayer.stop()
self.videoPlayer.glossMgr.kill_plugin()
#self.stop()
def message_socket_mgr(self, msg_socket):

View File

@ -29,6 +29,7 @@ class Module:
self.currentChannel = 0
self.isRunning = False
self.changing_channels = False
def setup_ui(self):
self.menu_image = self.glossMgr.themeMgr.get_texture("mythtv_menu_image", None, None)
@ -40,7 +41,7 @@ class Module:
def begin(self, glossMgr):
self.glossMgr = glossMgr
#self.buffer_file_reader = open("test.mpg","r")
self.loading_scr = SplashScr(self.stage)
self.loading_scr = SplashScr(self.glossMgr)
self.loading_scr.set_msg("Starting TV...")
self.loading_scr.backdrop.set_opacity(180)
self.loading_scr.display_elegant()
@ -68,6 +69,8 @@ class Module:
self.videoController.stop_video()
if self.myConn:
self.myConn.stop() # Stops the backend / frontend streaming
if not self.changing_channels:
self.glossMgr.kill_plugin(kill_plugin=False)
def stop_video(self):
self.myConn.stop()
@ -77,18 +80,18 @@ class Module:
#Handle up/down presses for OSD
if (event.keyval == clutter.keysyms.Up) or (event.keyval == clutter.keysyms.Down):
self.osd.on_key_press_event(event, self)
self.videoController.on_key_press_event(event)
if (event.keyval == clutter.keysyms.Return):
return False
elif (event.keyval == clutter.keysyms.Return):
if self.osd.on_screen:
chanNum = self.osd.currentChannel.channum
self.set_channel(chanNum)
return False
else:
self.videoController.on_key_press_event(event)
if event.keyval == clutter.keysyms.Escape:
return True
#print event.hardware_keycode
"""if event.keyval == clutter.keysyms.p:
@ -119,7 +122,9 @@ class Module:
return tempMenu
def set_channel(self, channum):
self.loading_scr = SplashScr(self.stage)
self.changing_channels = True
self.loading_scr = SplashScr(self.glossMgr)
self.loading_scr.set_msg("Loading Channel ")
self.loading_scr.set_details(self.osd.currentChannel.name)
self.loading_scr.backdrop.set_opacity(180)
@ -134,7 +139,9 @@ class Module:
def complete_change(self, data):
self.videoController.unpause_video()
self.loading_scr.remove_elegant()
self.loading_scr.remove_elegant()
self.changing_channels = False
import pango
class osd_channel(clutter.Group):