diff --git a/data/interface/wmenu.ui b/data/interface/wmenu.ui index 543e3d1..df2ee93 100644 --- a/data/interface/wmenu.ui +++ b/data/interface/wmenu.ui @@ -39,7 +39,6 @@ True center False - False True @@ -75,8 +74,8 @@ True False - 1 Text: + 1 0 @@ -87,8 +86,8 @@ True False - 1 Font: + 1 0 @@ -99,8 +98,8 @@ True False - 1 Text color: + 1 2 @@ -111,8 +110,8 @@ True False - 1 Shadow color: + 1 2 @@ -170,8 +169,8 @@ True False - 1 Vertical position (percent): + 1 0 @@ -196,8 +195,8 @@ True False - 1 Horizontal position (percent): + 1 0 @@ -610,8 +609,8 @@ True False - 1 Font: + 1 False @@ -648,8 +647,8 @@ True False - 1 Unselected titles: + 1 0 @@ -660,8 +659,8 @@ True False - 1 Shadows: + 1 0 @@ -672,8 +671,8 @@ True False - 1 Selected title: + 1 2 @@ -684,8 +683,8 @@ True False - 1 Background color: + 1 2 @@ -832,6 +831,73 @@ 5 + + + True + False + 0 + none + + + True + False + 12 + + + True + False + vertical + + + Provide "Play All" option + True + True + False + 0 + True + True + + + False + True + 0 + + + + + Don't provide "Play All" option + True + True + False + 0 + True + menu_play_all + + + False + True + 1 + + + + + + + + + True + False + <b>Play all option</b> + True + + + + + False + True + 6 + + True @@ -920,7 +986,7 @@ False True - 6 + 7 diff --git a/src/devedeng/dvd_menu.py b/src/devedeng/dvd_menu.py index 4a8c1d1..5e83d2d 100644 --- a/src/devedeng/dvd_menu.py +++ b/src/devedeng/dvd_menu.py @@ -47,6 +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_no_play_all", self.update_preview) self.add_integer_adjustment("sound_length", 30) @@ -373,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 @@ -392,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 diff --git a/src/devedeng/dvdauthor_converter.py b/src/devedeng/dvdauthor_converter.py index 03c4590..366d85a 100644 --- a/src/devedeng/dvdauthor_converter.py +++ b/src/devedeng/dvdauthor_converter.py @@ -29,7 +29,7 @@ class dvdauthor_converter(devedeng.executor.executor): self.config = devedeng.configuration_data.configuration.get_config() - def create_dvd_project (self, path, name, file_movies, menu_entries, start_with_menu): + def create_dvd_project (self, path, name, file_movies, menu_entries, start_with_menu, play_all_opt): movie_path = os.path.join(path,"dvd_tree") try: @@ -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") @@ -94,11 +94,17 @@ class dvdauthor_converter(devedeng.executor.executor): xml_file.write('\t\t\n') xml_file.write('\t\t\tg0=100;\n') + xml_file.write('\t\t\tg1=') #goto variable if (menu_entries != None) and (start_with_menu): - xml_file.write('\t\t\tg1=0;\n') + xml_file.write('0;\n') #show menu else: - xml_file.write('\t\t\tg1=100;\n') - xml_file.write('\t\t\tg2=1024;\n') + xml_file.write('100;\n') #auto play + xml_file.write('\t\t\tg2=1024;\n') #highlight? + xml_file.write('\t\t\tg3=') #play all variable + if play_all_opt and (menu_entries != None) and (start_with_menu): + xml_file.write('1;\n') #auto play all + else: + xml_file.write('0;\n') #do not play all xml_file.write('\t\t\tjump menu 1;\n') xml_file.write('\t\t\n') @@ -173,8 +179,8 @@ class dvdauthor_converter(devedeng.executor.executor): for menu_page in menu_entries: xml_file.write('\t\t\t\n') xml_file.write('\t\t\t\t
\n')
-                    # first we recover the currently selected button
-                    xml_file.write('\t\t\t\t\ts8=g2;\n')
+                    xml_file.write('\t\t\t\t\ts8=g2;\n') # first we recover the currently selected button
+                    xml_file.write('\t\t\t\t\tg3=0;\n') #turnoff play all
 
                     if first_entry: # here we add some code to jump to each menu
                         for menu2 in range(nmenues-1):
@@ -195,8 +201,15 @@ class dvdauthor_converter(devedeng.executor.executor):
                     xml_file.write('">\n')
 
                     for nbutton in menu_page["chapters"]:
-                        xml_file.write('\t\t\t\t\n')
-                        button_counter+=1
+                        #xml_file.write('\t\t\t\t\n')
+                        xml_file.write('\t\t\t\t\n')
+                        if not play_all_opt:
+                            button_counter+=1
 
                     if (menu_page["left"] != None):
                         xml_file.write('\t\t\t\t