EpisodeWidget: Make cancel button insensitive.
This commit is contained in:
parent
0a7825dfff
commit
ada73a616f
@ -175,8 +175,9 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="cancel_button">
|
<object class="GtkButton" id="cancel_button">
|
||||||
<property name="label" translatable="yes">Cancel</property>
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="no_show_all">True</property>
|
<property name="no_show_all">True</property>
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@ -212,7 +212,7 @@ fn on_download_clicked(
|
|||||||
let pd = dbqueries::get_podcast_from_id(ep.podcast_id()).unwrap();
|
let pd = dbqueries::get_podcast_from_id(ep.podcast_id()).unwrap();
|
||||||
let pd_title = pd.title().to_owned();
|
let pd_title = pd.title().to_owned();
|
||||||
let mut ep = ep.clone();
|
let mut ep = ep.clone();
|
||||||
// cancel_bttn.show();
|
cancel_bttn.show();
|
||||||
progress.show();
|
progress.show();
|
||||||
download_bttn.hide();
|
download_bttn.hide();
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
@ -264,7 +264,7 @@ fn receive() -> glib::Continue {
|
|||||||
if let Some((
|
if let Some((
|
||||||
ref download_bttn,
|
ref download_bttn,
|
||||||
ref play_bttn,
|
ref play_bttn,
|
||||||
ref _cancel_bttn,
|
ref cancel_bttn,
|
||||||
ref progress_bar,
|
ref progress_bar,
|
||||||
ref reciever,
|
ref reciever,
|
||||||
)) = *global.borrow()
|
)) = *global.borrow()
|
||||||
@ -272,7 +272,7 @@ fn receive() -> glib::Continue {
|
|||||||
if reciever.try_recv().is_ok() {
|
if reciever.try_recv().is_ok() {
|
||||||
download_bttn.hide();
|
download_bttn.hide();
|
||||||
play_bttn.show();
|
play_bttn.show();
|
||||||
// cancel_bttn.hide();
|
cancel_bttn.hide();
|
||||||
progress_bar.hide();
|
progress_bar.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user