This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 AUTHORS                       |    2 +-
 README                        |    1 -
 colortext/Makefile.am         |    2 +-
 colortext/colortext.desktop   |    5 +-
 helloworld/helloworld.desktop |    1 +
 squares/Makefile.am           |    2 +-
 squares/configure.ac          |   35 ----
 squares/main.c                |  419 -----------------------------------------
 squares/squares.c             |  419 +++++++++++++++++++++++++++++++++++++++++
 squares/squares.desktop       |    9 +-
 10 files changed, 431 insertions(+), 464 deletions(-)

New commits:
commit 95374e77f2a6967068f5cb04b9c787d37e698852
Author: Bob Spencer <[EMAIL PROTECTED]>
Date:   Wed Aug 13 14:55:33 2008 -0700

    Tweaks to build and install apps correctly.  Updated AUTHORS
    and README

commit b40cc792f3d698d494e3c58cbfa0497c577aea92
Author: Bob Spencer <[EMAIL PROTECTED]>
Date:   Wed Aug 13 14:39:28 2008 -0700

    Added categories to the .desktop files so they install in
    different places on the system


Diff in this email is a maximum of 400 lines.
diff --git a/AUTHORS b/AUTHORS
index 792801e..3510a27 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,4 @@
-Felicia Decker ([EMAIL PROTECTED])
+Felicia Decker ([EMAIL PROTECTED])
 Bob Spencer ([EMAIL PROTECTED])
 
 
diff --git a/README b/README
index 958c969..369b99b 100644
--- a/README
+++ b/README
@@ -1,6 +1,5 @@
 
 The applications provided in this project are filler applications so that the 
application launcher will have something to launch until real applications are 
built.  They also may be useful for verifying that a given platform supports 
rendering OpenGL-based applications within a compositing window manager.
 
-These applications were written by Clutter beginners. 
 
 
diff --git a/colortext/Makefile.am b/colortext/Makefile.am
index c646431..a9b6ec3 100644
--- a/colortext/Makefile.am
+++ b/colortext/Makefile.am
@@ -5,7 +5,7 @@ AM_CFLAGS = $(CLUTTER_CFLAGS) \
        -D_GNU_SOURCE
 
 colortext_LDADD = $(CLUTTER_LIBS)
-colortext_SOURCES = main.c
+colortext_SOURCES = colortext.c
 
 desktopdir = $(datadir)/applications
 desktop_DATA = colortext.desktop
diff --git a/colortext/colortext.desktop b/colortext/colortext.desktop
index 9a35a9f..d41dec4 100644
--- a/colortext/colortext.desktop
+++ b/colortext/colortext.desktop
@@ -1,8 +1,9 @@
 [Desktop Entry]
 Version=1.0
 Encoding=UTF-8
-Name=Color Text
+Name=Clutter Color Text
 Type=Application
+Categories=Office
 Icon=clutter_colortext
 Exec=colortext
-Name[en_US]=Color Text
+Name[en_US]=Clutter Color Text
diff --git a/helloworld/helloworld.desktop b/helloworld/helloworld.desktop
index 7e46f14..e7109d1 100644
--- a/helloworld/helloworld.desktop
+++ b/helloworld/helloworld.desktop
@@ -3,6 +3,7 @@ Version=0.1
 Encoding=UTF-8
 Name=Clutter Hello World
 Type=Application
+Categories=Network
 Icon=clutter_helloworld
 Exec=helloworld
 Name[en_US]=Clutter Hello World
diff --git a/squares/Makefile.am b/squares/Makefile.am
index 975117c..0e57e21 100644
--- a/squares/Makefile.am
+++ b/squares/Makefile.am
@@ -7,7 +7,7 @@ AM_CFLAGS = $(CLUTTER_CFLAGS) \
        -D_GNU_SOURCE 
 
 squares_LDADD = $(CLUTTER_LIBS)
-squares_SOURCES = main.c
+squares_SOURCES = squares.c
 
 desktopdir = $(datadir)/applications
 desktop_DATA = squares.desktop
diff --git a/squares/configure.ac b/squares/configure.ac
deleted file mode 100644
index fd98f31..0000000
--- a/squares/configure.ac
+++ /dev/null
@@ -1,35 +0,0 @@
-AC_PREREQ(2.61)
-AC_INIT(rotating-square, 1.0, [])
-AM_INIT_AUTOMAKE()
-AC_CONFIG_SRCDIR(src/main.c)
-AM_CONFIG_HEADER(config.h)
-AM_MAINTAINER_MODE
-
-
-# Checks for programs.
-AC_PROG_CC
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_HEADER_STDC
-#AC_CHECK_HEADERS([stdlib.h])
-
-PKG_CHECK_MODULES(CLUTTER, clutter-0.8)
-AC_SUBST(CLUTTER_CFLAGS)
-AC_SUBST(CLUTTER_LIBS)
-
-desktopdir = $(datadir)/applications
-AC_SUBST(desktopdir)
-
-icondir = $(datadir)/icons/hicolor/32x32/apps
-AC_SUBST(icon)
-
-if test "x$GCC" = "xyes"; then
-       GCC_FLAGS="-g -Wall"
-fi
-
-
-AC_OUTPUT([
-Makefile
-])
diff --git a/squares/main.c b/squares/main.c
deleted file mode 100644
index fd8c9b9..0000000
--- a/squares/main.c
+++ /dev/null
@@ -1,419 +0,0 @@
-#include <clutter/clutter.h>
-
-#define LOWER_BOUND 50
-#define UPPER_BOUND 255
-
-ClutterActor *stage, *black_square, *red_square_1, *red_square_2, 
-                     *red_square_3, *red_square_4;
-ClutterActor *start_button, *start_shadow, *start_label;
-
-ClutterTimeline *button_press_timeline, *button_release_timeline, 
-                *growth_timeline, *button_reshow_timeline;
-
-ClutterEffectTemplate *button_press_movement, *button_release_movement;
-
-gint rotation_angle;
-int square_size = LOWER_BOUND;
-
-/**
-  Rotate the black square 360 degrees.
-  */
-void rotate_square()
-{
-  rotation_angle += 1;
-  if (rotation_angle >= 360)
-      rotation_angle = 0;
-
-  clutter_actor_set_rotation(black_square, 
-                             CLUTTER_Z_AXIS, 
-                             rotation_angle, 
-                             113, 113, 5);
-  return;
-}
-
-
-/**
-  The black square appears to grow because the
-  four red squares grow in proportional width/
-  height until there is only a 1 pixel width
-  where the viewer can still see the rotating
-  black square behind the 4 red ones.
-  */
-void start_square_growing(ClutterTimeline *timeline, gint frame_num, 
-                          gpointer data)
-{
-
-  if (square_size == UPPER_BOUND){
-     clutter_timeline_stop(growth_timeline);
-     return;
-  }
-  square_size++;
-  clutter_actor_set_size(red_square_1, square_size, square_size);
-
-  gint curr_x_pos = 0;
-  gint curr_y_pos = 0;
-  gint new_anchor = 0;
-
-  guint curr_width = clutter_actor_get_width(red_square_2);
-  clutter_actor_get_position(red_square_2, &curr_x_pos, &curr_y_pos);
-  gint change_in_anchor = square_size - curr_width;
-
-  //change square 2
-  if (square_size > curr_width)
-  {
-      new_anchor = curr_x_pos - change_in_anchor;
-  }
-  else if (square_size < curr_width)
-  {
-      new_anchor = curr_x_pos + change_in_anchor;
-  }
-  clutter_actor_set_x(red_square_2, new_anchor);
-  clutter_actor_set_size(red_square_2, square_size, square_size);
-
-  
-  //change square 3
-  clutter_actor_get_position(red_square_3, &curr_x_pos, &curr_y_pos);
-  if (square_size > curr_width)
-  {
-      new_anchor = curr_y_pos - change_in_anchor;
-  }  
-  else if (square_size < curr_width)
-  {
-      new_anchor = curr_y_pos + change_in_anchor;
-  }
-  clutter_actor_set_y(red_square_3, new_anchor);
-  clutter_actor_set_size(red_square_3, square_size, square_size);
-
-  
-  //change square 4
-  clutter_actor_get_position(red_square_4, &curr_x_pos, &curr_y_pos);
-  if (square_size > curr_width)
-  {
-      new_anchor = curr_y_pos - change_in_anchor;
-  }
-  else if (square_size < curr_width)
-  {
-      new_anchor = curr_y_pos + change_in_anchor;
-  }
-  clutter_actor_set_y(red_square_4, new_anchor);
-  if (square_size > curr_width)
-  {
-      new_anchor = curr_x_pos - change_in_anchor;
-  }
-  else if (square_size < curr_width)
-  {
-      new_anchor = curr_x_pos - change_in_anchor;
-  }
-  clutter_actor_set_x(red_square_4, new_anchor);
-  clutter_actor_set_size(red_square_4, square_size, square_size);
-
-    if (square_size == UPPER_BOUND - 1){
-     printf("we get to reseting square_size\n");
-     square_size = LOWER_BOUND;
-     return;
-  }
-  return;
-
-}
-
-
-
-/**
-  When the cursor enters the start button, change
-  the start button's color.
-  */
-gboolean on_button_enter(ClutterActor *actor, ClutterEvent *event, 
-                         gpointer data)
-{
-  ClutterColor color_red   = { 0xff, 0x00, 0x00, 0xff };
-  clutter_rectangle_set_color(CLUTTER_RECTANGLE(start_button), &color_red);
-
-  return TRUE;
-}
-
-
-
-/**
-  When the cursor leaves the start button, change
-  the button color back to it's original color.
-  */
-gboolean on_button_leave(ClutterActor *actor, ClutterEvent *event, 
-                         gpointer data)
-{
-  ClutterColor color_white = { 0xff, 0xff, 0xff, 0xff };
-  clutter_rectangle_set_color(CLUTTER_RECTANGLE(start_button), &color_white);
-
-  return TRUE;
-}
-
-
-
-/**
-  When the mouse is pressed over the start button, check if the 
-  red square sizes are larger than certain amount - if so, the 
-  simulation needs to be reset.
-  Then move the start button and text southwest to simulate a button
-  press.
-  */
-gboolean on_button_press(ClutterActor *actor, ClutterEvent *event, 
-                         gpointer data)
-{
-  if (square_size >= 75){
-    square_size = LOWER_BOUND;
-
-    clutter_actor_set_size(red_square_1, square_size, square_size);
-    clutter_actor_set_size(red_square_2, square_size, square_size);
-    clutter_actor_set_size(red_square_3, square_size, square_size);
-    clutter_actor_set_size(red_square_4, square_size, square_size);
-    clutter_actor_set_position(red_square_1, 509, 74);
-    clutter_actor_set_position(red_square_2, 910, 74);
-    clutter_actor_set_position(red_square_3, 509, 475);
-    clutter_actor_set_position(red_square_4, 910, 475);
-  }
-  ClutterColor color_red   = { 0xff, 0x00, 0x00, 0xff };
-  clutter_rectangle_set_color(CLUTTER_RECTANGLE(start_button), &color_red);
-  button_press_timeline = clutter_effect_move(button_press_movement, 
-                                              actor, 200, 455, NULL, NULL);
-  button_press_timeline = clutter_effect_move(button_press_movement, 
-                                              start_label, 227, 465, NULL, 
NULL);
-
-  return TRUE;
-}
-
-
-
-/**
-  Delays the hiding of the button. (So that the
-  viewer doesn't miss the button coming back
-  up to its original position after being pressed.)
-  */
-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);  
-  return;
-}
-
-
-
-/**
-  When the mouse is released over the start button,
-  the simulation begins. The red squares grow to 
-  a maximum width and height before stopping.
-  */
-gboolean on_button_release(ClutterActor *actor, ClutterEvent *event, 
-                           gpointer data)
-{
-  ClutterColor color_white = { 0xff, 0xff, 0xff, 0xff };
-  clutter_rectangle_set_color(CLUTTER_RECTANGLE(start_button), &color_white);
-
-  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);
-
-  button_release_timeline = clutter_effect_move(button_release_movement, 
-                                      actor, 205, 450, 
-                                      (ClutterEffectCompleteFunc)hide_button, 
-                                      NULL);
-  button_release_timeline = clutter_effect_move(button_release_movement, 
-                                      start_label, 232, 460, NULL, NULL);
-  clutter_timeline_start(button_reshow_timeline);
-
-  return TRUE;
-}
-
-
-
-/**
-  Show the button. (This is called when the simulation
-  has completed. This was done because if the start
-  button is pressed during the simulation, it has a 
-  tendency to skew the red squares to incorrect
-  positions.)
-  */
-void show_button(ClutterTimeline *timeline, gpointer data)
-{
-  clutter_actor_show(start_button);
-  clutter_actor_show(start_label);
-  clutter_actor_show(start_shadow);  
-  return;
-}
-
-
-
-int main(int argc, char *argv[])
-{
-  clutter_init(&argc, &argv);
-
-  stage = clutter_stage_get_default();
-  clutter_actor_set_size(stage, 1024, 600);
-  ClutterColor stage_color = { 0xff, 0xff, 0xff, 0xff }; 
-  ClutterColor tab_color   = { 0xcd, 0xc1, 0xc5, 0xff };
-  ClutterColor color_white = { 0xff, 0xff, 0xff, 0xff };
-  ClutterColor color_black = { 0x00, 0x00, 0x00, 0xff };
-  ClutterColor color_red   = { 0xff, 0x00, 0x00, 0xff };
-  clutter_stage_set_color(CLUTTER_STAGE(stage), &stage_color);
-  clutter_stage_set_title(CLUTTER_STAGE(stage), "Squares");
-  clutter_actor_show(stage);
-
-  /* Tab */
-  ClutterActor *tab = clutter_rectangle_new_with_color(&tab_color);
-  clutter_actor_set_size             (tab, 1000, 576);
-  clutter_actor_set_position         (tab, 10, 10);
-  clutter_rectangle_set_border_width (CLUTTER_RECTANGLE(tab), 1);
-  clutter_rectangle_set_border_color (CLUTTER_RECTANGLE(tab), &color_black);
-  clutter_container_add_actor        (CLUTTER_CONTAINER(stage), tab);
-  clutter_actor_show                 (tab);
-  
-  /* Border square shadow */
-  ClutterActor *border_shadow = clutter_rectangle_new_with_color(&color_black);
-  clutter_actor_set_opacity          (border_shadow, 255);
-  clutter_actor_set_size             (border_shadow, 455, 455);
-  clutter_actor_set_position         (border_shadow, 502, 77);
_______________________________________________
Commits mailing list
[email protected]
https://www.moblin.org/mailman/listinfo/commits

Reply via email to