Reduced the height of the DVD menu window

This commit is contained in:
Sergio Costas 2016-02-01 23:11:26 +01:00
parent 735a208796
commit 5a6853a764
4 changed files with 21 additions and 77 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_no_play_all", self.update_preview)
self.add_toggle("play_all_c", False, self.update_preview)
self.add_integer_adjustment("sound_length", 30)
@ -377,7 +377,7 @@ 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"):
if (self.play_all_c):
entries_per_page -= 1
n_entries = len(self.title_list)
if (n_entries > entries_per_page):
@ -399,7 +399,7 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
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"):
if (self.play_all_c):
coordinates.append([xl, y-height, xr, y+height, "play_all"])
if paint_background:
self.paint_base(xl, xr, y, 0)

View file

@ -62,7 +62,7 @@ class interface_manager(GObject.GObject):
def add_dualtoggle(self,toggle_name,toggle2,default_value,callback = None):
""" Adds an internal variable with the name toggle_name, linked to widget
elements with names toggle_nane and toggle2 (must be or inherint from Gtk.ToogleButton).
elements with names toggle_name and toggle2 (must be or inherint from Gtk.ToogleButton).
The default value can be True of False, with True being toggle_name active, and False
being toggle2 active """

View file

@ -535,12 +535,8 @@ class devede_project:
start_with_menu = True
else:
start_with_menu = False
if (self.menu.play_all == "menu_play_all"):
play_all_opt = True
else:
play_all_opt = False
dvdauthor = devedeng.dvdauthor_converter.dvdauthor_converter()
dvdauthor.create_dvd_project(data.path, data.name, file_movies, menu_entries, start_with_menu, play_all_opt)
dvdauthor.create_dvd_project(data.path, data.name, file_movies, menu_entries, start_with_menu, self.menu.play_all_c)
# dvdauthor must wait until all the files have been converted
for element in final_dependencies:
dvdauthor.add_dependency(element)