Enlightenment CVS committal
Author : onefang
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_fm.c e_thumb_main.c
Log Message:
Experimental bouncy desktops in the fm. I will move this into
e_app_icon_add when I'm happy with it.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- e_fm.c 17 Sep 2006 21:29:23 -0000 1.63
+++ e_fm.c 17 Sep 2006 23:13:10 -0000 1.64
@@ -1599,24 +1599,15 @@
}
else if (!strcmp(icon, "DESKTOP"))
{
- E_App *app;
-
if (ic->info.pseudo_link)
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);
-/* FIXME FIXME FIXME: e_app_new() is SLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW. it can
- * be a complete hog. this destroys performance in fm2. :(:(:(
- */
- app = e_app_new(buf, 0);
- if (app)
- {
-/* FIXME: Actually, I think it's the icon searching that is slowing things
down a lot.
- * That will be fixed by moving it to thumbnailing as planned. Commented out
for now.
- */
-// 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_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
+ e_thumb_icon_file_set(ic->obj_icon, buf,
e_config->icon_theme);
+ e_thumb_icon_size_set(ic->obj_icon, 128, 128);
+ evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen",
_e_fm2_cb_icon_thumb_gen, ic);
+ _e_fm2_icon_thumb(ic);
}
else if (!strncmp(icon, "e/icons/fileman/mime/", 21))
{
@@ -1697,24 +1688,21 @@
(e_util_glob_case_match(ic->info.file, "*.desktop"))
)
{
- E_App *app;
-
if (ic->info.pseudo_link)
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);
-/* FIXME FIXME FIXME: e_app_new() is SLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW. it can
- * be a complete hog. this destroys performance in fm2. :(:(:(
- */
- app = e_app_new(buf, 0);
- if (app)
- {
-/* FIXME: Actually, I think it's the icon searching that is slowing things
down a lot.
- * That will be fixed by moving it to thumbnailing as planned. Commented out
for now.
- */
-// 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_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
+// FIXME: Dunno if key_hint is useful here, no one seems to use it.
+// if (ic->sd->config->icon.key_hint)
+// e_thumb_icon_file_set(ic->obj_icon, buf,
ic->sd->config->icon.key_hint);
+// else
+ e_thumb_icon_file_set(ic->obj_icon, buf,
e_config->icon_theme);
+ e_thumb_icon_size_set(ic->obj_icon, 128, 96);
+ evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen",
_e_fm2_cb_icon_thumb_gen, ic);
+ _e_fm2_icon_thumb(ic);
+
edje_object_part_swallow(ic->obj, "e.swallow.icon",
ic->obj_icon);
evas_object_show(ic->obj_icon);
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb_main.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_thumb_main.c 17 Sep 2006 21:29:24 -0000 1.15
+++ e_thumb_main.c 17 Sep 2006 23:13:10 -0000 1.16
@@ -9,6 +9,7 @@
#include <Ecore_Evas.h>
#include <Ecore_Ipc.h>
#include <Ecore_File.h>
+#include <Ecore_Desktop.h>
#include <Evas.h>
#include <Eet.h>
#include <Edje.h>
@@ -44,6 +45,7 @@
int
main(int argc, char **argv)
{
+ char buf[4096];
int i;
/* FIXME: make this configurable */
@@ -71,6 +73,13 @@
ecore_file_init();
ecore_ipc_init();
+ ecore_desktop_init();
+ ecore_desktop_paths_extras_clear();
+ ecore_desktop_paths_prepend_user(ECORE_DESKTOP_PATHS_ICONS, "~/.e/e/icons");
+// snprintf(buf, sizeof(buf), "%s/data/icons", e_prefix_data_get());
+ ecore_desktop_paths_append_system(ECORE_DESKTOP_PATHS_ICONS, buf);
+ ecore_desktop_paths_regen();
+
snprintf(_thumbdir, sizeof(_thumbdir), "%s/.e/e/fileman/thumbnails",
getenv("HOME"));
ecore_file_mkpath(_thumbdir);
@@ -82,6 +91,8 @@
ecore_ipc_server_del(_e_ipc_server);
_e_ipc_server = NULL;
}
+
+ ecore_desktop_shutdown();
ecore_ipc_shutdown();
ecore_file_shutdown();
ecore_evas_shutdown();
@@ -324,6 +335,40 @@
hh = 0;
alpha = 1;
ext = strrchr(eth->file, '.');
+
+ if ((ext) && (!strcasecmp(ext, ".desktop")))
+ {
+ Ecore_Desktop *desktop;
+
+ desktop = ecore_desktop_get(eth->file, NULL);
+ free(eth->file);
+ eth->file = NULL;
+ if (desktop)
+ {
+ if (desktop->icon_path)
+ eth->file = strdup(desktop->icon_path);
+ else
+ eth->file = (char
*)ecore_desktop_icon_find(desktop->icon_class, NULL, eth->key);
+ free(eth->key);
+ eth->key = NULL;
+ if (eth->file)
+ {
+ ext = strrchr(eth->file, '.');
+ if ((ext) &&
+ ((!strcasecmp(ext, ".edj")) ||
+ (!strcasecmp(ext, ".eap")))
+ )
+ {
+ eth->key = strdup("icon");
+ }
+ }
+ else
+ {
+ return;
+ }
+ }
+ }
+
if ((ext) && (eth->key) &&
((!strcasecmp(ext, ".edj")) ||
(!strcasecmp(ext, ".eap")))
-------------------------------------------------------------------------
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