add title source when action activates

This commit is contained in:
Brandon Lewis 2010-07-23 18:36:54 +02:00 committed by Edward Hervey
parent e34baad63d
commit 5a8ce641ee

View file

@ -48,6 +48,8 @@ void app_dispose (App * app);
void app_add_file (App * app, gchar * filename);
void app_add_title (App * app);
GList *app_get_selected_objects (App * app);
void app_delete_objects (App * app, GList * objects);
@ -64,6 +66,8 @@ void play_activate_cb (GtkAction * item, App * app);
void add_file_activate_cb (GtkAction * item, App * app);
void add_text_activate_cb (GtkAction * item, App * app);
void app_selection_changed_cb (GtkTreeSelection * selection, App * app);
void app_toggle_playback (App * app);
@ -150,6 +154,12 @@ add_file_activate_cb (GtkAction * item, App * app)
gtk_widget_destroy ((GtkWidget *) dlg);
}
void
add_text_activate_cb (GtkAction * item, App * app)
{
app_add_title (app);
}
void
play_activate_cb (GtkAction * item, App * app)
{
@ -294,6 +304,20 @@ app_add_file (App * app, gchar * uri)
ges_timeline_layer_add_object (app->layer, obj);
}
void
app_add_title (App * app)
{
GESTimelineObject *obj;
GST_DEBUG ("adding title");
obj = GES_TIMELINE_OBJECT (ges_timeline_title_source_new ());
g_object_set (G_OBJECT (obj), "duration", GST_SECOND, NULL);
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
obj, -1);
}
App *
app_new (void)
{