Update UI when play_all option is changed.Fix return value check.Add 'Play All' to dvd menu preview.

This commit is contained in:
glenntanner3 2015-04-29 17:04:19 -04:00
parent a9b8d4bb2b
commit 516ae862b4
3 changed files with 18 additions and 4 deletions

View file

@ -47,7 +47,7 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
self.add_group("position_horizontal", ["left", "center", "right"], "center", self.update_preview)
self.add_group("at_startup", ["menu_show_at_startup", "play_first_title_at_startup"], "menu_show_at_startup")
self.add_group("play_all", ["menu_play_all", "menu_no_play_all"], "menu_play_all")
self.add_group("play_all", ["menu_play_all", "menu_no_play_all"], "menu_play_all", self.update_preview)
self.add_integer_adjustment("sound_length", 30)
@ -374,6 +374,8 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
entry_height = self.cached_menu_size + self.entry_vertical_margin * 2.0 + self.entry_separation
entries_per_page = int((self.y - top_margin_p - bottom_margin_p) / entry_height)
if (self.play_all == "menu_play_all"):
entries_per_page -= 1
n_entries = len(self.title_list)
if (n_entries > entries_per_page):
paint_arrows = True
@ -393,6 +395,18 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
xr = 720.0 - right_margin_p
y = top_margin_p + entry_height/2.0
height = (self.cached_menu_size + self.entry_vertical_margin) / 2.0
if (self.play_all == "menu_play_all"):
coordinates.append([xl, y-height, xr, y+height, "play_all"])
if paint_background:
self.paint_base(xl, xr, y, 0)
self.write_text("Play All", "menu_entry", xl, xr, y, self.position_horizontal)
if paint_selected:
self.write_text("Play All", "menu_entry_selected", xl, xr, y, self.position_horizontal)
if paint_activated:
self.write_text("Play All", "menu_entry_activated", xl, xr, y, self.position_horizontal)
y += entry_height
for entry in self.title_list[page_number*entries_per_page:(page_number+1)*entries_per_page]:
coordinates.append([xl, y-height, xr, y+height, "entry"])
text = entry[0].title_name

View file

@ -37,7 +37,7 @@ class dvdauthor_converter(devedeng.executor.executor):
except:
pass
xml_file = self.create_dvdauthor_xml(path, file_movies, menu_entries, start_with_menu)
xml_file = self.create_dvdauthor_xml(path, file_movies, menu_entries, start_with_menu, play_all_opt)
self.command_var=[]
self.command_var.append("dvdauthor")
@ -59,7 +59,7 @@ class dvdauthor_converter(devedeng.executor.executor):
return
def create_dvdauthor_xml(self,movie_folder, file_movies, menu_entries, start_with_menu):
def create_dvdauthor_xml(self,movie_folder, file_movies, menu_entries, start_with_menu, play_all_opt):
xmlpath = os.path.join(movie_folder,"xml_data")
xml_file_path = os.path.join(xmlpath,"dvdauthor.xml")

View file

@ -525,7 +525,7 @@ class devede_project:
start_with_menu = True
else:
start_with_menu = False
if (self.menu.play_all == "menu_show_at_startup"):
if (self.menu.play_all == "menu_play_all"):
play_all_opt = True
else:
play_all_opt = False