Enlightenment CVS committal
Author : englebass
Project : e_modules
Module : penguins
Dir : e_modules/penguins
Modified Files:
e_mod_config.c e_mod_main.c e_modules-penguins.spec.in
Log Message:
Fix warnings.
===================================================================
RCS file: /cvs/e/e_modules/penguins/e_mod_config.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_mod_config.c 20 Oct 2007 13:14:50 -0000 1.1
+++ e_mod_config.c 2 Nov 2007 12:48:00 -0000 1.2
@@ -78,8 +78,7 @@
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
*cfdata)
{
- Evas_Object *o, *of, *ob, *ol, *oi;
- E_Radio_Group *rg;
+ Evas_Object *o, *of, *ob, *ol;
Population *pop;
pop = cfd->data;
@@ -124,7 +123,7 @@
char * name;
Evas_Object *oi;
theme = l->data;
- name = edje_file_data_get (theme, "PopulationName");
+ name = edje_file_data_get(theme, "PopulationName");
if (name)
{
oi = edje_object_add(evas);
@@ -133,7 +132,7 @@
printf("TEMA: %s (%s)\n", name, cfdata->theme);
e_widget_ilist_append(ol, oi, name,
_ilist_cb_selected, theme, theme);
- if (strcmp(theme,cfdata->theme) == 0)
+ if (strcmp(theme, cfdata->theme) == 0)
{
e_widget_ilist_selected_set(ol, count);
}
@@ -151,14 +150,10 @@
static void
_ilist_cb_selected(void *data)
{
- E_Config_Dialog_Data *cfdata;
char *th;
th = data;
- //cfdata = data;
- //if (!cfdata) return;
- printf("CB %s\n",th);
-
+ printf("CB %s\n", th);
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
===================================================================
RCS file: /cvs/e/e_modules/penguins/e_mod_main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_mod_main.c 2 Nov 2007 12:22:16 -0000 1.2
+++ e_mod_main.c 2 Nov 2007 12:48:00 -0000 1.3
@@ -1,8 +1,11 @@
#include <e.h>
+#include <Ecore_Str.h>
+
#include "config.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
+
#define CLIMBER_PROB 4 // 4 Means: one climber every 5 - 1 Means: all climber
- !!Don't set to 0
#define FLOATER_PROB 2
#define MAX_FALLER_HEIGHT 300
@@ -135,7 +138,7 @@
if (es->visible)
{
e_container_shape_geometry_get(es, &x, &y, &w, &h);
- printf("E_shape: [%d] x:%d y:%d w:%d h:%d\n", es->visible,x, y,
w, h);
+ printf("E_shape: [%d] x:%d y:%d w:%d h:%d\n", es->visible, x,
y, w, h);
}
}
}
@@ -154,12 +157,12 @@
{
if (ecore_str_has_suffix(filename, ".edj"))
{
-
snprintf(buf,sizeof(buf),"%s/%s",PACKAGE_DATA_DIR"/themes",filename);
- name = edje_file_data_get (buf, "PopulationName");
+ snprintf(buf, sizeof(buf),"%s/%s", PACKAGE_DATA_DIR"/themes",
filename);
+ name = edje_file_data_get(buf, "PopulationName");
if (name)
{
- printf("THEME FILE: %s (%s)\n",filename,name);
- pop->themes = evas_list_append(pop->themes,strdup(buf));
+ printf("THEME FILE: %s (%s)\n", filename, name);
+ pop->themes = evas_list_append(pop->themes, strdup(buf));
}
}
}
@@ -178,9 +181,9 @@
{
Action *a;
a = data;
- printf("Free Action '%s' :(\n",a->name);
+ printf("Free Action '%s' :(\n", a->name);
E_FREE(a->name);
- E_FREE (a);
+ E_FREE(a);
return 1;
}
static void
@@ -242,7 +245,7 @@
while (pop->themes)
{
- printf("Free Theme '%s' :(\n",pop->themes->data);
+ printf("Free Theme '%s' :(\n", (char *)pop->themes->data);
pop->themes = evas_list_remove_list(pop->themes, pop->themes);
}
@@ -274,9 +277,8 @@
{
Action *act;
char *data;
- int w, h, speed;
-
- data = edje_file_data_get (filename, name);
+
+ data = edje_file_data_get(filename, name);
if (!data)
return NULL;
@@ -301,10 +303,9 @@
{
Custom_Action *c;
char *data;
- int w, h, speed;
char buf[25];
- data = edje_file_data_get (filename, name);
+ data = edje_file_data_get(filename, name);
if (!data)
return NULL;
@@ -332,7 +333,7 @@
Evas_Bool hash_fn(Evas_Hash *hash, const char *key, void *data, void *fdata)
{
Action *a = data;
- printf("ACTIONS: name:'%s' w:%d h:%d speed:%d\n",key,a->w,a->h,a->speed);
+ printf("ACTIONS: name:'%s' w:%d h:%d speed:%d\n", key, a->w, a->h,
a->speed);
return 1;
}
@@ -340,7 +341,6 @@
_theme_load(Population *pop)
{
char *name;
- Action *act;
char buf[15];
int i;
@@ -352,7 +352,7 @@
pop->conf->theme = PACKAGE_DATA_DIR "/default.edj";
- name = edje_file_data_get (pop->conf->theme, "PopulationName");
+ name = edje_file_data_get(pop->conf->theme, "PopulationName");
if (!name)
return;
@@ -371,12 +371,12 @@
// load custom actions
i = 2;
snprintf(buf, sizeof(buf), "Custom_1");
- while(_load_custom_action(pop, pop->conf->theme, buf))
+ while (_load_custom_action(pop, pop->conf->theme, buf))
snprintf(buf, sizeof(buf), "Custom_%d", i++);
evas_hash_foreach(pop->actions, hash_fn, NULL);
Evas_List *l;
- for ( l = pop->customs; l; l = l->next )
+ for (l = pop->customs; l; l = l->next )
{
Custom_Action *c = l->data;
printf("CUSTOMS: name:'%s' w:%d h:%d h_speed:%d v_speed:%d\n",
@@ -394,13 +394,11 @@
evas_output_viewport_get(pop->canvas, &xx, &yy, &ww, &hh);
//Create edje
- printf("\n *** LOAD %d ANIMS ***\n",pop->conf->penguins_count);
+ printf("\n *** LOAD %d ANIMS ***\n", pop->conf->penguins_count);
for (i = 0; i < pop->conf->penguins_count; i++)
{
- Evas_Coord tx, ty;
-
tux = malloc(sizeof(Penguin));
o = edje_object_add(pop->canvas);
@@ -410,7 +408,7 @@
evas_object_image_alpha_set(o, 0.5);
evas_object_color_set(o, pop->conf->alpha, pop->conf->alpha,
- pop->conf->alpha,pop->conf->alpha);
+ pop->conf->alpha, pop->conf->alpha);
evas_object_pass_events_set(o, 1);
tux->obj = o;
@@ -443,11 +441,9 @@
{
Population *pop;
Evas_List *l;
- double d;
- int ran;
-
+
pop = data;
- for (l=pop->penguins; l ;l=l->next)
+ for (l = pop->penguins; l; l = l->next)
{
Penguin *tux;
int touch;
@@ -463,17 +459,17 @@
else if (tux->action->id == ID_FALLER)
{
tux->y += ((double)tux->action->speed / 100);
- if (touch = _is_inside_any_win(pop,
+ if ((touch = _is_inside_any_win(pop,
(int)tux->x+(tux->action->w/2),
(int)tux->y + tux->action->h,
- _RET_TOP_VALUE))
+ _RET_TOP_VALUE)))
{
if (( (int)tux->y - tux->faller_h) > MAX_FALLER_HEIGHT)
_start_splatting_at(tux, touch);
else
_start_walking_at(tux, touch);
}
- else if(( (int)tux->y + tux->action->h ) > pop->height)
+ else if (( (int)tux->y + tux->action->h ) > pop->height)
{
if (( (int)tux->y - tux->faller_h) > MAX_FALLER_HEIGHT)
_start_splatting_at(tux, pop->height);
@@ -486,13 +482,13 @@
else if (tux->action->id == ID_FLOATER)
{
tux->y += ((double)tux->action->speed / 100);
- if (touch = _is_inside_any_win(pop,
+ if ((touch = _is_inside_any_win(pop,
(int)tux->x+(tux->action->w/2),
(int)tux->y + tux->action->h,
_RET_TOP_VALUE)
- )
+ ))
_start_walking_at(tux, touch);
- else if(( (int)tux->y + tux->action->h ) > pop->height)
+ else if (( (int)tux->y + tux->action->h ) > pop->height)
_start_walking_at(tux, pop->height);
}
@@ -501,11 +497,11 @@
{
// random flyer
if (_RAND(FLYER_PROB)){
- _start_flying_at(tux,tux->y);
+ _start_flying_at(tux, tux->y);
}
// random custom
else if (_RAND(CUSTOM_PROB)){
- _start_custom_at(tux,tux->y+tux->action->h);
+ _start_custom_at(tux, tux->y+tux->action->h);
}
// left
else if (tux->reverse)
@@ -603,7 +599,7 @@
}
- // printf("Place tux at x:%d y:%d w:%d h:%d\n",tux->x,
tux->y,tux->action->w, tux->action->h);
+ // printf("Place tux at x:%d y:%d w:%d h:%d\n", tux->x, tux->y,
tux->action->w, tux->action->h);
evas_object_move(tux->obj, (int)tux->x, (int)tux->y);
}
@@ -626,7 +622,7 @@
if (es->visible)
{
e_container_shape_geometry_get(es, &sx, &sy, &sw, &sh);
- //printf("E_shape: [%d] x:%d y:%d w:%d h:%d\n", es->visible,sx, sy,
sw, sh);
+ //printf("E_shape: [%d] x:%d y:%d w:%d h:%d\n", es->visible, sx, sy,
sw, sh);
if ( ((x > sx) && (x < (sx+sw))) &&
((y > sy) && (y < (sy+sh))) )
{
@@ -661,7 +657,7 @@
static void
_start_walking_at(Penguin *tux, int at_y)
{
- printf("Start walking...at %d\n",at_y);
+ printf("Start walking...at %d\n", at_y);
tux->action = evas_hash_find(tux->pop->actions, "Walker");
tux->y = at_y - tux->action->h;
@@ -675,7 +671,7 @@
static void
_start_climbing_at(Penguin *tux, int at_x)
{
- //printf("Start climbing...at: %d\n",at_x);
+ //printf("Start climbing...at: %d\n", at_x);
tux->action = evas_hash_find(tux->pop->actions, "Climber");
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
@@ -747,7 +743,7 @@
_cb_splatter_end (void *data, Evas_Object *o, const char *emi, const char *src)
{
_reborn((Penguin*)data);
- edje_object_signal_callback_del(o,"splatting_done","edje",_cb_splatter_end);
+ edje_object_signal_callback_del(o,"splatting_done","edje",
_cb_splatter_end);
}
static void
@@ -757,7 +753,7 @@
evas_object_hide(tux->obj);
tux->action = evas_hash_find(tux->pop->actions, "Splatter");
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
- evas_object_image_fill_set(tux->obj,0,0, tux->action->w, tux->action->h);
+ evas_object_image_fill_set(tux->obj, 0, 0, tux->action->w, tux->action->h);
tux->y = at_y - tux->action->h;
if (tux->reverse)
edje_object_signal_emit(tux->obj, "start_splatting_left", "epenguins");
@@ -765,9 +761,9 @@
edje_object_signal_emit(tux->obj, "start_splatting_right", "epenguins");
-
edje_object_signal_callback_add(tux->obj,"splatting_done","edje",_cb_splatter_end,
tux);
+ edje_object_signal_callback_add(tux->obj,"splatting_done","edje",
_cb_splatter_end, tux);
evas_object_resize(tux->obj, tux->action->w, tux->action->h);
- evas_object_image_fill_set(tux->obj,0,0, tux->action->w, tux->action->h);
+ evas_object_image_fill_set(tux->obj, 0, 0, tux->action->w, tux->action->h);
evas_object_move(tux->obj,(int)tux->x,(int)tux->y);
evas_object_show(tux->obj);
}
@@ -788,8 +784,8 @@
}
else
{
- edje_object_signal_callback_del(o,"custom_done","edje",_cb_custom_end);
- _start_walking_at(tux,tux->y+tux->custom->h);
+ edje_object_signal_callback_del(o,"custom_done","edje", _cb_custom_end);
+ _start_walking_at(tux, tux->y+tux->custom->h);
tux->custom = NULL;
}
}
@@ -799,8 +795,7 @@
_start_custom_at(Penguin *tux, int at_y)
{
int ran;
- char buf[25];
-
+
if (tux->pop->custom_num < 1)
return;
@@ -825,9 +820,9 @@
- printf("START Custom Action n %d (%s) repeat: %d\n", ran,
tux->custom->left_program_name,tux->r_count);
+ printf("START Custom Action n %d (%s) repeat: %d\n", ran,
tux->custom->left_program_name, tux->r_count);
-
edje_object_signal_callback_add(tux->obj,"custom_done","edje",_cb_custom_end,
tux);
+ edje_object_signal_callback_add(tux->obj,"custom_done","edje",
_cb_custom_end, tux);
}
/* static void
===================================================================
RCS file: /cvs/e/e_modules/penguins/e_modules-penguins.spec.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_modules-penguins.spec.in 20 Oct 2007 13:14:50 -0000 1.1
+++ e_modules-penguins.spec.in 2 Nov 2007 12:48:00 -0000 1.2
@@ -1,4 +1,4 @@
-%define module_name penguins
+%define module_name penguins
Summary: %{module_name} module for the Enlightenment window manager
Name: e_modules-%{module_name}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs