Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_fwin.c e_scrollframe.c e_scrollframe.h Log Message: allow custom scrollframes for fwins. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- e_fwin.c 16 Apr 2007 09:44:40 -0000 1.35 +++ e_fwin.c 16 Apr 2007 15:23:11 -0000 1.36 @@ -149,7 +149,9 @@ * a way to set an edje file directly */ /* FIXME: allow specialised scrollframe obj per dir - get from e config, - * then look in the dir itself for a magic dot-file, if not - use theme + * then look in the dir itself for a magic dot-file, if not - use theme. + * same as currently done for bg & overlay. also add to fm2 the ability + * to specify the .edj files to get the list and icon theme stuff from */ e_scrollframe_custom_theme_set(o, "base/theme/fileman", "e/fileman/scrollframe/default"); @@ -266,7 +268,18 @@ evas_object_show(fwin->over_obj); } if (fwin->scrollframe_obj) - e_scrollframe_child_pos_set(fwin->scrollframe_obj, 0, 0); + { + snprintf(buf, sizeof(buf), "%s/.directory-scrollframe.edj", + e_fm2_real_path_get(fwin->fm_obj)); + if (e_util_edje_collection_exists(buf, "e/fileman/scrollframe/default")) + e_scrollframe_custom_edje_file_set(fwin->scrollframe_obj, buf, + "e/fileman/scrollframe/default"); + else + e_scrollframe_custom_theme_set(fwin->scrollframe_obj, + "base/theme/fileman", + "e/fileman/scrollframe/default"); + e_scrollframe_child_pos_set(fwin->scrollframe_obj, 0, 0); + } } static void =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_scrollframe.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_scrollframe.c 4 Sep 2006 22:33:20 -0000 1.14 +++ e_scrollframe.c 16 Apr 2007 15:23:11 -0000 1.15 @@ -166,6 +166,25 @@ API_ENTRY return; e_theme_edje_object_set(sd->edje_obj, custom_category, custom_group); + if (sd->pan_obj) + edje_object_part_swallow(sd->edje_obj, "e.swallow.content", sd->pan_obj); + sd->vbar_visible = !sd->vbar_visible; + sd->hbar_visible = !sd->hbar_visible; + _e_smart_scrollbar_bar_visibility_adjust(sd); +} + +EAPI void +e_scrollframe_custom_edje_file_set(Evas_Object *obj, char *file, char *group) +{ + Evas_Coord w, h; + API_ENTRY return; + + edje_object_file_set(sd->edje_obj, file, group); + if (sd->pan_obj) + edje_object_part_swallow(sd->edje_obj, "e.swallow.content", sd->pan_obj); + sd->vbar_visible = !sd->vbar_visible; + sd->hbar_visible = !sd->hbar_visible; + _e_smart_scrollbar_bar_visibility_adjust(sd); } EAPI void =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_scrollframe.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_scrollframe.h 6 Nov 2005 08:03:13 -0000 1.4 +++ e_scrollframe.h 16 Apr 2007 15:23:11 -0000 1.5 @@ -18,6 +18,7 @@ EAPI void e_scrollframe_child_set (Evas_Object *obj, Evas_Object *child); EAPI void e_scrollframe_extern_pan_set (Evas_Object *obj, Evas_Object *pan, void (*pan_set) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*pan_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_max_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_child_size_get) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)); EAPI void e_scrollframe_custom_theme_set (Evas_Object *obj, char *custom_category, char *custom_group); +EAPI void e_scrollframe_custom_edje_file_set (Evas_Object *obj, char *file, char *group); EAPI void e_scrollframe_child_pos_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y); EAPI void e_scrollframe_child_pos_get (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); EAPI void e_scrollframe_child_region_show (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs