forked from enlightenment/enlightenment
kind of bring fileman icons into some semblance of working
SVN revision: 18284
This commit is contained in:
parent
b0cd7dcbec
commit
9314e43b46
|
@ -914,74 +914,6 @@ group {
|
||||||
group {
|
group {
|
||||||
name: "fileman/icon_normal";
|
name: "fileman/icon_normal";
|
||||||
parts {
|
parts {
|
||||||
part {
|
|
||||||
name: "icon_box";
|
|
||||||
type: RECT;
|
|
||||||
mouse_events: 0;
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
visible: 1;
|
|
||||||
color: 128 128 128 128;
|
|
||||||
aspect: 1.0 1.0;
|
|
||||||
color: 0 0 0 0;
|
|
||||||
rel1 {
|
|
||||||
relative: 0.0 0.0;
|
|
||||||
offset: 0 0;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
to_y: "icon_title";
|
|
||||||
relative: 1.0 0.0;
|
|
||||||
offset: -1 -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part {
|
|
||||||
name: "icon_swallow";
|
|
||||||
type: SWALLOW;
|
|
||||||
mouse_events: 0;
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
fixed: 1 1;
|
|
||||||
rel1 {
|
|
||||||
to: "icon_box";
|
|
||||||
relative: 0.0 0.0;
|
|
||||||
offset: 2 2;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
to: "icon_box";
|
|
||||||
relative: 1.0 1.0;
|
|
||||||
offset: -3 -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part {
|
|
||||||
name: "icon_title";
|
|
||||||
type: TEXT;
|
|
||||||
effect: SHADOW;
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
align: 0.5 1.0;
|
|
||||||
fixed: 0 1;
|
|
||||||
rel1 {
|
|
||||||
relative: 0.0 1.0;
|
|
||||||
offset: 0 -1;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
relative: 1.0 1.0;
|
|
||||||
offset: -1 -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
color: 0 0 0 255;
|
|
||||||
color3: 255 255 255 128;
|
|
||||||
text {
|
|
||||||
text: "No Title";
|
|
||||||
align: 0.0 0.0;
|
|
||||||
size: 10;
|
|
||||||
font: "Vera";
|
|
||||||
min: 0 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part {
|
part {
|
||||||
name: "icon_overlay";
|
name: "icon_overlay";
|
||||||
mouse_events: 1;
|
mouse_events: 1;
|
||||||
|
@ -998,8 +930,8 @@ group {
|
||||||
}
|
}
|
||||||
image {
|
image {
|
||||||
normal: "e17_button.png";
|
normal: "e17_button.png";
|
||||||
|
border: 8 8 8 8;
|
||||||
}
|
}
|
||||||
color: 255 255 255 128;
|
|
||||||
}
|
}
|
||||||
description {
|
description {
|
||||||
state: "clicked" 0.0;
|
state: "clicked" 0.0;
|
||||||
|
@ -1007,6 +939,69 @@ group {
|
||||||
visible: 1;
|
visible: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
part {
|
||||||
|
name: "icon_box";
|
||||||
|
type: RECT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
visible: 1;
|
||||||
|
aspect: 1.0 1.0;
|
||||||
|
color: 0 0 0 0;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 6 6;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to_y: "icon_title";
|
||||||
|
relative: 1.0 0.0;
|
||||||
|
offset: -7 -3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "icon_swallow";
|
||||||
|
type: SWALLOW;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
to: "icon_box";
|
||||||
|
offset: 2 2;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "icon_box";
|
||||||
|
offset: -3 -3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "icon_title";
|
||||||
|
type: TEXT;
|
||||||
|
effect: SHADOW;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
align: 0.5 1.0;
|
||||||
|
fixed: 0 1;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 1.0;
|
||||||
|
offset: 6 -7;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -7 -7;
|
||||||
|
}
|
||||||
|
color: 0 0 0 255;
|
||||||
|
color3: 255 255 255 128;
|
||||||
|
text {
|
||||||
|
text: "No Title";
|
||||||
|
align: 0.0 0.0;
|
||||||
|
size: 10;
|
||||||
|
font: "Edje-Vera";
|
||||||
|
min: 0 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
part {
|
part {
|
||||||
name: "icon_event";
|
name: "icon_event";
|
||||||
type: RECT;
|
type: RECT;
|
||||||
|
@ -1015,11 +1010,11 @@ group {
|
||||||
state: "default" 0.0;
|
state: "default" 0.0;
|
||||||
rel1 {
|
rel1 {
|
||||||
relative: 0.0 0.0;
|
relative: 0.0 0.0;
|
||||||
offset: 0 0;
|
offset: 6 6;
|
||||||
}
|
}
|
||||||
rel2 {
|
rel2 {
|
||||||
relative: 1.0 1.0;
|
relative: 1.0 1.0;
|
||||||
offset: -1 -1;
|
offset: -7 -7;
|
||||||
}
|
}
|
||||||
color: 0 0 0 0;
|
color: 0 0 0 0;
|
||||||
}
|
}
|
||||||
|
@ -1034,11 +1029,11 @@ group {
|
||||||
offset: 5 -20;
|
offset: 5 -20;
|
||||||
}
|
}
|
||||||
rel2 {
|
rel2 {
|
||||||
relative: 1.0 1.0;
|
relative: 1.0 1.0;
|
||||||
offset: -6 -6;
|
offset: -6 -6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
programs {
|
programs {
|
||||||
program {
|
program {
|
||||||
|
|
|
@ -19,7 +19,6 @@ struct _E_Smart_Data
|
||||||
Evas_Object *icon_object;
|
Evas_Object *icon_object;
|
||||||
Evas_Object *image_object;
|
Evas_Object *image_object;
|
||||||
Evas_Object *entry_object;
|
Evas_Object *entry_object;
|
||||||
Evas_Object *title_object;
|
|
||||||
Evas_Object *thumb_object;
|
Evas_Object *thumb_object;
|
||||||
|
|
||||||
E_Fm_File *file;
|
E_Fm_File *file;
|
||||||
|
@ -34,6 +33,8 @@ static void _e_fm_icon_smart_add (Evas_Object *obj);
|
||||||
static void _e_fm_icon_smart_del (Evas_Object *obj);
|
static void _e_fm_icon_smart_del (Evas_Object *obj);
|
||||||
static void _e_fm_icon_smart_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
static void _e_fm_icon_smart_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
||||||
static void _e_fm_icon_smart_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
static void _e_fm_icon_smart_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||||
|
static void _e_fm_icon_smart_show (Evas_Object *obj);
|
||||||
|
static void _e_fm_icon_smart_hide (Evas_Object *obj);
|
||||||
static void _e_fm_icon_smart_clip_set (Evas_Object *obj, Evas_Object *clip);
|
static void _e_fm_icon_smart_clip_set (Evas_Object *obj, Evas_Object *clip);
|
||||||
static void _e_fm_icon_smart_clip_unset (Evas_Object *obj);
|
static void _e_fm_icon_smart_clip_unset (Evas_Object *obj);
|
||||||
|
|
||||||
|
@ -91,8 +92,8 @@ e_fm_icon_add(Evas *evas)
|
||||||
NULL, NULL, NULL, NULL, NULL,
|
NULL, NULL, NULL, NULL, NULL,
|
||||||
_e_fm_icon_smart_move,
|
_e_fm_icon_smart_move,
|
||||||
_e_fm_icon_smart_resize,
|
_e_fm_icon_smart_resize,
|
||||||
NULL,
|
_e_fm_icon_smart_show,
|
||||||
NULL,
|
_e_fm_icon_smart_hide,
|
||||||
NULL,
|
NULL,
|
||||||
_e_fm_icon_smart_clip_set,
|
_e_fm_icon_smart_clip_set,
|
||||||
_e_fm_icon_smart_clip_unset,
|
_e_fm_icon_smart_clip_unset,
|
||||||
|
@ -138,12 +139,23 @@ e_fm_icon_file_set(Evas_Object *obj, E_Fm_File *file)
|
||||||
sd->iw,
|
sd->iw,
|
||||||
sd->ih,
|
sd->ih,
|
||||||
1);
|
1);
|
||||||
evas_object_smart_member_add(sd->thumb_object, sd->obj);
|
// evas_object_geometry_get(sd->thumb_object, NULL, NULL, &icon_w, &icon_h);
|
||||||
|
// sd->iw = icon_w;
|
||||||
|
// sd->ih = icon_h;
|
||||||
sd->image_object = edje_object_add(sd->evas);
|
sd->image_object = edje_object_add(sd->evas);
|
||||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
||||||
"fileman/icon_thumb");
|
"fileman/icon_thumb");
|
||||||
|
edje_extern_object_min_size_set(sd->thumb_object, sd->iw, sd->ih);
|
||||||
|
edje_extern_object_max_size_set(sd->thumb_object, sd->iw, sd->ih);
|
||||||
edje_object_part_swallow(sd->image_object, "icon_swallow",
|
edje_object_part_swallow(sd->image_object, "icon_swallow",
|
||||||
sd->thumb_object);
|
sd->thumb_object);
|
||||||
|
edje_object_size_min_calc(sd->image_object, &icon_w, &icon_h);
|
||||||
|
sd->iw = icon_w;
|
||||||
|
sd->ih = icon_h;
|
||||||
|
edje_extern_object_min_size_set(sd->image_object, icon_w, icon_h);
|
||||||
|
edje_extern_object_max_size_set(sd->image_object, icon_w, icon_h);
|
||||||
|
edje_object_part_swallow(sd->icon_object, "icon_swallow",
|
||||||
|
sd->image_object);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -156,11 +168,10 @@ e_fm_icon_file_set(Evas_Object *obj, E_Fm_File *file)
|
||||||
{
|
{
|
||||||
_e_fm_icon_icon_mime_get(sd);
|
_e_fm_icon_icon_mime_get(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
_e_fm_icon_type_set(sd);
|
_e_fm_icon_type_set(sd);
|
||||||
evas_object_resize(sd->icon_object, 64, 64);
|
edje_object_size_min_calc(sd->icon_object, &icon_w, &icon_h);
|
||||||
evas_object_resize(sd->event_object, 64, 64);
|
evas_object_resize(sd->obj, 0, 0); // because it still thinks its the same size
|
||||||
evas_object_resize(sd->obj, 64, 64);
|
evas_object_resize(sd->obj, 64, icon_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -242,28 +253,6 @@ e_fm_icon_assoc_set(Evas_Object *obj, const char *assoc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
e_fm_icon_image_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
|
||||||
{
|
|
||||||
E_Smart_Data *sd;
|
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
|
||||||
if (!sd) return;
|
|
||||||
sd->iw = w;
|
|
||||||
sd->ih = h;
|
|
||||||
evas_object_resize(sd->image_object, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
e_fm_icon_size_min_calc(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
|
|
||||||
{
|
|
||||||
E_Smart_Data *sd;
|
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
|
||||||
if (!sd) return;
|
|
||||||
edje_object_size_min_calc(sd->icon_object, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void
|
static void
|
||||||
_e_fm_icon_smart_add(Evas_Object *obj)
|
_e_fm_icon_smart_add(Evas_Object *obj)
|
||||||
|
@ -281,23 +270,18 @@ _e_fm_icon_smart_add(Evas_Object *obj)
|
||||||
sd->h = 64;
|
sd->h = 64;
|
||||||
sd->iw = 48;
|
sd->iw = 48;
|
||||||
sd->ih = 48;
|
sd->ih = 48;
|
||||||
sd->event_object = evas_object_rectangle_add(sd->evas);
|
|
||||||
evas_object_color_set(sd->event_object, 0, 0, 0, 0);
|
|
||||||
evas_object_smart_member_add(sd->event_object, obj);
|
|
||||||
evas_object_show(sd->event_object);
|
|
||||||
evas_object_smart_data_set(obj, sd);
|
|
||||||
|
|
||||||
sd->title_object = evas_object_textblock_add(sd->evas);
|
|
||||||
evas_object_smart_member_add(sd->title_object, obj);
|
|
||||||
|
|
||||||
sd->visible = 1;
|
|
||||||
sd->icon_object = edje_object_add(sd->evas);
|
sd->icon_object = edje_object_add(sd->evas);
|
||||||
evas_object_smart_member_add(sd->icon_object, obj);
|
evas_object_smart_member_add(sd->icon_object, obj);
|
||||||
|
|
||||||
evas_object_show(sd->icon_object);
|
sd->event_object = evas_object_rectangle_add(sd->evas);
|
||||||
evas_object_show(sd->event_object);
|
evas_object_color_set(sd->event_object, 0, 0, 0, 0);
|
||||||
}
|
evas_object_smart_member_add(sd->event_object, obj);
|
||||||
|
evas_object_smart_data_set(obj, sd);
|
||||||
|
|
||||||
|
sd->visible = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_fm_icon_smart_del(Evas_Object *obj)
|
_e_fm_icon_smart_del(Evas_Object *obj)
|
||||||
|
@ -306,32 +290,10 @@ _e_fm_icon_smart_del(Evas_Object *obj)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
if (sd->entry_object) edje_object_part_unswallow(sd->icon_object, sd->entry_object);
|
if (sd->event_object) evas_object_del(sd->event_object);
|
||||||
if (sd->event_object)
|
if (sd->icon_object) evas_object_del(sd->icon_object);
|
||||||
{
|
if (sd->image_object) evas_object_del(sd->image_object);
|
||||||
evas_object_smart_member_del(sd->event_object);
|
if (sd->thumb_object) evas_object_del(sd->thumb_object);
|
||||||
evas_object_del(sd->event_object);
|
|
||||||
}
|
|
||||||
if (sd->icon_object)
|
|
||||||
{
|
|
||||||
evas_object_smart_member_del(sd->icon_object);
|
|
||||||
evas_object_del(sd->icon_object);
|
|
||||||
}
|
|
||||||
if (sd->image_object)
|
|
||||||
{
|
|
||||||
evas_object_smart_member_del(sd->image_object);
|
|
||||||
evas_object_del(sd->image_object);
|
|
||||||
}
|
|
||||||
if (sd->title_object)
|
|
||||||
{
|
|
||||||
evas_object_smart_member_del(sd->title_object);
|
|
||||||
evas_object_del(sd->title_object);
|
|
||||||
}
|
|
||||||
if (sd->thumb_object)
|
|
||||||
{
|
|
||||||
evas_object_smart_member_del(sd->thumb_object);
|
|
||||||
evas_object_del(sd->thumb_object);
|
|
||||||
}
|
|
||||||
E_FREE(sd->saved_title);
|
E_FREE(sd->saved_title);
|
||||||
if (sd->file) e_object_unref(E_OBJECT(sd->file));
|
if (sd->file) e_object_unref(E_OBJECT(sd->file));
|
||||||
free(sd);
|
free(sd);
|
||||||
|
@ -344,14 +306,11 @@ _e_fm_icon_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
if ((sd->x == x) && (sd->y == y)) return;
|
||||||
if(sd->x == x && sd->y == y) return;
|
|
||||||
|
|
||||||
evas_object_move(sd->event_object, x, y);
|
|
||||||
if (sd->icon_object) evas_object_move(sd->icon_object, x, y);
|
|
||||||
//if (sd->image_object) evas_object_move(sd->image_object, x, y);
|
|
||||||
sd->x = x;
|
sd->x = x;
|
||||||
sd->y = y;
|
sd->y = y;
|
||||||
|
evas_object_move(sd->event_object, x, y);
|
||||||
|
evas_object_move(sd->icon_object, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -361,17 +320,33 @@ _e_fm_icon_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
if ((sd->w == w) && (sd->h == h)) return;
|
||||||
if(sd->w == w && sd->h == h) return;
|
|
||||||
|
|
||||||
sd->w = w;
|
sd->w = w;
|
||||||
if(sd->h < h)
|
sd->h = h;
|
||||||
sd->h = h;
|
|
||||||
|
|
||||||
evas_object_resize(sd->event_object, sd->w, sd->h);
|
evas_object_resize(sd->event_object, sd->w, sd->h);
|
||||||
if (sd->icon_object) evas_object_resize(sd->icon_object, sd->w, sd->h);
|
evas_object_resize(sd->icon_object, sd->w, sd->h);
|
||||||
printf("resize to %d %d\n", sd->w, sd->h);
|
}
|
||||||
//if (sd->image_object) evas_object_resize(sd->image_object, w, h);
|
|
||||||
|
static void
|
||||||
|
_e_fm_icon_smart_show(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
|
evas_object_show(sd->icon_object);
|
||||||
|
evas_object_show(sd->event_object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_fm_icon_smart_hide(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
E_Smart_Data *sd;
|
||||||
|
|
||||||
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
|
evas_object_hide(sd->icon_object);
|
||||||
|
evas_object_hide(sd->event_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -381,7 +356,6 @@ _e_fm_icon_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
|
||||||
evas_object_clip_set(sd->event_object, clip);
|
evas_object_clip_set(sd->event_object, clip);
|
||||||
evas_object_clip_set(sd->icon_object, clip);
|
evas_object_clip_set(sd->icon_object, clip);
|
||||||
}
|
}
|
||||||
|
@ -393,20 +367,19 @@ _e_fm_icon_smart_clip_unset(Evas_Object *obj)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
|
||||||
evas_object_clip_unset(sd->event_object);
|
evas_object_clip_unset(sd->event_object);
|
||||||
|
evas_object_clip_unset(sd->icon_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_fm_icon_icon_mime_get(E_Smart_Data *sd)
|
_e_fm_icon_icon_mime_get(E_Smart_Data *sd)
|
||||||
{
|
{
|
||||||
sd->image_object = edje_object_add(sd->evas);
|
Evas_Coord icon_w, icon_h;
|
||||||
|
|
||||||
|
sd->image_object = edje_object_add(sd->evas);
|
||||||
if (sd->file->type == E_FM_FILE_TYPE_DIRECTORY)
|
if (sd->file->type == E_FM_FILE_TYPE_DIRECTORY)
|
||||||
{
|
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
||||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
"icons/fileman/folder");
|
||||||
"icons/fileman/folder");
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *ext;
|
char *ext;
|
||||||
|
@ -419,22 +392,21 @@ _e_fm_icon_icon_mime_get(E_Smart_Data *sd)
|
||||||
|
|
||||||
ext = strdup(ext);
|
ext = strdup(ext);
|
||||||
ext2 = ext;
|
ext2 = ext;
|
||||||
for (; *ext2; ext2++)
|
for (; *ext2; ext2++) *ext2 = tolower(*ext2);
|
||||||
*ext2 = tolower(*ext2);
|
|
||||||
|
|
||||||
snprintf(part, PATH_MAX, "icons/fileman/%s", (ext + 1));
|
snprintf(part, PATH_MAX, "icons/fileman/%s", (ext + 1));
|
||||||
|
|
||||||
if (!e_theme_edje_object_set(sd->image_object, "base/theme/fileman", part))
|
if (!e_theme_edje_object_set(sd->image_object, "base/theme/fileman", part))
|
||||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman", "icons/fileman/file");
|
e_theme_edje_object_set(sd->image_object, "base/theme/fileman", "icons/fileman/file");
|
||||||
|
|
||||||
free(ext);
|
free(ext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman", "icons/fileman/file");
|
e_theme_edje_object_set(sd->image_object, "base/theme/fileman", "icons/fileman/file");
|
||||||
}
|
}
|
||||||
evas_object_resize(sd->image_object, sd->iw, sd->ih);
|
evas_object_show(sd->image_object);
|
||||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||||
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
||||||
|
edje_object_part_swallow(sd->icon_object, "icon_swallow",
|
||||||
|
sd->image_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -480,6 +452,8 @@ _e_fm_icon_thumb_cb_exe_exit(void *data, int type, void *event)
|
||||||
|
|
||||||
if ((ext) || (ecore_file_exists(sd->thumb_path)))
|
if ((ext) || (ecore_file_exists(sd->thumb_path)))
|
||||||
{
|
{
|
||||||
|
Evas_Coord icon_w, icon_h;
|
||||||
|
|
||||||
if (sd->image_object) evas_object_del(sd->image_object);
|
if (sd->image_object) evas_object_del(sd->image_object);
|
||||||
|
|
||||||
sd->thumb_object = e_thumb_evas_object_get(sd->file->path,
|
sd->thumb_object = e_thumb_evas_object_get(sd->file->path,
|
||||||
|
@ -487,19 +461,25 @@ _e_fm_icon_thumb_cb_exe_exit(void *data, int type, void *event)
|
||||||
sd->iw,
|
sd->iw,
|
||||||
sd->ih,
|
sd->ih,
|
||||||
1);
|
1);
|
||||||
evas_object_smart_member_add(sd->thumb_object, sd->obj);
|
// evas_object_geometry_get(sd->thumb_object, NULL, NULL, &icon_w, &icon_h);
|
||||||
|
// sd->iw = icon_w;
|
||||||
|
// sd->ih = icon_h;
|
||||||
sd->image_object = edje_object_add(sd->evas);
|
sd->image_object = edje_object_add(sd->evas);
|
||||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
||||||
"fileman/icon_thumb");
|
"fileman/icon_thumb");
|
||||||
|
evas_object_show(sd->image_object);
|
||||||
|
evas_object_show(sd->thumb_object);
|
||||||
|
edje_extern_object_min_size_set(sd->thumb_object, sd->iw, sd->ih);
|
||||||
|
edje_extern_object_max_size_set(sd->thumb_object, sd->iw, sd->ih);
|
||||||
edje_object_part_swallow(sd->image_object, "icon_swallow",
|
edje_object_part_swallow(sd->image_object, "icon_swallow",
|
||||||
sd->thumb_object);
|
sd->thumb_object);
|
||||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
edje_object_size_min_calc(sd->image_object, &icon_w, &icon_h);
|
||||||
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
sd->iw = icon_w;
|
||||||
|
sd->ih = icon_h;
|
||||||
|
edje_extern_object_min_size_set(sd->image_object, icon_w, icon_h);
|
||||||
|
edje_extern_object_max_size_set(sd->image_object, icon_w, icon_h);
|
||||||
edje_object_part_swallow(sd->icon_object, "icon_swallow",
|
edje_object_part_swallow(sd->icon_object, "icon_swallow",
|
||||||
sd->image_object);
|
sd->image_object);
|
||||||
// edje_object_part_swallow(sd->icon_object, "icon_title",
|
|
||||||
// sd->title_object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pid = -1;
|
pid = -1;
|
||||||
|
@ -510,7 +490,7 @@ _e_fm_icon_thumb_cb_exe_exit(void *data, int type, void *event)
|
||||||
static void
|
static void
|
||||||
_e_fm_icon_type_set(E_Smart_Data *sd)
|
_e_fm_icon_type_set(E_Smart_Data *sd)
|
||||||
{
|
{
|
||||||
switch(sd->type)
|
switch (sd->type)
|
||||||
{
|
{
|
||||||
case E_FM_ICON_NORMAL:
|
case E_FM_ICON_NORMAL:
|
||||||
e_theme_edje_object_set(sd->icon_object, "base/theme/fileman",
|
e_theme_edje_object_set(sd->icon_object, "base/theme/fileman",
|
||||||
|
@ -532,12 +512,12 @@ _e_fm_icon_type_set(E_Smart_Data *sd)
|
||||||
{
|
{
|
||||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||||
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
||||||
edje_object_part_swallow(sd->icon_object, "icon_swallow", sd->image_object);
|
edje_object_part_swallow(sd->icon_object, "icon_swallow",
|
||||||
evas_object_smart_member_add(sd->image_object, sd->obj);
|
sd->image_object);
|
||||||
evas_object_show(sd->image_object);
|
evas_object_show(sd->image_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sd->saved_title)
|
if (sd->saved_title)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
Evas_Textblock_Style *e_editable_text_style;
|
Evas_Textblock_Style *e_editable_text_style;
|
||||||
|
|
|
@ -615,6 +615,7 @@ _e_fm_smart_del(Evas_Object *object)
|
||||||
sd->event_handlers = evas_list_remove_list(sd->event_handlers, sd->event_handlers);
|
sd->event_handlers = evas_list_remove_list(sd->event_handlers, sd->event_handlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
evas_event_freeze(evas_object_evas_get(object));
|
||||||
while (sd->files)
|
while (sd->files)
|
||||||
{
|
{
|
||||||
_e_fm_file_free(sd->files->data);
|
_e_fm_file_free(sd->files->data);
|
||||||
|
@ -628,6 +629,8 @@ _e_fm_smart_del(Evas_Object *object)
|
||||||
if (sd->entry_object) evas_object_del(sd->entry_object);
|
if (sd->entry_object) evas_object_del(sd->entry_object);
|
||||||
if (sd->menu) e_object_del(E_OBJECT(sd->menu));
|
if (sd->menu) e_object_del(E_OBJECT(sd->menu));
|
||||||
|
|
||||||
|
evas_event_thaw(evas_object_evas_get(object));
|
||||||
|
|
||||||
free(sd->dir);
|
free(sd->dir);
|
||||||
free(sd);
|
free(sd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,9 +357,10 @@ e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord hei
|
||||||
|
|
||||||
im = e_icon_add(evas);
|
im = e_icon_add(evas);
|
||||||
e_icon_file_key_set(im, thumb, "/thumbnail/data");
|
e_icon_file_key_set(im, thumb, "/thumbnail/data");
|
||||||
if (shrink)
|
if (shrink)
|
||||||
{
|
{
|
||||||
Evas_Coord sw, sh;
|
Evas_Coord sw, sh;
|
||||||
|
|
||||||
e_icon_size_get(im, &sw, &sh);
|
e_icon_size_get(im, &sw, &sh);
|
||||||
evas_object_resize(im, sw, sh);
|
evas_object_resize(im, sw, sh);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue