Per Devilhorns:
- Formatting - Use PATH_MAX where needed SVN revision: 34110
This commit is contained in:
parent
99b2aef6a0
commit
dd441b580e
|
@ -9,9 +9,9 @@ struct _E_Widget_Data
|
||||||
Evas_Object *obj, *o_frame, *img, *o_thumb, *o_extern;
|
Evas_Object *obj, *o_frame, *img, *o_thumb, *o_extern;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* local subsystem functions */
|
||||||
static void _e_wid_del_hook(Evas_Object *obj);
|
static void _e_wid_del_hook(Evas_Object *obj);
|
||||||
static void _e_wid_preview_thumb_gen(void *data, Evas_Object *obj, void *event_info);
|
static void _e_wid_preview_thumb_gen(void *data, Evas_Object *obj, void *event_info);
|
||||||
/* local subsystem functions */
|
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
|
@ -24,13 +24,13 @@ e_widget_preview_add(Evas *evas, int minw, int minh)
|
||||||
obj = e_widget_add(evas);
|
obj = e_widget_add(evas);
|
||||||
e_widget_del_hook_set(obj, _e_wid_del_hook);
|
e_widget_del_hook_set(obj, _e_wid_del_hook);
|
||||||
wd = calloc(1, sizeof(E_Widget_Data));
|
wd = calloc(1, sizeof(E_Widget_Data));
|
||||||
|
if (!wd) return NULL;
|
||||||
|
|
||||||
wd->obj = obj;
|
wd->obj = obj;
|
||||||
|
|
||||||
o = edje_object_add(evas);
|
o = edje_object_add(evas);
|
||||||
wd->o_frame = o;
|
wd->o_frame = o;
|
||||||
e_theme_edje_object_set(o, "base/theme/widgets",
|
e_theme_edje_object_set(o, "base/theme/widgets", "e/widgets/preview");
|
||||||
"e/widgets/preview");
|
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
e_widget_sub_object_add(obj, o);
|
e_widget_sub_object_add(obj, o);
|
||||||
e_widget_resize_object_set(obj, o);
|
e_widget_resize_object_set(obj, o);
|
||||||
|
@ -77,13 +77,13 @@ e_widget_preview_file_set(Evas_Object *obj, const char *file, const char *key)
|
||||||
E_Widget_Data *wd;
|
E_Widget_Data *wd;
|
||||||
|
|
||||||
wd = e_widget_data_get(obj);
|
wd = e_widget_data_get(obj);
|
||||||
|
|
||||||
if (wd->o_thumb) evas_object_del(wd->o_thumb);
|
if (wd->o_thumb) evas_object_del(wd->o_thumb);
|
||||||
|
|
||||||
wd->o_thumb = e_icon_add(e_livethumb_evas_get(wd->img));
|
wd->o_thumb = e_icon_add(e_livethumb_evas_get(wd->img));
|
||||||
e_icon_file_key_set(wd->o_thumb, file, key);
|
e_icon_file_key_set(wd->o_thumb, file, key);
|
||||||
evas_object_show(wd->o_thumb);
|
evas_object_show(wd->o_thumb);
|
||||||
e_livethumb_thumb_set(wd->img, wd->o_thumb);
|
e_livethumb_thumb_set(wd->img, wd->o_thumb);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,6 @@ e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char *key,
|
||||||
E_Widget_Data *wd;
|
E_Widget_Data *wd;
|
||||||
|
|
||||||
wd = e_widget_data_get(obj);
|
wd = e_widget_data_get(obj);
|
||||||
|
|
||||||
if (wd->img)
|
if (wd->img)
|
||||||
{
|
{
|
||||||
e_widget_sub_object_del(obj, wd->img);
|
e_widget_sub_object_del(obj, wd->img);
|
||||||
|
@ -120,6 +119,7 @@ e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char *key,
|
||||||
|
|
||||||
edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
|
edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
|
||||||
evas_object_show(wd->img);
|
evas_object_show(wd->img);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,7 @@ e_widget_preview_edje_set(Evas_Object *obj, const char *file, const char *group)
|
||||||
ret = edje_object_file_set(wd->o_thumb, file, group);
|
ret = edje_object_file_set(wd->o_thumb, file, group);
|
||||||
evas_object_show(wd->o_thumb);
|
evas_object_show(wd->o_thumb);
|
||||||
e_livethumb_thumb_set(wd->img, wd->o_thumb);
|
e_livethumb_thumb_set(wd->img, wd->o_thumb);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue