mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
disable delete during playback
This commit is contained in:
parent
fc93c3c870
commit
fccf1d4520
1 changed files with 10 additions and 3 deletions
|
@ -90,6 +90,14 @@ update_properties_sensitivity (App * app)
|
|||
(app->n_selected == 1) && (app->state != GST_STATE_PLAYING));
|
||||
}
|
||||
|
||||
static void
|
||||
update_delete_sensitivity (App * app)
|
||||
{
|
||||
/* delete will work for multiple items */
|
||||
gtk_action_set_sensitive (app->delete,
|
||||
(app->n_selected > 0) && (app->state != GST_STATE_PLAYING));
|
||||
}
|
||||
|
||||
/* UI callbacks ************************************************************/
|
||||
|
||||
void
|
||||
|
@ -136,9 +144,7 @@ app_selection_changed_cb (GtkTreeSelection * selection, App * app)
|
|||
|
||||
/* doesn't make sense to set properties on more than one item */
|
||||
update_properties_sensitivity (app);
|
||||
|
||||
/* delete will work for multiple items */
|
||||
gtk_action_set_sensitive (app->delete, app->n_selected > 0);
|
||||
update_delete_sensitivity (app);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -450,6 +456,7 @@ pipeline_state_changed_cb (App * app)
|
|||
gtk_action_set_stock_id (app->play, GTK_STOCK_MEDIA_PLAY);
|
||||
|
||||
update_properties_sensitivity (app);
|
||||
update_delete_sensitivity (app);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue