Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements #27

Merged
merged 2 commits into from
Apr 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions modules/curlew.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ def __init__(self, app, *files_list):
Gtk.StyleContext.add_class(box_convert.get_style_context(), "linked")
self.header.pack_start(box_convert)

self.btn_convert = Gtk.Button(_('Convert'))
self.btn_convert = ButtonWithIcon('media-playback-start')
self.btn_convert.set_tooltip_text(_('Start Conversion'))
self.btn_convert.connect('clicked', self.on_convert_cb)
box_convert.pack_start(self.btn_convert, False, False, 0)

self.btn_stop = ButtonWithIcon('process-stop-symbolic')
self.btn_stop = ButtonWithIcon('media-playback-stop')
self.btn_stop.set_tooltip_text(_('Stop Conversion'))
self.btn_stop.connect('clicked', self.on_btn_stop_clicked)
box_convert.pack_start(self.btn_stop, False, False, 0)
Expand Down Expand Up @@ -1357,6 +1357,22 @@ def on_convert_cb(self, widget):
self.set_focus(self.e_dest)
self.note.set_current_page(6)
return
# Invalid audio codec
acodec = self.c_acodec.get_active_text()
if not check_codec(self.encoder, acodec):
self.info_bar.show_message(_('Audio codec not found.'))
self.toggle_opts.set_active(True)
self.set_focus(self.e_dest)
self.note.set_current_page(0)
return
# Invalid video codec
vcodec = self.c_vcodec.get_active_text()
if not check_codec(self.encoder, vcodec):
self.info_bar.show_message(_('Video codec not found.'))
self.toggle_opts.set_active(True)
self.set_focus(self.e_dest)
self.note.set_current_page(1)
return

# Show files list
self.toggle_opts.set_active(False)
Expand Down