Enlightenment CVS committal
Author : rephorm
Project : e17
Module : apps/elicit
Dir : e17/apps/elicit/src
Modified Files:
Elicit.h callbacks.c shots.c swatches.c
Log Message:
clean up some printfs
don't scroll when the list is shorter than the container
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/Elicit.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- Elicit.h 12 May 2004 19:13:30 -0000 1.11
+++ Elicit.h 14 May 2004 03:20:18 -0000 1.12
@@ -59,6 +59,7 @@
int changing;
int swatch_scrolling;
int shot_scrolling;
+ int shot_taken;
} flags;
struct {
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/callbacks.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- callbacks.c 12 May 2004 19:13:30 -0000 1.13
+++ callbacks.c 14 May 2004 03:20:18 -0000 1.14
@@ -78,6 +78,7 @@
if (!strcmp(sig, "elicit,shoot,start"))
{
+ el->flags.shot_taken = 1;
el->flags.shooting = 1;
}
else if (!strcmp(sig, "elicit,shoot,stop"))
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/shots.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- shots.c 13 May 2004 00:34:22 -0000 1.2
+++ shots.c 14 May 2004 03:20:18 -0000 1.3
@@ -180,6 +180,9 @@
double length;
Evas_Coord h;
+ /* don't save an empty shot */
+ if (!el->flags.shot_taken) return;
+
sh = calloc(1, sizeof(Elicit_Shot));
sh->obj = edje_object_add(el->evas);
@@ -283,8 +286,11 @@
double vx, vy;
evas_object_geometry_get(el->shots.cont, NULL, NULL, NULL, &h);
- edje_object_part_drag_value_get(el->gui, source, &vx, &vy);
- esmart_container_scroll_offset_set(el->shots.cont, -vy*(l-h+10));
+ if (l > h)
+ {
+ edje_object_part_drag_value_get(el->gui, source, &vx, &vy);
+ esmart_container_scroll_offset_set(el->shots.cont, -vy*(l-h+10));
+ }
}
else if (!fnmatch("elicit,shot,scroll,up*", emission, 0))
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/swatches.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- swatches.c 13 May 2004 00:34:22 -0000 1.2
+++ swatches.c 14 May 2004 03:20:18 -0000 1.3
@@ -254,7 +254,6 @@
elicit_swatch_scroll_cb(void *data, Evas_Object *o, const char *emission, const char
*source)
{
Elicit *el = data;
- printf("swatch cb (%s)\n", emission);
if (!strcmp(emission, "drag"))
{
@@ -263,12 +262,14 @@
double vx, vy;
evas_object_geometry_get(el->swatches.cont, NULL, NULL, NULL, &h);
- edje_object_part_drag_value_get(el->gui, source, &vx, &vy);
- esmart_container_scroll_offset_set(el->swatches.cont, -vy*(l-h+10));
+ if (l > h)
+ {
+ edje_object_part_drag_value_get(el->gui, source, &vx, &vy);
+ esmart_container_scroll_offset_set(el->swatches.cont, -vy*(l-h+10));
+ }
}
else if (!fnmatch("elicit,swatch,scroll,up*", emission, 0))
{
- printf("up\n");
if (!strcmp(emission, "elicit,swatch,scroll,up,start"))
{
el->swatches.length = esmart_container_elements_length_get(el->swatches.cont);
@@ -283,7 +284,6 @@
}
else
{
- printf("dn\n");
if (!strcmp(emission, "elicit,swatch,scroll,down,start"))
{
el->swatches.length = esmart_container_elements_length_get(el->swatches.cont);
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs