Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_apps.c e_fm.c e_fm.h
Log Message:
working on fav icons
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -3 -r1.167 -r1.168
--- e_apps.c 3 Sep 2006 12:43:08 -0000 1.167
+++ e_apps.c 3 Sep 2006 15:57:13 -0000 1.168
@@ -283,8 +283,8 @@
e_app_fields_fill(a, path);
/* no exe field.. not valid. drop it */
- if (!_e_app_exe_valid_get(a->exe))
- goto error;
+// if (!_e_app_exe_valid_get(a->exe))
+// goto error;
}
else
goto error;
@@ -1572,36 +1572,38 @@
{
Evas_Object *o = NULL;
- if (a->icon_path)
- o = _e_app_icon_path_add(evas, a);
+ printf("a->icon_path = %s\n", a->icon_path);
+ if ((a->icon_path) && (a->icon_path[0] != 0))
+ o = _e_app_icon_path_add(evas, a);
else
- {
- o = edje_object_add(evas);
- if (!e_util_edje_icon_list_set(o, a->icon_class))
- {
- if (edje_object_file_set(o, a->path, "icon"))
- {
- ; /* It's a bit more obvious this way. */
- }
- else if (a->icon_class) /* If that fails, then this might be
an FDO icon. */
- {
- char *v;
-
- /* FIXME: Use a real icon size. */
- v = (char *) ecore_desktop_icon_find(a->icon_class, NULL,
e_config->icon_theme);
- if (v)
- a->icon_path = evas_stringshare_add(v);
- }
-
- if (a->icon_path)
- {
- /* Free the aborted object first. */
- if (o) evas_object_del(o);
- o = _e_app_icon_path_add(evas, a);
- }
- }
- }
-
+ {
+ o = edje_object_add(evas);
+ printf("a->icon_class = %s\n", a->icon_class);
+ if (!e_util_edje_icon_list_set(o, a->icon_class))
+ {
+ printf("a->path = %s\n", a->path);
+ if (edje_object_file_set(o, a->path, "icon"))
+ {
+ ; /* It's a bit more obvious this way. */
+ }
+ else if (a->icon_class) /* If that fails, then this might be an
FDO icon. */
+ {
+ char *v;
+
+ /* FIXME: Use a real icon size. */
+ v = (char *) ecore_desktop_icon_find(a->icon_class, NULL,
e_config->icon_theme);
+ if (v)
+ a->icon_path = evas_stringshare_add(v);
+ }
+
+ if (a->icon_path)
+ {
+ /* Free the aborted object first. */
+ if (o) evas_object_del(o);
+ o = _e_app_icon_path_add(evas, a);
+ }
+ }
+ }
return o;
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- e_fm.c 3 Sep 2006 10:31:21 -0000 1.50
+++ e_fm.c 3 Sep 2006 15:57:13 -0000 1.51
@@ -1258,7 +1258,7 @@
free(ic);
return NULL;
}
- ic->info.link =
evas_stringshare_add(sd->config->view.extra_file_source);
+ ic->info.pseudo_dir =
evas_stringshare_add(sd->config->view.extra_file_source);
ic->info.pseudo_link = 1;
}
}
@@ -1392,6 +1392,7 @@
if (ic->info.generic) evas_stringshare_del(ic->info.generic);
if (ic->info.icon) evas_stringshare_del(ic->info.icon);
if (ic->info.link) evas_stringshare_del(ic->info.link);
+ if (ic->info.pseudo_dir) evas_stringshare_del(ic->info.pseudo_dir);
free(ic);
}
@@ -1555,7 +1556,7 @@
ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj));
e_util_edje_icon_set(ic->obj_icon, ic->info.icon);
}
- edje_object_part_swallow(ic->obj, "e.swallow.icon",
ic->obj_icon);
+ edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon);
evas_object_show(ic->obj_icon);
return;
}
@@ -1582,7 +1583,7 @@
)
{
if (ic->info.pseudo_link)
- snprintf(buf, sizeof(buf), "%s/%s", ic->info.link,
ic->info.file);
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir,
ic->info.file);
else
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath,
ic->info.file);
ic->obj_icon =
e_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
@@ -1620,7 +1621,7 @@
)
{
if (ic->info.pseudo_link)
- snprintf(buf, sizeof(buf), "%s/%s", ic->info.link,
ic->info.file);
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir,
ic->info.file);
else
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath,
ic->info.file);
ic->obj_icon =
e_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
@@ -1639,7 +1640,7 @@
)
{
if (ic->info.pseudo_link)
- snprintf(buf, sizeof(buf), "%s/%s", ic->info.link,
ic->info.file);
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir,
ic->info.file);
else
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath,
ic->info.file);
ic->obj_icon =
edje_object_add(evas_object_evas_get(ic->sd->obj));
@@ -1654,20 +1655,20 @@
E_App *app;
if (ic->info.pseudo_link)
- {
- /* FIXME: first one should be correct I think, but it
isn't. */
-// snprintf(buf, sizeof(buf), "%s/%s", ic->info.link,
ic->info.file);
- snprintf(buf, sizeof(buf), "%s", ic->info.link);
- }
+ {
+ /* FIXME: first one should be correct I think, but it
isn't. */
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir,
ic->info.file);
+ }
else
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath,
ic->info.file);
-//printf("ICON FOR APP (%s) %s - %s - %s - %s\n",
((ic->info.pseudo_link) ? "pseudo" : "real" ), buf, ic->info.link,
ic->info.file, ic->sd->realpath);
+ //printf("ICON FOR APP (%s) %s - %s - %s - %s\n",
((ic->info.pseudo_link) ? "pseudo" : "real" ), buf, ic->info.pseudo_dir,
ic->info.file, ic->sd->realpath);
app = e_app_new(buf, 0);
+ printf("ic: %s = %p\n", buf, app);
if (app)
- {
- ic->obj_icon =
e_app_icon_add(evas_object_evas_get(ic->sd->obj), app);
- e_object_unref(E_OBJECT(app));
- }
+ {
+ ic->obj_icon =
e_app_icon_add(evas_object_evas_get(ic->sd->obj), app);
+ e_object_unref(E_OBJECT(app));
+ }
edje_object_part_swallow(ic->obj, "e.swallow.icon",
ic->obj_icon);
evas_object_show(ic->obj_icon);
}
@@ -1744,7 +1745,7 @@
Ecore_Desktop *desktop;
if (ic->info.pseudo_link)
- snprintf(buf, sizeof(buf), "%s/%s", ic->info.link, ic->info.file);
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir, ic->info.file);
else
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file);
@@ -1755,21 +1756,30 @@
if (desktop->generic) ic->info.generic =
evas_stringshare_add(desktop->generic);
if (desktop->comment) ic->info.comment =
evas_stringshare_add(desktop->comment);
+ printf("di: %s %s %s\n", desktop->icon, desktop->icon_path,
desktop->icon_class);
if (desktop->icon)
{
char *v;
/* FIXME: Use a real icon size. */
- v = (char *) ecore_desktop_icon_find(desktop->icon, NULL,
e_config->icon_theme);
+ v = (char *)ecore_desktop_icon_find(desktop->icon, NULL,
e_config->icon_theme);
if (v)
ic->info.icon = evas_stringshare_add(v);
+ printf("%s ->v\n", desktop->icon, v);
}
if (desktop->type)
{
- if (!strcmp(desktop->type, "Mount")) ic->info.mount = 1;
+ if (!strcmp(desktop->type, "Mount"))
+ {
+ ic->info.mount = 1;
+ if (desktop->URL)
+ ic->info.link =
_e_fm2_icon_desktop_url_eval(desktop->URL);
+ }
else if (!strcmp(desktop->type, "Link"))
{
+ if (desktop->URL)
+ ic->info.link =
_e_fm2_icon_desktop_url_eval(desktop->URL);
}
else if (!strcmp(desktop->type, "Application"))
{
@@ -1786,11 +1796,13 @@
if (ic->info.generic) evas_stringshare_del(ic->info.generic);
if (ic->info.icon) evas_stringshare_del(ic->info.icon);
if (ic->info.link) evas_stringshare_del(ic->info.link);
+ if (ic->info.pseudo_dir) evas_stringshare_del(ic->info.pseudo_dir);
ic->info.label = NULL;
ic->info.comment = NULL;
ic->info.generic = NULL;
ic->info.icon = NULL;
ic->info.link = NULL;
+ ic->info.pseudo_dir = NULL;
fclose(f);
return 0;
}
@@ -1892,7 +1904,7 @@
if (ic->sd->dev) dev = strdup(ic->sd->dev);
if (ic->info.pseudo_link)
- snprintf(buf, sizeof(buf), "%s/%s", ic->info.link,
ic->info.file);
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir,
ic->info.file);
else
snprintf(buf, sizeof(buf), "%s/%s", ic->sd->path, ic->info.file);
e_fm2_path_set(ic->sd->obj, dev, buf);
@@ -2658,7 +2670,7 @@
can_w2 = ecore_file_can_write(buf);
}
if (ic->info.pseudo_link)
- snprintf(buf, sizeof(buf), "%s/%s", ic->info.link, ic->info.file);
+ snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir, ic->info.file);
else
snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, ic->info.file);
if ((ic->info.link) && (!ic->info.pseudo_link))
@@ -2907,8 +2919,8 @@
{
if (ic->info.pseudo_link)
{
- snprintf(oldpath, sizeof(oldpath), "%s/%s", ic->info.link,
ic->info.file);
- snprintf(newpath, sizeof(newpath), "%s/%s", ic->info.link, text);
+ snprintf(oldpath, sizeof(oldpath), "%s/%s", ic->info.pseudo_dir,
ic->info.file);
+ snprintf(newpath, sizeof(newpath), "%s/%s", ic->info.pseudo_dir,
text);
}
else
{
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_fm.h 31 Aug 2006 12:51:54 -0000 1.18
+++ e_fm.h 3 Sep 2006 15:57:13 -0000 1.19
@@ -93,6 +93,7 @@
const char *generic;
const char *icon;
const char *link;
+ const char *pseudo_dir;
struct stat statinfo;
unsigned char mount : 1;
unsigned char pseudo_link : 1;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs