diff --git a/ReflectionTexture.pyc b/ReflectionTexture.pyc index a8e257a..912ca32 100644 Binary files a/ReflectionTexture.pyc and b/ReflectionTexture.pyc differ diff --git a/Spinner.pyc b/Spinner.pyc index 318b8ec..53eaad4 100644 Binary files a/Spinner.pyc and b/Spinner.pyc differ diff --git a/gloss.py b/gloss.py index 0689da3..bab3e8f 100644 --- a/gloss.py +++ b/gloss.py @@ -34,25 +34,39 @@ class MainApp: self.stage = clutter.stage_get_default() self.stage.set_color(clutter.color_parse('Black')) - self.stage.set_property("fullscreen", True) - self.stage.fullscreen() self.stage.connect('button-press-event', self.on_button_press_event) - self.stage.show_all() - #hide the cursor self.stage.hide_cursor() - #Display a loading / splash screen - self.splashScreen = SplashScr(self.stage) - self.splashScreen.display() #clutter.threads_enter() gobject.timeout_add(500, self.loadGloss) #clutter.threads_leave() #clutter.threads_add_timeout(500, self.loadGloss()) def loadGloss(self): + #Create a master mySQL connection + self.dbMgr = mythDB() + if not self.dbMgr.connected: + return + #Do an initial lookup for GUI size + width = int(self.dbMgr.get_setting("GuiWidth")) + height = int(self.dbMgr.get_setting("GuiHeight")) + #Set stage size + if width == 0 and height == 0: + self.stage.fullscreen() + self.stage.set_property("fullscreen", True) + else: + self.stage.set_size(width, height) + + #now that the size is set, we can show the stage + self.stage.show() + #Display a loading / splash screen + self.splashScreen = SplashScr(self.stage) + self.splashScreen.display() + #And create the Gloss Manager self.glossMgr = GlossMgr(self.stage) + #loop through the args for arg in self.args: @@ -63,29 +77,26 @@ class MainApp: #Update splash status msg self.splashScreen.set_msg("Creating menus") MainMenu = self.glossMgr.create_menu() - #Update splash status msg self.splashScreen.set_msg("Connecting to MythTV server") - #Create a master mySQL connection - self.dbMgr = mythDB() - if not self.dbMgr.connected: - return - - #Update splash status msg + + #Load all modules for mods in modules: #print "Loading mod..." tempMod = mods.Module(self.glossMgr, self.dbMgr) title = tempMod.title #print title + self.splashScreen.set_msg("Loading "+title) temp_menu_item = MainMenu.addItem(title) temp_menu_item.add_image_from_texture(tempMod.menu_image) temp_menu_item.setAction(tempMod.action()) - + self.splashScreen.remove() self.stage.connect('key-press-event', self.glossMgr.on_key_press_event) MainMenu.display() + MainMenu.selectFirst(True) @@ -100,7 +111,6 @@ class MainApp: def run (self): - self.stage.show() #self.timeline.start() clutter.main() diff --git a/interfaces/ListMenu/ListMenu.pyc b/interfaces/ListMenu/ListMenu.pyc index 2493bfb..e70524d 100644 Binary files a/interfaces/ListMenu/ListMenu.pyc and b/interfaces/ListMenu/ListMenu.pyc differ diff --git a/modules/myth_tv_player/recorder.py b/modules/myth_tv_player/recorder.py new file mode 100644 index 0000000..9b4d4c8 --- /dev/null +++ b/modules/myth_tv_player/recorder.py @@ -0,0 +1,41 @@ + + +class recorder(): + delimiter = "[]:[]" + + def __init__(self, recorderID, socket): + self.recorderID = recorderID + self.socket = socket + + def send_receive(self, strList): + #Setup the cmd string + cmd = "" + for token in strList: + cmd += token + self.delimiter + + #Send cmd + cmd = str(len(cmd)).ljust(8) + cmd + self.socket.send(cmd) + + #Receive reply + ret = "" + tmp = self.socket.recv(8) + count = int(tmp) + ret = self.socket.recv(count) + + #print "read<--" + ret + return ret + + #Begin recorder commands + ##################################################### + + def IsRecording(self): + strList = [] + strList.append( "QUERY_RECORDER %s" % self.recorderID ) + strList.append( "IS_RECORDING" ) + + retval = boolean(self.send_receive(strList) + + def checkChannel(self, chanID): + strList = [] + strList.append( ") \ No newline at end of file diff --git a/myth/MythMySQL.py b/myth/MythMySQL.py index 193ca29..36e5aff 100644 --- a/myth/MythMySQL.py +++ b/myth/MythMySQL.py @@ -49,14 +49,14 @@ class mythDB(): def run_sql(self, sql): if not self.connected: - print "Unable to start video, could not establish connection to SQL server" + print "Unable to perform lookup, could not establish connection to SQL server" return None self.cursor.execute(sql) # get the resultset as a tuple result = self.cursor.fetchall() return result - + #Gets an arbitary setting from the settings table def get_setting(self, setting_name): if not self.connected: diff --git a/myth/MythMySQL.pyc b/myth/MythMySQL.pyc index 0a399c9..5a61a8d 100644 Binary files a/myth/MythMySQL.pyc and b/myth/MythMySQL.pyc differ diff --git a/myth/__init__.pyc b/myth/__init__.pyc index 26db0a2..05c531d 100644 Binary files a/myth/__init__.pyc and b/myth/__init__.pyc differ