From 5a8ce641ee59ccda65df7e5a7d1970e10121e081 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Fri, 23 Jul 2010 18:36:54 +0200 Subject: [PATCH] add title source when action activates --- tests/examples/ges-ui.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c index a9e49eab0b..b2eb752999 100644 --- a/tests/examples/ges-ui.c +++ b/tests/examples/ges-ui.c @@ -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) {