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

@ -812,6 +812,21 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="play_all_c">
<property name="label" translatable="yes">Provide "Play All" option</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
@ -831,73 +846,6 @@
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkRadioButton" id="menu_play_all">
<property name="label" translatable="yes">Provide "Play All" option</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="menu_no_play_all">
<property name="label" translatable="yes">Don't provide "Play All" option</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">menu_play_all</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Play all option&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame_preview_controls">
<property name="visible">True</property>
@ -986,7 +934,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="position">6</property>
</packing>
</child>
</object>

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)