Enlightenment CVS committal
Author : titansoccer15
Project : e17
Module : proto
Dir : e17/proto/ephoto/src
Modified Files:
ephoto.c ephoto_browsing.c ephoto_presentation.c
Log Message:
Whoops. Fixes an error with the slideshow. Major Cleanup... Speeds ephoto up a
ton :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ephoto.c 22 Mar 2006 02:52:13 -0000 1.19
+++ ephoto.c 22 Mar 2006 03:17:02 -0000 1.20
@@ -79,7 +79,6 @@
imageint = argint;
imageint++;
snprintf(argimage, PATH_MAX, "%s", argv[imageint]);
- printf("%s\n", argimage);
}
else if ( argint < argc && !strcmp(argv[argint], "--audio") ) {
int imageint;
@@ -100,10 +99,8 @@
imageint = argint;
imageint++;
snprintf(argwidth, PATH_MAX, "%s", argv[imageint]);
- printf("%s\n", argwidth);
imageint++;
snprintf(argheight, PATH_MAX, "%s", argv[imageint]);
- printf("%s\n", argheight);
}
else if ( argint < argc && !strcmp(argv[argint], "--loop") ) {
argloop = 1;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_browsing.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ephoto_browsing.c 15 Mar 2006 04:22:37 -0000 1.9
+++ ephoto_browsing.c 22 Mar 2006 03:17:02 -0000 1.10
@@ -44,7 +44,6 @@
snprintf(pathf, PATH_MAX, "%s", pathi);
}
- printf("%s\n", pathf);
/**********************************************/
@@ -113,19 +112,15 @@
snprintf(pathw, PATH_MAX, "%s%s", pathg, temp);
- printf("%s\n", pathw);
-
+
if ( fnmatch("*.[Pp][Nn][Gg]", pathw, 0) == 0 ) {
ecore_list_append(imagefiles, strdup(pathw));
- printf("%s\n", pathw);
}
if ( fnmatch("*.[Jj][Pp][Gg]", pathw, 0) == 0 ) {
ecore_list_append(imagefiles, strdup(pathw));
- printf("%s\n", pathw);
}
if ( fnmatch("*.[Jj][Pp][Ee][Gg]", pathw, 0) == 0 ) {
ecore_list_append(imagefiles, strdup(pathw));
- printf("%s\n", pathw);
}
bname = basename(pathw);
@@ -175,7 +170,7 @@
m->text = ewl_text_new();
ewl_widget_name_set(m->text, itemp);
ewl_text_text_set(EWL_TEXT(m->text), bname2);
- ewl_object_minimum_size_set(EWL_OBJECT(m->text), 10, 16);
+ ewl_object_minimum_size_set(EWL_OBJECT(m->text), 10,
16);
ewl_object_fill_policy_set(EWL_OBJECT(m->text),
EWL_FLAG_FILL_ALL);
ewl_container_child_append(EWL_CONTAINER(m->hbox),
m->text);
ewl_widget_show(m->text);
@@ -233,7 +228,6 @@
snprintf(pathf, PATH_MAX, "%s", pathi);
}
/**********************************************************/
- printf("%s\n", pathf);
/********Add the directories to the tree!***********/
@@ -295,12 +289,19 @@
snprintf(pathw, PATH_MAX, "%s%s", pathg, temp);
- printf("%s\n", pathw);
if ( fnmatch("*.[Mm][Pp][3]", pathw, 0) == 0 ) {
ecore_list_append(audiofiles, strdup(pathw));
- printf("%s\n", pathw);
}
+
+ if ( fnmatch("*.[Oo][Gg][Gg]", pathw, 0) == 0 ) {
+ ecore_list_append(audiofiles, strdup(pathw));
+ }
+
+ if ( fnmatch("*.[Ww][Aa][Vv]", pathw, 0) == 0 ) {
+ ecore_list_append(audiofiles, strdup(pathw));
+ }
+
bname = basename(pathw);
@@ -378,7 +379,6 @@
if ( w == m->texta ) {
pathi = ewl_widget_name_get(w);
upname = dirname(pathi);
- printf("%s\n", upname);
ewl_text_text_set(EWL_TEXT(m->directorya), upname);
ewl_callback_call(m->directorya, EWL_CALLBACK_VALUE_CHANGED);
}
@@ -387,7 +387,6 @@
if ( w == m->texti ) {
pathi = ewl_widget_name_get(w);
upname = dirname(pathi);
- printf("%s\n", upname);
ewl_text_text_set(EWL_TEXT(m->directory), upname);
ewl_callback_call(m->directory, EWL_CALLBACK_VALUE_CHANGED);
}
@@ -402,7 +401,6 @@
char *name2;
name = ewl_widget_name_get(w);
- printf("%s\n", name);
ewl_iconbox_icon_remove(EWL_ICONBOX(m->ib), EWL_ICONBOX_ICON(w));
ewl_iconbox_icon_arrange(EWL_ICONBOX(m->ib));
@@ -413,7 +411,6 @@
while ( name2 = ecore_dlist_current(m->imagelist) ) {
name2 = ecore_dlist_current(m->imagelist);
if ( strcmp(name, name2) == 0 ) {
- printf("Matched %s\n", name);
ecore_dlist_remove(m->imagelist);
slidenum--;
}
@@ -458,17 +455,7 @@
ecore_dlist_append(m->imagelist, strdup(pathi));
slidenum++;
-
- //home = getenv("HOME");
- //snprintf(imagedb, PATH_MAX, "%s/ephoto_images", home);
- //printf("%s\n", imagedb);
- //snprintf(tempcheck, PATH_MAX, "%s/%s", imagedb, name);
- //printf("%s\n", tempcheck);
- //if ( !ecore_file_exists(tempcheck) ) {
- // snprintf(equiv, PATH_MAX, "%s", pathi);
- // printf("%s\n", equiv);
- // ecore_file_cp(equiv, tempcheck);
- //}
+
}
if ( page == m->viewbox && w != m->vbutton ) {
ewl_image_file_set(EWL_IMAGE(m->vimage), pathi, NULL);
@@ -499,8 +486,7 @@
/***************************************/
audios = strdup(pathi);
audio = 1;
- printf("%s\n", audios);
- if ( ewl_media_is_available() ) {
+ if ( ewl_media_is_available() ) {
if (audio != 0) {
ewl_widget_enable(m->audiolen);
ewl_widget_state_set(m->audiolen, "enabled");
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_presentation.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ephoto_presentation.c 22 Mar 2006 00:26:02 -0000 1.12
+++ ephoto_presentation.c 22 Mar 2006 03:17:02 -0000 1.13
@@ -13,7 +13,6 @@
/*********************/
/****Make sure audio keeps playing :)*****/
-printf("res %d\n", ewl_media_is_available());
if ( ewl_media_is_available() ) {
if (audio != 0) {
ewl_media_play_set(EWL_MEDIA(s->audio1), 1);
@@ -77,31 +76,32 @@
}
}
- }
- if ( mainwin == 1 ) {
- if (!picture1 &&
ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->loopcheck)) == 1 ) {
- picture2 = ecore_dlist_goto_first(m->imagelist);
- ewl_widget_destroy(s->screen);
-
- wsize = ewl_text_text_get(EWL_TEXT(m->wsize));
- w = atoi(wsize);
- hsize = ewl_text_text_get(EWL_TEXT(m->hsize));
- h = atoi(hsize);
- s->screen = ewl_image_new();
- ewl_image_proportional_set(EWL_IMAGE(s->screen), TRUE);
- ewl_theme_data_str_set(s->screen, "/image/group",
"entry");
- ewl_object_fill_policy_set(EWL_OBJECT(s->screen),
EWL_FLAG_FILL_SHRINK);
- ewl_image_file_set(EWL_IMAGE(s->screen), picture2,
NULL);
- ewl_object_alignment_set(EWL_OBJECT(s->screen),
EWL_FLAG_ALIGN_CENTER);
- if (
ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->fullrad)) == 0 ) {
-
ewl_object_maximum_size_set(EWL_OBJECT(s->screen), w, h);
+ if ( mainwin == 1 ) {
+ if (!picture1 &&
ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->loopcheck)) == 1 ) {
+ picture2 = ecore_dlist_goto_first(m->imagelist);
+
+ ewl_widget_destroy(s->screen);
+
+ wsize = ewl_text_text_get(EWL_TEXT(m->wsize));
+ w = atoi(wsize);
+ hsize = ewl_text_text_get(EWL_TEXT(m->hsize));
+ h = atoi(hsize);
+ s->screen = ewl_image_new();
+
ewl_image_proportional_set(EWL_IMAGE(s->screen), TRUE);
+ ewl_theme_data_str_set(s->screen,
"/image/group", "entry");
+
ewl_object_fill_policy_set(EWL_OBJECT(s->screen), EWL_FLAG_FILL_SHRINK);
+ ewl_image_file_set(EWL_IMAGE(s->screen),
picture2, NULL);
+ ewl_object_alignment_set(EWL_OBJECT(s->screen),
EWL_FLAG_ALIGN_CENTER);
+ if (
ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->fullrad)) == 0 ) {
+
ewl_object_maximum_size_set(EWL_OBJECT(s->screen), w, h);
+ }
+
ewl_container_child_append(EWL_CONTAINER(s->cell), s->screen);
+ ewl_widget_show(s->screen);
+ }
+ if (!picture1 &&
ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->loopcheck)) == 0 ) {
+ ewl_callback_call(s->wins,
EWL_CALLBACK_CLICKED);
}
- ewl_container_child_append(EWL_CONTAINER(s->cell),
s->screen);
- ewl_widget_show(s->screen);
- }
- if (!picture1 &&
ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->loopcheck)) == 0 ) {
- ewl_callback_call(s->wins, EWL_CALLBACK_CLICKED);
}
}
/******************************************************************/
@@ -123,7 +123,6 @@
void
play_cb(Ewl_Widget *w, void *event, void *data)
{
-printf("res %d\n", ewl_media_is_available());
if ( ewl_media_is_available() ) {
if (audio != 0) {
ewl_media_play_set(EWL_MEDIA(s->audio1), 1);
@@ -202,9 +201,9 @@
s->cell = ewl_cell_new();
ewl_object_fill_policy_set(EWL_OBJECT(s->cell), EWL_FLAG_FILL_ALL);
ewl_container_child_append(EWL_CONTAINER(s->wins), s->cell);
+ ewl_callback_append(s->cell, EWL_CALLBACK_CLICKED, destroys_cb, NULL);
ewl_widget_show(s->cell);
-printf("res %d\n", ewl_media_is_available());
if ( ewl_media_is_available() ) {
if (audio != 0) {
s->audio1 = ewl_media_new();
@@ -231,7 +230,7 @@
time = ewl_spinner_value_get(EWL_SPINNER(m->slidetime));
}
}
- else {
+ if (mainwin == 0 ) {
if ( argfit == 1 ) {
time = audiolen / slidenum;
}
@@ -276,8 +275,7 @@
p->imagep = ewl_image_new();
ewl_image_proportional_set(EWL_IMAGE(p->imagep), TRUE);
- /* ewl_theme_data_str_set(p->imagep, "/image/file", PACKAGE_DATA_DIR
"/images/images.edc");
- ewl_theme_data_str_set(p->imagep, "/image/group", "entry"); */
+ ewl_theme_data_str_set(p->imagep, "/image/group", "entry");
ewl_object_fill_policy_set(EWL_OBJECT(p->imagep), EWL_FLAG_FILL_SHRINK);
ewl_image_file_set(EWL_IMAGE(p->imagep), picturep, NULL);
ewl_object_alignment_set(EWL_OBJECT(p->imagep), EWL_FLAG_ALIGN_CENTER);
@@ -303,8 +301,7 @@
p->imagep = ewl_image_new();
ewl_image_proportional_set(EWL_IMAGE(p->imagep), TRUE);
- /* ewl_theme_data_str_set(p->imagep, "/image/file", PACKAGE_DATA_DIR
"/images/images.edc");
- ewl_theme_data_str_set(p->imagep, "/image/group", "entry"); */
+ ewl_theme_data_str_set(p->imagep, "/image/group", "entry");
ewl_object_fill_policy_set(EWL_OBJECT(p->imagep), EWL_FLAG_FILL_SHRINK);
ewl_image_file_set(EWL_IMAGE(p->imagep), picturep, NULL);
ewl_object_alignment_set(EWL_OBJECT(p->imagep), EWL_FLAG_ALIGN_CENTER);
@@ -329,8 +326,7 @@
p->imagep = ewl_image_new();
ewl_image_proportional_set(EWL_IMAGE(p->imagep), TRUE);
- /* ewl_theme_data_str_set(p->imagep, "/image/file", PACKAGE_DATA_DIR
"/images/images.edc");
- ewl_theme_data_str_set(p->imagep, "/image/group", "entry"); */
+ ewl_theme_data_str_set(p->imagep, "/image/group", "entry");
ewl_object_fill_policy_set(EWL_OBJECT(p->imagep), EWL_FLAG_FILL_SHRINK);
ewl_image_file_set(EWL_IMAGE(p->imagep), picturep, NULL);
ewl_object_alignment_set(EWL_OBJECT(p->imagep), EWL_FLAG_ALIGN_CENTER);
@@ -350,8 +346,7 @@
p->imagep = ewl_image_new();
ewl_image_proportional_set(EWL_IMAGE(p->imagep), TRUE);
- /* ewl_theme_data_str_set(p->imagep, "/image/file", PACKAGE_DATA_DIR
"/images/images.edc");
- ewl_theme_data_str_set(p->imagep, "/image/group", "entry"); */
+ ewl_theme_data_str_set(p->imagep, "/image/group", "entry");
ewl_object_fill_policy_set(EWL_OBJECT(p->imagep), EWL_FLAG_FILL_SHRINK);
ewl_image_file_set(EWL_IMAGE(p->imagep), picturep, NULL);
ewl_object_alignment_set(EWL_OBJECT(p->imagep), EWL_FLAG_ALIGN_CENTER);
@@ -409,6 +404,13 @@
ewl_callback_append(s->wins, EWL_CALLBACK_DELETE_WINDOW, destroyp_cb,
NULL);
ewl_widget_show(s->wins);
+ s->screen = ewl_image_new();
+ ewl_image_file_set(EWL_IMAGE(s->screen), PACKAGE_DATA_DIR
"/images/black.png", NULL);
+ ewl_object_fill_policy_set(EWL_OBJECT(s->screen), EWL_FLAG_FILL_ALL);
+ ewl_container_child_append(EWL_CONTAINER(s->wins), s->screen);
+ ewl_widget_show(s->screen);
+
+
p->vbox1p = ewl_vbox_new();
ewl_container_child_append(EWL_CONTAINER(s->wins), p->vbox1p);
ewl_object_alignment_set(EWL_OBJECT(p->vbox1p), EWL_FLAG_ALIGN_CENTER);
@@ -416,17 +418,17 @@
ewl_box_spacing_set(EWL_BOX(p->vbox1p), 10);
ewl_widget_show(p->vbox1p);
- p->vboxp = ewl_vbox_new();
- ewl_container_child_append(EWL_CONTAINER(p->vbox1p), p->vboxp);
- ewl_object_alignment_set(EWL_OBJECT(p->vboxp), EWL_FLAG_ALIGN_CENTER);
- ewl_object_fill_policy_set(EWL_OBJECT(p->vboxp), EWL_FLAG_FILL_ALL);
- ewl_box_spacing_set(EWL_BOX(p->vboxp), 10);
+ p->vboxp = ewl_cell_new();
+ ewl_object_fill_policy_set(EWL_OBJECT(p->vboxp), EWL_FLAG_FILL_ALL);
+ ewl_container_child_append(EWL_CONTAINER(p->vbox1p), p->vboxp);
+ ewl_object_alignment_set(EWL_OBJECT(p->vboxp), EWL_FLAG_ALIGN_CENTER);
ewl_callback_append(p->vboxp, EWL_CALLBACK_CLICKED, destroyp_cb, NULL);
ewl_widget_show(p->vboxp);
pictureone = ecore_dlist_goto_first(m->imagelist);
p->imagep = ewl_image_new();
+ ewl_theme_data_str_set(p->imagep, "/image/group", "entry");
ewl_image_proportional_set(EWL_IMAGE(p->imagep), TRUE);
ewl_object_fill_policy_set(EWL_OBJECT(p->imagep), EWL_FLAG_FILL_SHRINK);
ewl_image_file_set(EWL_IMAGE(p->imagep), pictureone, NULL);
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs