def menu_ldmp_start_media_player(self, ldmp): # 字幕菜单开启. self.menus.screen_right_root_menu.set_menu_item_sensitive_by_index(11, True) # self.menus.screen_right_root_menu.set_menu_item_sensitive_by_index(15, True) ############ 保存最近播放文件. text = '"%s"' % ldmp.player.uri time = length_to_time(ldmp.player.length) if not self.this.ini.get("RecentPlayed", text): self.this.ini.set("RecentPlayed", text, time) self.this.ini.save() # 添加到最近播放列表. self.menus.recent_played_menu.clear_menus() self.init_recent_play_list() # dvd 设置. ########### if ldmp.player.uri.startswith("dvd"): self.menus.screen_right_root_menu.set_menu_item_sensitive_by_index(12, True)
def draw_background(self, widget, event): # Init. cr = widget.window.cairo_create() rect = widget.allocation x, y, w, h = rect.x, rect.y, rect.width, rect.height # Draw preview time. font_height_padding = 15 show_time_text = length_to_time(self.pos) time_hour, time_min, time_sec = 1, 3, 30 #self.mp.time(self.pos) draw_text(cr, #"%s:%s:%s" % (self.time_to_string(time_hour), self.time_to_string(time_min), self.time_to_string(time_sec)), show_time_text, x, h - font_height_padding, w, DEFAULT_FONT_SIZE, text_color = "#ffffff", alignment=pango.ALIGN_CENTER ) return True
def draw_background(self, widget, event): # Init. cr = widget.window.cairo_create() rect = widget.allocation x, y, w, h = rect.x, rect.y, rect.width, rect.height # Draw preview time. font_height_padding = 15 show_time_text = length_to_time(self.pos) time_hour, time_min, time_sec = 1, 3, 30 #self.mp.time(self.pos) draw_text( cr, #"%s:%s:%s" % (self.time_to_string(time_hour), self.time_to_string(time_min), self.time_to_string(time_sec)), show_time_text, x, h - font_height_padding, w, DEFAULT_FONT_SIZE, text_color="#ffffff", alignment=pango.ALIGN_CENTER) return True