fwin windows have icon right now... :)
SVN revision: 30253
This commit is contained in:
parent
cac7d30b4a
commit
1995d88b51
1
TODO
1
TODO
|
@ -38,7 +38,6 @@ Some of the things (in very short form) that need to be done to E17...
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
* fm2 mv between fs's (removable to hd for example) doesn't work.
|
* fm2 mv between fs's (removable to hd for example) doesn't work.
|
||||||
* fm2 fwin windows need to use icon for that dir on window border
|
|
||||||
* fm2 theme needs to not suck
|
* fm2 theme needs to not suck
|
||||||
* fm2 custom icon view mode needs to have cleanup,align etc.
|
* fm2 custom icon view mode needs to have cleanup,align etc.
|
||||||
* fm2 custom icon view mode initial placement needs some fixing
|
* fm2 custom icon view mode initial placement needs some fixing
|
||||||
|
|
|
@ -2586,22 +2586,35 @@ e_border_icon_add(E_Border *bd, Evas *evas)
|
||||||
e_util_edje_icon_set(o, "enlightenment/e");
|
e_util_edje_icon_set(o, "enlightenment/e");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *ext;
|
if (!bd->internal_icon_key)
|
||||||
|
|
||||||
ext = strrchr(bd->internal_icon, '.');
|
|
||||||
if ((ext) && ((!strcmp(ext, ".edj"))))
|
|
||||||
{
|
{
|
||||||
if (!edje_object_file_set(o, bd->internal_icon, "icon"))
|
char *ext;
|
||||||
e_util_edje_icon_set(o, "enlightenment/e");
|
|
||||||
|
ext = strrchr(bd->internal_icon, '.');
|
||||||
|
if ((ext) && ((!strcmp(ext, ".edj"))))
|
||||||
|
{
|
||||||
|
if (!edje_object_file_set(o, bd->internal_icon, "icon"))
|
||||||
|
e_util_edje_icon_set(o, "enlightenment/e");
|
||||||
|
}
|
||||||
|
else if (ext)
|
||||||
|
{
|
||||||
|
evas_object_del(o);
|
||||||
|
o = e_icon_add(evas);
|
||||||
|
e_icon_file_set(o, bd->internal_icon);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!e_util_edje_icon_set(o, bd->internal_icon))
|
||||||
|
e_util_edje_icon_set(o, "enlightenment/e");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!e_util_edje_icon_set(o, bd->internal_icon))
|
edje_object_file_set(o, bd->internal_icon,
|
||||||
e_util_edje_icon_set(o, "enlightenment/e");
|
bd->internal_icon_key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (o)
|
return o;
|
||||||
return o;
|
|
||||||
}
|
}
|
||||||
if (e_config->use_app_icon)
|
if (e_config->use_app_icon)
|
||||||
{
|
{
|
||||||
|
@ -2612,6 +2625,7 @@ e_border_icon_add(E_Border *bd, Evas *evas)
|
||||||
bd->client.netwm.icons[0].width,
|
bd->client.netwm.icons[0].width,
|
||||||
bd->client.netwm.icons[0].height);
|
bd->client.netwm.icons[0].height);
|
||||||
e_icon_alpha_set(o, 1);
|
e_icon_alpha_set(o, 1);
|
||||||
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!o)
|
if (!o)
|
||||||
|
@ -2619,6 +2633,7 @@ e_border_icon_add(E_Border *bd, Evas *evas)
|
||||||
if (bd->desktop)
|
if (bd->desktop)
|
||||||
{
|
{
|
||||||
o = e_util_desktop_icon_add(bd->desktop, "24x24", evas);
|
o = e_util_desktop_icon_add(bd->desktop, "24x24", evas);
|
||||||
|
return o;
|
||||||
}
|
}
|
||||||
else if (bd->client.netwm.icons)
|
else if (bd->client.netwm.icons)
|
||||||
{
|
{
|
||||||
|
@ -2627,13 +2642,12 @@ e_border_icon_add(E_Border *bd, Evas *evas)
|
||||||
bd->client.netwm.icons[0].width,
|
bd->client.netwm.icons[0].width,
|
||||||
bd->client.netwm.icons[0].height);
|
bd->client.netwm.icons[0].height);
|
||||||
e_icon_alpha_set(o, 1);
|
e_icon_alpha_set(o, 1);
|
||||||
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!o)
|
|
||||||
{
|
o = edje_object_add(evas);
|
||||||
o = edje_object_add(evas);
|
e_util_edje_icon_set(o, "enlightenment/unknown");
|
||||||
e_util_edje_icon_set(o, "enlightenment/unknown");
|
|
||||||
}
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3159,6 +3173,7 @@ _e_border_free(E_Border *bd)
|
||||||
if (bd->client.netwm.icon_name) free(bd->client.netwm.icon_name);
|
if (bd->client.netwm.icon_name) free(bd->client.netwm.icon_name);
|
||||||
e_object_del(E_OBJECT(bd->shape));
|
e_object_del(E_OBJECT(bd->shape));
|
||||||
if (bd->internal_icon) evas_stringshare_del(bd->internal_icon);
|
if (bd->internal_icon) evas_stringshare_del(bd->internal_icon);
|
||||||
|
if (bd->internal_icon_key) evas_stringshare_del(bd->internal_icon_key);
|
||||||
if (bd->icon_object) evas_object_del(bd->icon_object);
|
if (bd->icon_object) evas_object_del(bd->icon_object);
|
||||||
evas_object_del(bd->bg_object);
|
evas_object_del(bd->bg_object);
|
||||||
e_canvas_del(bd->bg_ecore_evas);
|
e_canvas_del(bd->bg_ecore_evas);
|
||||||
|
|
|
@ -144,6 +144,7 @@ struct _E_Border
|
||||||
Evas_Object *icon_object;
|
Evas_Object *icon_object;
|
||||||
Ecore_X_Window event_win;
|
Ecore_X_Window event_win;
|
||||||
const char *internal_icon;
|
const char *internal_icon;
|
||||||
|
const char *internal_icon_key;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Ecore_X_Window shell_win;
|
Ecore_X_Window shell_win;
|
||||||
|
|
|
@ -208,6 +208,13 @@ e_fwin_new(E_Container *con, const char *dev, const char *path)
|
||||||
e_win_size_min_set(fwin->win, 24, 24);
|
e_win_size_min_set(fwin->win, 24, 24);
|
||||||
e_win_resize(fwin->win, 280, 200);
|
e_win_resize(fwin->win, 280, 200);
|
||||||
e_win_show(fwin->win);
|
e_win_show(fwin->win);
|
||||||
|
if (fwin->win->border)
|
||||||
|
{
|
||||||
|
if (fwin->win->border->internal_icon)
|
||||||
|
evas_stringshare_del(fwin->win->border->internal_icon);
|
||||||
|
fwin->win->border->internal_icon =
|
||||||
|
evas_stringshare_add("enlightenment/fileman");
|
||||||
|
}
|
||||||
|
|
||||||
return fwin;
|
return fwin;
|
||||||
}
|
}
|
||||||
|
@ -856,6 +863,7 @@ _e_fwin_file_exec(E_Fwin *fwin, E_Fm2_Icon_Info *ici, E_Fwin_Exec_Type ext)
|
||||||
static void
|
static void
|
||||||
_e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
|
_e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
|
||||||
{
|
{
|
||||||
|
E_Fwin *fwin2 = NULL;
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
Evas_Coord mw, mh;
|
Evas_Coord mw, mh;
|
||||||
Evas_Object *o, *ocon, *of, *oi, *mt;
|
Evas_Object *o, *ocon, *of, *oi, *mt;
|
||||||
|
@ -884,25 +892,25 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
|
||||||
if ((ici->link) && (ici->mount))
|
if ((ici->link) && (ici->mount))
|
||||||
{
|
{
|
||||||
if (fwin->win)
|
if (fwin->win)
|
||||||
e_fwin_new(fwin->win->container, ici->link, "/");
|
fwin2 = e_fwin_new(fwin->win->container, ici->link, "/");
|
||||||
else if (fwin->zone)
|
else if (fwin->zone)
|
||||||
e_fwin_new(fwin->zone->container, ici->link, "/");
|
fwin2 = e_fwin_new(fwin->zone->container, ici->link, "/");
|
||||||
}
|
}
|
||||||
else if ((ici->link) && (ici->removable))
|
else if ((ici->link) && (ici->removable))
|
||||||
{
|
{
|
||||||
if (fwin->win)
|
if (fwin->win)
|
||||||
e_fwin_new(fwin->win->container, ici->link, "/");
|
fwin2 = e_fwin_new(fwin->win->container, ici->link, "/");
|
||||||
else if (fwin->zone)
|
else if (fwin->zone)
|
||||||
e_fwin_new(fwin->zone->container, ici->link, "/");
|
fwin2 = e_fwin_new(fwin->zone->container, ici->link, "/");
|
||||||
}
|
}
|
||||||
else if (ici->real_link)
|
else if (ici->real_link)
|
||||||
{
|
{
|
||||||
if (S_ISDIR(ici->statinfo.st_mode))
|
if (S_ISDIR(ici->statinfo.st_mode))
|
||||||
{
|
{
|
||||||
if (fwin->win)
|
if (fwin->win)
|
||||||
e_fwin_new(fwin->win->container, NULL, ici->real_link);
|
fwin2 = e_fwin_new(fwin->win->container, NULL, ici->real_link);
|
||||||
else if (fwin->zone)
|
else if (fwin->zone)
|
||||||
e_fwin_new(fwin->zone->container, NULL, ici->real_link);
|
fwin2 = e_fwin_new(fwin->zone->container, NULL, ici->real_link);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
need_dia = 1;
|
need_dia = 1;
|
||||||
|
@ -914,13 +922,56 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
|
||||||
if (S_ISDIR(ici->statinfo.st_mode))
|
if (S_ISDIR(ici->statinfo.st_mode))
|
||||||
{
|
{
|
||||||
if (fwin->win)
|
if (fwin->win)
|
||||||
e_fwin_new(fwin->win->container, NULL, buf);
|
fwin2 = e_fwin_new(fwin->win->container, NULL, buf);
|
||||||
else
|
else
|
||||||
e_fwin_new(fwin->zone->container, NULL, buf);
|
fwin2 = e_fwin_new(fwin->zone->container, NULL, buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
need_dia = 1;
|
need_dia = 1;
|
||||||
}
|
}
|
||||||
|
if (fwin2)
|
||||||
|
{
|
||||||
|
if ((fwin2->win) && (fwin2->win->border))
|
||||||
|
{
|
||||||
|
Evas_Object *oic;
|
||||||
|
const char *itype = NULL;
|
||||||
|
|
||||||
|
oic = e_fm2_icon_get(evas_object_evas_get(fwin->fm_obj),
|
||||||
|
ici->ic, NULL, NULL, 0, &itype);
|
||||||
|
if (oic)
|
||||||
|
{
|
||||||
|
const char *file = NULL, *group = NULL;
|
||||||
|
|
||||||
|
if (fwin2->win->border->internal_icon)
|
||||||
|
evas_stringshare_del(fwin2->win->border->internal_icon);
|
||||||
|
fwin2->win->border->internal_icon = NULL;
|
||||||
|
if (fwin2->win->border->internal_icon_key)
|
||||||
|
evas_stringshare_del(fwin2->win->border->internal_icon_key);
|
||||||
|
fwin2->win->border->internal_icon_key = NULL;
|
||||||
|
|
||||||
|
if (!strcmp(evas_object_type_get(oic), "edje"))
|
||||||
|
{
|
||||||
|
edje_object_file_get(oic, &file, &group);
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
fwin2->win->border->internal_icon =
|
||||||
|
evas_stringshare_add(file);
|
||||||
|
if (group)
|
||||||
|
fwin2->win->border->internal_icon_key =
|
||||||
|
evas_stringshare_add(group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
file = e_icon_file_get(oic);
|
||||||
|
fwin2->win->border->internal_icon =
|
||||||
|
evas_stringshare_add(file);
|
||||||
|
}
|
||||||
|
evas_object_del(oic);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fwin2 = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!need_dia) return;
|
if (!need_dia) return;
|
||||||
need_dia = 0;
|
need_dia = 0;
|
||||||
|
|
Loading…
Reference in New Issue