aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2007-04-16 15:23:11 +0000
committerCarsten Haitzler <raster@rasterman.com>2007-04-16 15:23:11 +0000
commitbcf012f3c962b3f6f1d98af6dff1e91763ef71d5 (patch)
treebed17c52566a5896282ab6898ae6a1ecadd3fe27
parentRe-enable the "Add app to launcher" border menu item; fixed to use e_order (diff)
downloadenlightenment-bcf012f3c962b3f6f1d98af6dff1e91763ef71d5.tar.gz
allow custom scrollframes for fwins.
SVN revision: 29554
-rw-r--r--src/bin/e_fwin.c17
-rw-r--r--src/bin/e_scrollframe.c19
-rw-r--r--src/bin/e_scrollframe.h1
3 files changed, 35 insertions, 2 deletions
diff --git a/src/bin/e_fwin.c b/src/bin/e_fwin.c
index 622ac0b5c..8a54bf596 100644
--- a/src/bin/e_fwin.c
+++ b/src/bin/e_fwin.c
@@ -149,7 +149,9 @@ e_fwin_new(E_Container *con, const char *dev, const char *path)
* 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 @@ _e_fwin_changed(void *data, Evas_Object *obj, void *event_info)
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
diff --git a/src/bin/e_scrollframe.c b/src/bin/e_scrollframe.c
index e0e011f4f..c840662e4 100644
--- a/src/bin/e_scrollframe.c
+++ b/src/bin/e_scrollframe.c
@@ -166,6 +166,25 @@ e_scrollframe_custom_theme_set(Evas_Object *obj, char *custom_category, char *cu
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
diff --git a/src/bin/e_scrollframe.h b/src/bin/e_scrollframe.h
index 0d39c3b28..848937ee1 100644
--- a/src/bin/e_scrollframe.h
+++ b/src/bin/e_scrollframe.h
@@ -18,6 +18,7 @@ EAPI Evas_Object *e_scrollframe_add (Evas *evas);
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);