mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-02 10:13:51 +00:00
don't allow changes to timeline if we're paused
This commit is contained in:
parent
081dc24869
commit
8975053255
1 changed files with 13 additions and 6 deletions
|
@ -127,7 +127,8 @@ update_delete_sensitivity (App * app)
|
||||||
{
|
{
|
||||||
/* delete will work for multiple items */
|
/* delete will work for multiple items */
|
||||||
gtk_action_set_sensitive (app->delete,
|
gtk_action_set_sensitive (app->delete,
|
||||||
(app->n_selected > 0) && (app->state != GST_STATE_PLAYING));
|
(app->n_selected > 0) && (app->state != GST_STATE_PLAYING)
|
||||||
|
&& (app->state != GST_STATE_PAUSED));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -135,7 +136,8 @@ update_add_transition_sensitivity (App * app)
|
||||||
{
|
{
|
||||||
gtk_action_set_sensitive (app->add_transition,
|
gtk_action_set_sensitive (app->add_transition,
|
||||||
(app->can_add_transition) &&
|
(app->can_add_transition) &&
|
||||||
(app->state != GST_STATE_PLAYING) && (app->n_objects));
|
(app->state != GST_STATE_PLAYING) &&
|
||||||
|
(app->state != GST_STATE_PAUSED) && (app->n_objects));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Backend callbacks ********************************************************/
|
/* Backend callbacks ********************************************************/
|
||||||
|
@ -299,6 +301,8 @@ layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
||||||
static void
|
static void
|
||||||
pipeline_state_changed_cb (App * app)
|
pipeline_state_changed_cb (App * app)
|
||||||
{
|
{
|
||||||
|
gboolean playing_or_paused;
|
||||||
|
|
||||||
if (app->state == GST_STATE_PLAYING)
|
if (app->state == GST_STATE_PLAYING)
|
||||||
gtk_action_set_stock_id (app->play, GTK_STOCK_MEDIA_PAUSE);
|
gtk_action_set_stock_id (app->play, GTK_STOCK_MEDIA_PAUSE);
|
||||||
else
|
else
|
||||||
|
@ -307,10 +311,13 @@ pipeline_state_changed_cb (App * app)
|
||||||
update_delete_sensitivity (app);
|
update_delete_sensitivity (app);
|
||||||
update_add_transition_sensitivity (app);
|
update_add_transition_sensitivity (app);
|
||||||
|
|
||||||
gtk_action_set_sensitive (app->add_file, app->state != GST_STATE_PLAYING);
|
playing_or_paused = (app->state == GST_STATE_PLAYING) ||
|
||||||
gtk_action_set_sensitive (app->add_title, app->state != GST_STATE_PLAYING);
|
(app->state == GST_STATE_PAUSED);
|
||||||
gtk_action_set_sensitive (app->add_test, app->state != GST_STATE_PLAYING);
|
|
||||||
gtk_widget_set_sensitive (app->properties, app->state != GST_STATE_PLAYING);
|
gtk_action_set_sensitive (app->add_file, !playing_or_paused);
|
||||||
|
gtk_action_set_sensitive (app->add_title, !playing_or_paused);
|
||||||
|
gtk_action_set_sensitive (app->add_test, !playing_or_paused);
|
||||||
|
gtk_widget_set_sensitive (app->properties, !playing_or_paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue