mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +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));
|
(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 ************************************************************/
|
/* UI callbacks ************************************************************/
|
||||||
|
|
||||||
void
|
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 */
|
/* doesn't make sense to set properties on more than one item */
|
||||||
update_properties_sensitivity (app);
|
update_properties_sensitivity (app);
|
||||||
|
update_delete_sensitivity (app);
|
||||||
/* delete will work for multiple items */
|
|
||||||
gtk_action_set_sensitive (app->delete, app->n_selected > 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -450,6 +456,7 @@ pipeline_state_changed_cb (App * app)
|
||||||
gtk_action_set_stock_id (app->play, GTK_STOCK_MEDIA_PLAY);
|
gtk_action_set_stock_id (app->play, GTK_STOCK_MEDIA_PLAY);
|
||||||
|
|
||||||
update_properties_sensitivity (app);
|
update_properties_sensitivity (app);
|
||||||
|
update_delete_sensitivity (app);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue