Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_module.c 


Log Message:
Modules can use module.desktop instead of module.eap now.  module.edj is
also currently supported for those too lazy to write a .desktop, just
rename your module.eap.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_module.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- e_module.c  14 Aug 2006 15:22:45 -0000      1.64
+++ e_module.c  2 Sep 2006 09:19:19 -0000       1.65
@@ -371,10 +371,35 @@
    if (!dia) return;
 
    e_dialog_title_set(dia, title);
-   if (m) 
+   if (m)
      {
-       snprintf(eap, sizeof(eap), "%s/module.eap", e_module_dir_get(m));     
-       _e_module_dialog_icon_set(dia, eap);
+        /* Lots of fallbacks coz we are in a transition period, and the 
modules are still suffering from the last API change. */
+       snprintf(eap, sizeof(eap), "%s/module.desktop", e_module_dir_get(m));
+       if (ecore_file_exists(eap))
+          {
+              EAPI E_App *app;
+
+              app = e_app_new(eap, 0);
+             if (app)
+                {
+                   dia->icon_object = e_app_icon_add(e_win_evas_get(dia->win), 
app);
+                    edje_extern_object_min_size_set(dia->icon_object, 64, 64);
+                    edje_object_part_swallow(dia->bg_object, "icon_swallow", 
dia->icon_object);
+                    evas_object_show(dia->icon_object);
+                   e_object_unref(E_OBJECT(app));
+                }
+          }
+       else   /* FIXME: Remove the fallbacks when everything in cvs is 
converted.  B-) */
+          {
+             snprintf(eap, sizeof(eap), "%s/module.edj", e_module_dir_get(m));
+             if (ecore_file_exists(eap))
+                _e_module_dialog_icon_set(dia, eap);
+             else
+                {
+                   snprintf(eap, sizeof(eap), "%s/module.eap", 
e_module_dir_get(m));
+                   _e_module_dialog_icon_set(dia, eap);
+                }
+          }
      }
    else
      e_dialog_icon_set(dia, "enlightenment/modules", 64);



-------------------------------------------------------------------------
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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to