Enlightenment CVS committal Author : titan Project : e17 Module : proto
Dir : e17/proto/ephoto/src Modified Files: ephoto.c ephoto.h ephoto_callbacks.c Log Message: Browsing from the entry now works. =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -3 -r1.70 -r1.71 --- ephoto.c 6 Sep 2006 02:34:46 -0000 1.70 +++ ephoto.c 6 Sep 2006 03:02:02 -0000 1.71 @@ -105,6 +105,7 @@ m->entry = ewl_entry_new(); ewl_text_text_set(EWL_TEXT(m->entry), current_directory); ewl_container_child_append(EWL_CONTAINER(m->hbox), m->entry); + ewl_callback_append(m->entry, EWL_CALLBACK_VALUE_CHANGED, entry_change, NULL); ewl_widget_show(m->entry); m->hseparator = ewl_hseparator_new(); =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- ephoto.h 6 Sep 2006 02:34:46 -0000 1.35 +++ ephoto.h 6 Sep 2006 03:02:02 -0000 1.36 @@ -16,6 +16,7 @@ void populate_images(Ewl_Widget *w, void *event, void *data); void go_up(Ewl_Widget *w, void *event, void *data); void go_home(Ewl_Widget *w, void *event, void *data); +void entry_change(Ewl_Widget *w, void *event, void *data); typedef struct _Main Main; =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_callbacks.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ephoto_callbacks.c 6 Sep 2006 02:34:46 -0000 1.14 +++ ephoto_callbacks.c 6 Sep 2006 03:02:02 -0000 1.15 @@ -225,3 +225,18 @@ ewl_widget_name_set(m->viewer_freebox, new_dir); populate_images(m->viewer_freebox, NULL, NULL); } + +void entry_change(Ewl_Widget *w, void *event, void *data) +{ + char *new_dir; + new_dir = ewl_text_text_get(EWL_TEXT(w)); + if (ecore_file_is_dir(new_dir)) + { + ewl_widget_name_set(m->viewer_freebox, new_dir); + populate_images(m->viewer_freebox, NULL, NULL); + } + else + { + ewl_text_text_set(EWL_TEXT(m->entry), current_directory); + } +} ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs