This email list is read-only. Emails sent to this list will be discarded
----------------------------------
colortext/colortext.c | 33 ++++++++++++++++++++++++---------
squares/squares.c | 10 +++-------
2 files changed, 27 insertions(+), 16 deletions(-)
New commits:
commit 3bd9c7a1a5efe7ab3241549d5b5bdc6f1690b6f1
Author: Felicia Decker <[EMAIL PROTECTED]>
Date: Thu Aug 14 10:01:56 2008 -0700
Removed 3 lines of code in squares.c to fix runtime warnings.
Updated colortext to loop its animation
Diff in this email is a maximum of 400 lines.
diff --git a/colortext/colortext.c b/colortext/colortext.c
index 9da476a..f116a5c 100644
--- a/colortext/colortext.c
+++ b/colortext/colortext.c
@@ -143,10 +143,12 @@ void display_word()
clutter_timeline_start(rand_timeline);
++color_word;
- if (curr_char == '$')
- {
- clutter_timeline_stop(word_timeline);
- }
+// if (curr_char == '$')
+// {
+// clutter_timeline_stop(word_timeline);
+
+
+// }
return;
}//end display_word
@@ -328,7 +330,11 @@ void end_effect()
clutter_label_set_text((ClutterLabel*)actors[17], "o");
clutter_label_set_text((ClutterLabel*)actors[18], "w");
clutter_label_set_text((ClutterLabel*)actors[19], "}");
-
+
+ clutter_timeline_set_delay(rand_timeline, 2000);
+ clutter_timeline_set_delay(word_timeline, 2050);
+ clutter_timeline_start(rand_timeline);
+ clutter_timeline_start(word_timeline);
}//end end_effect
@@ -342,7 +348,14 @@ void stop_rand_timeline()
if (word_countdown == NUM_COLORS)
{
clutter_timeline_stop(rand_timeline);
+ clutter_timeline_stop(word_timeline);
end_effect();
+
+ fseek(fp, 0, SEEK_SET);
+
+ color_word = 0;
+ curr_char = ' ';
+ word_countdown = 0;
}
return;
@@ -350,8 +363,7 @@ void stop_rand_timeline()
-/*
-
+/**
*/
int main(int argc, char *argv[])
{
@@ -381,16 +393,18 @@ int main(int argc, char *argv[])
rand_timeline = clutter_timeline_new_for_duration(8000);
g_signal_connect(rand_timeline, "completed", G_CALLBACK(stop_rand_timeline),
NULL);
g_signal_connect(rand_timeline, "new-frame",
G_CALLBACK(randomize_the_letters), NULL);
+ clutter_timeline_set_loop(rand_timeline, TRUE);
clutter_score_append(score, NULL, rand_timeline);
/* Create word timeline to display each word in FILENAME */
word_timeline = clutter_timeline_new(20, 15);
+ int duration = clutter_timeline_get_duration(word_timeline);
clutter_timeline_add_marker_at_frame(word_timeline, "display_a_word", 15);
g_signal_connect(word_timeline, "completed", G_CALLBACK(stop_word_timeline),
NULL);
g_signal_connect(word_timeline, "marker-reached", G_CALLBACK(display_word),
NULL);
clutter_timeline_set_loop(word_timeline, TRUE);
clutter_score_append(score, NULL, word_timeline);
-
+ clutter_score_set_loop(score, TRUE);
clutter_score_start(score);
clutter_main();
@@ -398,7 +412,8 @@ int main(int argc, char *argv[])
g_object_unref(rand_timeline);
g_object_unref(word_timeline);
g_object_unref(score);
- fclose(fp);
+ if (fp != NULL)
+ fclose(fp);
return 0;
}//end main
diff --git a/squares/squares.c b/squares/squares.c
index fd8c9b9..779a9a8 100644
--- a/squares/squares.c
+++ b/squares/squares.c
@@ -189,10 +189,6 @@ gboolean on_button_press(ClutterActor *actor, ClutterEvent
*event,
*/
void hide_button(ClutterActor *actor, gpointer data)
{
- clutter_timeline_set_delay(button_release_timeline, 2000);
- clutter_timeline_pause(button_release_timeline);
- clutter_timeline_start(button_release_timeline);
-
clutter_actor_hide(actor);
clutter_actor_hide(start_label);
clutter_actor_hide(start_shadow);
@@ -215,7 +211,7 @@ gboolean on_button_release(ClutterActor *actor,
ClutterEvent *event,
growth_timeline = clutter_timeline_new(175, 20);
g_signal_connect(growth_timeline, "new-frame",
G_CALLBACK(start_square_growing), NULL);
- clutter_timeline_start(growth_timeline);
+ clutter_timeline_start((ClutterTimeline*)growth_timeline);
button_release_timeline = clutter_effect_move(button_release_movement,
actor, 205, 450,
@@ -223,7 +219,7 @@ gboolean on_button_release(ClutterActor *actor,
ClutterEvent *event,
NULL);
button_release_timeline = clutter_effect_move(button_release_movement,
start_label, 232, 460, NULL, NULL);
- clutter_timeline_start(button_reshow_timeline);
+ clutter_timeline_start((ClutterTimeline*)button_reshow_timeline);
return TRUE;
}
@@ -332,7 +328,7 @@ int main(int argc, char *argv[])
g_signal_connect(button_reshow_timeline, "completed",
G_CALLBACK(show_button),
NULL);
clutter_timeline_set_loop(rotation_timeline, TRUE);
- clutter_timeline_start(rotation_timeline);
+ clutter_timeline_start((ClutterTimeline*)rotation_timeline);
/* start shadow */
start_shadow = clutter_rectangle_new_with_color(&color_black);
_______________________________________________
Commits mailing list
[email protected]
https://www.moblin.org/mailman/listinfo/commits