def _setup_widgets(self):
        this_modules_file_path = os.path.dirname(os.path.abspath(__file__))
        rows_ui_file_path = os.path.join(this_modules_file_path,
                                         '../render_watch_data/rows_ui.glade')

        gtk_builder = Gtk.Builder()
        gtk_builder.add_from_file(rows_ui_file_path)

        self.subtitle_stream_row_box = gtk_builder.get_object(
            'subtitle_stream_row_box')
        self.subtitle_stream_combobox = gtk_builder.get_object(
            'subtitle_stream_combobox')
        self._build_stream_combobox()
        self.subtitle_stream_method_combobox = gtk_builder.get_object(
            'subtitle_stream_method_combobox')
        self.remove_subtitle_stream_button = gtk_builder.get_object(
            'remove_subtitle_stream_button')

        self.add(self.subtitle_stream_row_box)

        self.subtitle_stream_combobox.connect(
            'changed', self.changed_subtitle_stream_signal.
            on_subtitle_stream_combobox_changed)
        self.subtitle_stream_method_combobox.connect(
            'changed', self.change_stream_method_signal.
            on_subtitle_stream_method_combobox_changed)
        self.remove_subtitle_stream_button.connect(
            'clicked', self.remove_subtitle_stream_signal.
            on_remove_subtitle_stream_button_clicked)
    def _setup_widgets(self, application_preferences):
        this_modules_file_path = os.path.dirname(os.path.abspath(__file__))
        rows_ui_file_path = os.path.join(this_modules_file_path,
                                         '../render_watch_data/rows_ui.glade')

        gtk_builder = Gtk.Builder()
        gtk_builder.add_from_file(rows_ui_file_path)

        self.per_codec_listbox_row_box = gtk_builder.get_object(
            'per_codec_listbox_row_box')
        self.per_codec_label = gtk_builder.get_object('per_codec_label')
        self.per_codec_label.set_text('vp9')
        self.per_codec_subtext_label = gtk_builder.get_object(
            'per_codec_subtext_label')
        self.per_codec_subtext_label.set_text(
            'Number of tasks to run for the vp9 codec')
        self.per_codec_combobox = gtk_builder.get_object('per_codec_combobox')
        UIHelper.setup_combobox(self.per_codec_combobox,
                                ApplicationPreferences.PER_CODEC_TASKS_VALUES)
        self.per_codec_combobox.set_active(
            ApplicationPreferences.PER_CODEC_TASKS_VALUES.index(
                str(application_preferences.per_codec_parallel_tasks['vp9'])))

        self.add(self.per_codec_listbox_row_box)

        self.per_codec_combobox.connect(
            'changed', self.per_codec_parallel_tasks_signal.
            on_per_codec_vp9_combobox_changed)
Beispiel #3
0
    def _setup_widgets(self, gtk_builder):
        this_modules_file_path = os.path.dirname(os.path.abspath(__file__))
        rows_ui_file_path = os.path.join(this_modules_file_path, '../render_watch_data/rows_ui.glade')

        self.options_rows_gtk_builder = Gtk.Builder()
        self.options_rows_gtk_builder.add_from_file(rows_ui_file_path)

        self.subtitle_settings_stack = gtk_builder.get_object('subtitle_settings_stack')
        self.subtitle_settings_box = gtk_builder.get_object('subtitle_settings_box')
        self.subtitle_settings_not_available_label = gtk_builder.get_object('subtitle_settings_not_available_label')
        self.subtitle_streams_list = gtk_builder.get_object('subtitle_streams_list')
Beispiel #4
0
    def _setup_widgets(self):
        this_modules_file_path = os.path.dirname(os.path.abspath(__file__))
        chunk_ui_file_path = os.path.join(this_modules_file_path, '../render_watch_data/chunk_ui.glade')

        gtk_builder = Gtk.Builder()
        gtk_builder.add_from_file(chunk_ui_file_path)

        self.chunk_listbox_row_box = gtk_builder.get_object('chunk_listbox_row_box')
        self.chunk_identifier_label = gtk_builder.get_object('chunk_identifier_label')
        self.chunk_time_span_label = gtk_builder.get_object('chunk_time_span_label')
        self.chunk_progressbar = gtk_builder.get_object('chunk_progressbar')

        self._setup_chunk_row()
        self.add(self.chunk_listbox_row_box)
Beispiel #5
0
    def _setup_widgets(self, gtk_builder, gtk_settings, main_window_handlers,
                       application_preferences):
        this_modules_file_path = os.path.dirname(os.path.abspath(__file__))
        rows_ui_file_path = os.path.join(this_modules_file_path,
                                         '../render_watch_data/rows_ui.glade')

        options_rows_gtk_builder = Gtk.Builder()
        options_rows_gtk_builder.add_from_file(rows_ui_file_path)

        self.temporary_files_list = gtk_builder.get_object(
            'temporary_files_list')
        self.temporary_files_restart_stack = options_rows_gtk_builder.get_object(
            'temporary_files_restart_stack')
        self.temporary_files_restart_blank_label = options_rows_gtk_builder.get_object(
            'temporary_files_restart_blank_label')
        self.temporary_files_restart_icon = options_rows_gtk_builder.get_object(
            'temporary_files_restart_icon')
        self.misc_preferences_list = gtk_builder.get_object(
            'misc_preferences_list')
        self.parallel_tasks_stack = gtk_builder.get_object(
            'parallel_tasks_stack')
        self.concurrent_tasks_frame = gtk_builder.get_object(
            'concurrent_tasks_frame')
        self.concurrent_tasks_list = gtk_builder.get_object(
            'concurrent_tasks_list')
        self.concurrent_tasks_combobox = options_rows_gtk_builder.get_object(
            'concurrent_tasks_combobox')
        self.concurrent_tasks_restart_stack = options_rows_gtk_builder.get_object(
            'concurrent_tasks_restart_stack')
        self.concurrent_tasks_restart_blank_label = options_rows_gtk_builder.get_object(
            'concurrent_tasks_restart_blank_label')
        self.concurrent_tasks_restart_icon = options_rows_gtk_builder.get_object(
            'concurrent_tasks_restart_icon')
        self.concurrent_tasks_message_stack = options_rows_gtk_builder.get_object(
            'concurrent_tasks_message_stack')
        self.concurrent_tasks_message_8 = options_rows_gtk_builder.get_object(
            'concurrent_tasks_message_8')
        self.concurrent_tasks_message_12 = options_rows_gtk_builder.get_object(
            'concurrent_tasks_message_12')
        self.concurrent_tasks_message_24 = options_rows_gtk_builder.get_object(
            'concurrent_tasks_message_24')
        self.concurrent_tasks_message_32 = options_rows_gtk_builder.get_object(
            'concurrent_tasks_message_32')
        self.concurrent_tasks_message_max = options_rows_gtk_builder.get_object(
            'concurrent_tasks_message_max')
        self.per_codec_warning_stack = gtk_builder.get_object(
            'per_codec_warning_stack')
        self.per_codec_restart_blank_label = gtk_builder.get_object(
            'per_codec_restart_blank_label')
        self.per_codec_restart_icon = gtk_builder.get_object(
            'per_codec_restart_icon')
        self.per_codec_switch = gtk_builder.get_object('per_codec_switch')
        self.per_codec_list = gtk_builder.get_object('per_codec_list')
        self.per_codec_frame = gtk_builder.get_object('per_codec_frame')
        self.parallel_nvenc_tasks_list = gtk_builder.get_object(
            'parallel_nvenc_tasks_list')
        self.concurrent_nvenc_tasks_warning_stack = options_rows_gtk_builder.get_object(
            'concurrent_nvenc_tasks_warning_stack')
        self.concurrent_nvenc_tasks_warning_blank_label = options_rows_gtk_builder.get_object(
            'concurrent_nvenc_tasks_warning_blank_label')
        self.concurrent_nvenc_tasks_warning_icon = options_rows_gtk_builder.get_object(
            'concurrent_nvenc_tasks_warning_icon')
        self.encoder_outputs_list = gtk_builder.get_object(
            'encoder_outputs_list')
        self.queue_list = gtk_builder.get_object('queue_list')
        self.watch_folder_outputs_list = gtk_builder.get_object(
            'watch_folder_outputs_list')

        self.temporary_files_list.set_header_func(
            self._options_list_update_header_func, None)
        self.misc_preferences_list.set_header_func(
            self._options_list_update_header_func, None)
        self.concurrent_tasks_list.set_header_func(
            self._options_list_update_header_func, None)
        self.per_codec_list.set_header_func(
            self._options_list_update_header_func, None)
        self.parallel_nvenc_tasks_list.set_header_func(
            self._options_list_update_header_func, None)
        self.encoder_outputs_list.set_header_func(
            self._options_list_update_header_func, None)
        self.queue_list.set_header_func(self._options_list_update_header_func,
                                        None)
        self.watch_folder_outputs_list.set_header_func(
            self._options_list_update_header_func, None)

        self._add_general_page_options_rows(options_rows_gtk_builder,
                                            gtk_settings, main_window_handlers,
                                            application_preferences)
        self._add_encoder_page_options_rows(options_rows_gtk_builder,
                                            application_preferences)
        self._add_watch_folder_page_options_rows(options_rows_gtk_builder,
                                                 application_preferences)
    def _setup_gtk_builder(self):
        working_directory = os.path.dirname(os.path.abspath(__file__))
        glade_file_path = os.path.join(working_directory, '../render_watch_data/rw_ui.glade')

        self.gtk_builder = Gtk.Builder()
        self.gtk_builder.add_from_file(glade_file_path)
Beispiel #7
0
    def _setup_widgets(self):
        this_modules_file_path = os.path.dirname(os.path.abspath(__file__))
        rows_ui_file_path = os.path.join(this_modules_file_path,
                                         '../render_watch_data/rows_ui.glade')

        self.gtk_builder = Gtk.Builder()
        self.gtk_builder.add_from_file(rows_ui_file_path)

        self.inputs_listbox_row_box = self.gtk_builder.get_object(
            'inputs_listbox_row_box')
        self.inputs_listbox_row_preview_icon = self.gtk_builder.get_object(
            'inputs_listbox_row_preview_icon')
        self.inputs_listbox_row_start_button = self.gtk_builder.get_object(
            'inputs_listbox_row_start_button')
        self.inputs_listbox_row_task_info_button = self.gtk_builder.get_object(
            'inputs_listbox_row_task_info_button')
        self.inputs_listbox_row_file_name_label = self.gtk_builder.get_object(
            'inputs_listbox_row_file_name_label')
        self.inputs_listbox_row_remove_button = self.gtk_builder.get_object(
            'inputs_listbox_row_remove_button')
        self.inputs_listbox_row_video_codec_value_label = self.gtk_builder.get_object(
            'inputs_listbox_row_video_codec_value_label')
        self.inputs_listbox_row_audio_codec_value_label = self.gtk_builder.get_object(
            'inputs_listbox_row_audio_codec_value_label')
        self.inputs_listbox_row_resolution_value_label = self.gtk_builder.get_object(
            'inputs_listbox_row_resolution_value_label')
        self.inputs_listbox_row_duration_value_label = self.gtk_builder.get_object(
            'inputs_listbox_row_duration_value_label')
        self.streams_stack = self.gtk_builder.get_object('streams_stack')
        self.folder_type_buttonbox = self.gtk_builder.get_object(
            'folder_type_buttonbox')
        self.standard_folder_task_radiobutton = self.gtk_builder.get_object(
            'standard_folder_task_radiobutton')
        self.recursive_folder_task_radiobutton = self.gtk_builder.get_object(
            'recursive_folder_task_radiobutton')
        self.watch_folder_task_radiobutton = self.gtk_builder.get_object(
            'watch_folder_task_radiobutton')
        self.video_stream_combobox = self.gtk_builder.get_object(
            'video_stream_combobox')
        self.audio_stream_combobox = self.gtk_builder.get_object(
            'audio_stream_combobox')
        self.ffmpeg_parameters_value_label = self.gtk_builder.get_object(
            'ffmpeg_parameters_value_label')
        self.input_info_video_codec_label = self.gtk_builder.get_object(
            'input_info_video_codec_label')
        self.input_info_audio_codec_label = self.gtk_builder.get_object(
            'input_info_audio_codec_label')
        self.input_info_container_label = self.gtk_builder.get_object(
            'input_info_container_label')
        self.input_info_resolution_label = self.gtk_builder.get_object(
            'input_info_resolution_label')
        self.input_info_duration_label = self.gtk_builder.get_object(
            'input_info_duration_label')
        self.input_info_frame_rate_label = self.gtk_builder.get_object(
            'input_info_frame_rate_label')
        self.input_info_channels_label = self.gtk_builder.get_object(
            'input_info_channels_label')
        self.input_info_file_size_label = self.gtk_builder.get_object(
            'input_info_file_size_label')
        self.output_info_video_codec_label = self.gtk_builder.get_object(
            'output_info_video_codec_label')
        self.output_info_audio_codec_label = self.gtk_builder.get_object(
            'output_info_audio_codec_label')
        self.output_info_container_label = self.gtk_builder.get_object(
            'output_info_container_label')
        self.output_info_resolution_label = self.gtk_builder.get_object(
            'output_info_resolution_label')
        self.output_info_duration_label = self.gtk_builder.get_object(
            'output_info_duration_label')
        self.output_info_frame_rate_label = self.gtk_builder.get_object(
            'output_info_frame_rate_label')
        self.output_info_channels_label = self.gtk_builder.get_object(
            'output_info_channels_label')

        self._setup_row_state()
        self._setup_streams()
        self.setup_labels()
        self.add(self.inputs_listbox_row_box)

        self.inputs_listbox_row_remove_button.connect(
            'clicked',
            self.remove_task_signal.on_remove_input_task_button_clicked)
        self.inputs_listbox_row_start_button.connect(
            'clicked', self.start_signal.on_start_button_clicked)
        self.video_stream_combobox.connect(
            'changed',
            self.video_stream_signal.on_video_stream_combobox_changed)
        self.audio_stream_combobox.connect(
            'changed',
            self.audio_stream_signal.on_audio_stream_combobox_changed)
        self.recursive_folder_task_radiobutton.connect(
            'toggled', self.recursive_folder_task_signal.
            on_recursive_folder_task_radiobutton_toggled)
        self.watch_folder_task_radiobutton.connect(
            'toggled', self.watch_folder_task_signal.
            on_watch_folder_task_radiobutton_toggled)