mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
remove progress button
This commit is contained in:
parent
d1c470681a
commit
257c5b42c7
@ -90,28 +90,18 @@
|
||||
<property name="message-type">info</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="progressbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="fraction">0.0</property>
|
||||
<property name="show-text">True</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<object class="GtkProgressBar" id="progressbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="fraction">0.0</property>
|
||||
<property name="show-text">True</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="progressbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="label" translatable="yes">Finish Recording</property>
|
||||
<property name="margin-top">15</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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<RefCell<Ffmpeg>> = 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,
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user