Enlightenment CVS committal Author : titansoccer15 Project : e17 Module : proto
Dir : e17/proto/ephoto/src Modified Files: ephoto_browsing.c ephoto_presentation.c Log Message: This makes ephoto look a ton better since we have fixed ewl's rows! It also makes the audio work with the new ewl_media api. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_browsing.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ephoto_browsing.c 21 Feb 2006 23:11:41 -0000 1.5 +++ ephoto_browsing.c 23 Feb 2006 05:31:54 -0000 1.6 @@ -70,10 +70,12 @@ /*********Lets setup the parent dir row**********/ m->hbox = ewl_hbox_new(); + ewl_object_alignment_set(EWL_OBJECT(m->hbox), EWL_FLAG_ALIGN_CENTER); ewl_box_spacing_set(EWL_BOX(m->hbox), 5); ewl_widget_show(m->hbox); m->image = ewl_image_new(); + ewl_tree_expandable_rows_set(EWL_TREE(m->imagetree), FALSE); ewl_image_file_set(EWL_IMAGE(m->image), PACKAGE_DATA_DIR "/images/up.png", NULL); ewl_container_child_append(EWL_CONTAINER(m->hbox), m->image); ewl_widget_show(m->image); @@ -83,6 +85,7 @@ ewl_text_text_set(EWL_TEXT(m->texti), up); ewl_object_minimum_size_set(EWL_OBJECT(m->texti), 10, 16); ewl_object_fill_policy_set(EWL_OBJECT(m->texti), EWL_FLAG_FILL_ALL); + ewl_object_alignment_set(EWL_OBJECT(m->texti), EWL_FLAG_ALIGN_CENTER); ewl_container_child_append(EWL_CONTAINER(m->hbox), m->texti); ewl_widget_show(m->texti); @@ -244,6 +247,7 @@ ewl_widget_destroy(m->audiotree); m->audiotree = ewl_tree_new(1); + ewl_tree_expandable_rows_set(EWL_TREE(m->audiotree), FALSE); ewl_container_child_append(EWL_CONTAINER(m->songs), m->audiotree); ewl_object_maximum_size_set(EWL_OBJECT(m->audiotree), 200, 175); ewl_widget_show(m->audiotree); @@ -346,6 +350,7 @@ ewl_text_text_set(EWL_TEXT(m->text), bname2); 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_object_alignment_set(EWL_OBJECT(m->text), EWL_FLAG_ALIGN_CENTER); ewl_container_child_append(EWL_CONTAINER(m->hbox), m->text); ewl_widget_show(m->text); @@ -463,11 +468,11 @@ audios = strdup(pathi); audio = 1; printf("%s\n", audios); -#ifdef EWL_MEDIA_H - if (audio != 0) { - ewl_widget_enable(m->audiolen); - ewl_widget_state_set(m->audiolen, "enabled"); + if ( ewl_media_is_available() ) { + if (audio != 0) { + ewl_widget_enable(m->audiolen); + ewl_widget_state_set(m->audiolen, "enabled"); + } } -#endif } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_presentation.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ephoto_presentation.c 22 Feb 2006 06:29:35 -0000 1.4 +++ ephoto_presentation.c 23 Feb 2006 05:31:54 -0000 1.5 @@ -13,11 +13,12 @@ /*********************/ /****Make sure audio keeps playing :)*****/ - #ifdef EWL_MEDIA_H - if (audio != 0) { - ewl_media_play_set(EWL_MEDIA(s->audio1), 1); - } - #endif +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); + } +} /*****************************************/ /***Cycle the slideshow!***/ @@ -88,12 +89,13 @@ void play_cb(Ewl_Widget *w, void *event, void *data) { -#ifdef EWL_MEDIA_H - if (audio != 0) { - ewl_media_play_set(EWL_MEDIA(s->audio1), 1); - audiolen = ewl_media_length_get(EWL_MEDIA(s->audio1)); - } -#endif +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); + audiolen = ewl_media_length_get(EWL_MEDIA(s->audio1)); + } +} } void @@ -149,17 +151,18 @@ ewl_container_child_append(EWL_CONTAINER(s->wins), s->cell); ewl_widget_show(s->cell); -#ifdef EWL_MEDIA_H - if (audio != 0) { - s->audio1 = ewl_media_new(); - ewl_container_child_append(EWL_CONTAINER(s->wins), s->audio1); - ewl_media_module_get(EWL_MEDIA(s->audio1)); - ewl_media_module_set(EWL_MEDIA(s->audio1), EWL_MEDIA_MODULE_XINE); - ewl_media_media_set(EWL_MEDIA(s->audio1), audios); - ewl_object_maximum_size_set(EWL_OBJECT(s->audio1), 1, 1); - ewl_widget_show(s->audio1); - } -#endif +printf("res %d\n", ewl_media_is_available()); +if ( ewl_media_is_available() ) { + if (audio != 0) { + s->audio1 = ewl_media_new(); + ewl_container_child_append(EWL_CONTAINER(s->wins), s->audio1); + ewl_media_module_get(EWL_MEDIA(s->audio1)); + ewl_media_module_set(EWL_MEDIA(s->audio1), EWL_MEDIA_MODULE_XINE); + ewl_media_media_set(EWL_MEDIA(s->audio1), audios); + ewl_object_maximum_size_set(EWL_OBJECT(s->audio1), 1, 1); + ewl_widget_show(s->audio1); + } +} /*******************************************************************/ /*******Start the slideshow*******/ ------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs