diff --git a/interfaces/main.ui b/interfaces/main.ui index d3f5d23..8a06101 100644 --- a/interfaces/main.ui +++ b/interfaces/main.ui @@ -90,28 +90,18 @@ info - vertical + vertical - - True - 0.0 - True - 10 - 10 + + True + 0.0 + True + 10 + 10 + + - - - True - False - True - True - Finish Recording - 15 - - - - True diff --git a/src/ffmpeg_interface.rs b/src/ffmpeg_interface.rs index e6aaf60..3325120 100644 --- a/src/ffmpeg_interface.rs +++ b/src/ffmpeg_interface.rs @@ -2,7 +2,7 @@ extern crate subprocess; use chrono::prelude::*; use gettextrs::gettext; use gtk::prelude::*; -use gtk::{Button, CheckButton, ComboBoxText, Entry, FileChooserNative, ProgressBar, SpinButton, Window}; +use gtk::{CheckButton, ComboBoxText, Entry, FileChooserNative, ProgressBar, SpinButton, Window}; use gtk::{ButtonsType, DialogFlags, MessageDialog, MessageType, ResponseType}; use std::path::PathBuf; use std::process::Command; @@ -15,19 +15,16 @@ use subprocess::Exec; pub struct ProgressWidget { pub progress_dialog: MessageDialog, pub progressbar: ProgressBar, - pub progress_button: Button, } impl ProgressWidget { pub fn new( progress_dialog: MessageDialog, progressbar: ProgressBar, - progress_button: Button, ) -> ProgressWidget { ProgressWidget { progress_dialog, progressbar, - progress_button, } } @@ -43,7 +40,6 @@ impl ProgressWidget { } pub fn hide(&self) { - self.progress_button.set_sensitive(true); self.progress_dialog.hide(); } } diff --git a/src/main.rs b/src/main.rs index 950ca36..2147b9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -82,7 +82,6 @@ pub fn build_ui(application: &Application) { let mouse_switch: CheckButton = builder.object("mouseswitch").unwrap(); let overwrite_switch: CheckButton = builder.object("overwriteswitch").unwrap(); let play_button: Button = builder.object("playbutton").unwrap(); - let progress_button: Button = builder.object("progressbutton").unwrap(); let progress_dialog: MessageDialog = builder.object("progress_dialog").unwrap(); let progressbar: ProgressBar = builder.object("progressbar").unwrap(); let record_button: Button = builder.object("recordbutton").unwrap(); @@ -367,12 +366,6 @@ pub fn build_ui(application: &Application) { _area_capture.borrow_mut().get_area(); }); - let _progress_button = progress_button.clone(); - let _progress_dialog = progress_dialog.clone(); - _progress_button.connect_clicked(move |_| { - _progress_dialog.hide(); - }); - // Init record struct let ffmpeg_record_interface: Rc> = Rc::new(RefCell::new(Ffmpeg { filename: (folder_chooser_native, filename_entry, format_chooser_combobox), @@ -388,7 +381,7 @@ pub fn build_ui(application: &Application) { audio_process_id: None, saved_filename: None, unbound: None, - progress_widget: ProgressWidget::new(progress_dialog, progressbar, progress_button), + progress_widget: ProgressWidget::new(progress_dialog, progressbar), window: main_window.clone(), overwrite: overwrite_switch, }));