Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_exehist.c e_exehist.h e_fwin.c 


Log Message:
efreet

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_exehist.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_exehist.c 14 Dec 2006 15:39:26 -0000      1.8
+++ e_exehist.c 25 Mar 2007 18:20:07 -0000      1.9
@@ -173,18 +173,19 @@
 }
 
 EAPI void
-e_exehist_mime_app_add(const char *mime, E_App *a)
+e_exehist_mime_desktop_add(const char *mime, Efreet_Desktop *desktop)
 {
    const char *f;
    E_Exehist_Item *ei;
    Evas_List *l;
    
-   if ((!mime) || (!a)) return;
-   if (!a->path) return;
+   if ((!mime) || (!desktop)) return;
+   if (!desktop->orig_path) return;
    _e_exehist_load();
    if (!_e_exehist) return;
    
-   f = ecore_file_get_file(a->path);
+   f = efreet_util_path_to_file_id(desktop->orig_path);
+   if (!f) return;
    for (l = _e_exehist->mimes; l; l = l->next)
      {
        ei = l->data;
@@ -217,10 +218,10 @@
    _e_exehist_unload_queue();
 }
 
-EAPI E_App *
-e_exehist_mime_app_get(const char *mime)
+EAPI Efreet_Desktop *
+e_exehist_mime_desktop_get(const char *mime)
 {
-   E_App *a;
+   Efreet_Desktop *desktop;
    E_Exehist_Item *ei;
    Evas_List *l;
    
@@ -232,10 +233,13 @@
        ei = l->data;
        if ((ei->launch_method) && (!strcmp(mime, ei->launch_method)))
          {
-            a = NULL;
-            if (ei->exe) a = e_app_file_find(ei->exe);
-            _e_exehist_unload_queue();
-            return a;
+            desktop = NULL;
+            if (ei->exe) desktop = efreet_util_desktop_file_id_find(ei->exe);
+            if (desktop)
+              {
+                 _e_exehist_unload_queue();
+                 return desktop;
+              }
          }
      }
    _e_exehist_unload_queue();
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_exehist.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_exehist.h 29 Oct 2006 04:44:50 -0000      1.3
+++ e_exehist.h 25 Mar 2007 18:20:07 -0000      1.4
@@ -15,8 +15,8 @@
 EAPI int e_exehist_popularity_get(const char *exe);
 EAPI double e_exehist_newest_run_get(const char *exe);
 EAPI Evas_List *e_exehist_list_get(void);
-EAPI void e_exehist_mime_app_add(const char *mime, E_App *a);
-EAPI E_App *e_exehist_mime_app_get(const char *mime);
+EAPI void e_exehist_mime_desktop_add(const char *mime, Efreet_Desktop 
*desktop);
+EAPI Efreet_Desktop *e_exehist_mime_desktop_get(const char *mime);
 
 #endif
 #endif
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- e_fwin.c    24 Mar 2007 21:27:34 -0000      1.31
+++ e_fwin.c    25 Mar 2007 18:20:07 -0000      1.32
@@ -360,16 +360,16 @@
 _e_fwin_cb_open(void *data, E_Dialog *dia)
 {
    E_Fwin_Apps_Dialog *fad;
-   E_App *a = NULL;
+   Efreet_Desktop *desktop = NULL;
    char pcwd[4096], buf[4096];
    Evas_List *selected, *l;
    E_Fm2_Icon_Info *ici;
    Ecore_List *files = NULL;
    
    fad = data;
-   if (fad->app1) a = e_app_file_find(fad->app1);
-   else if (fad->app2) a = e_app_file_find(fad->app2);
-   if (a)
+   if (fad->app1) desktop = efreet_util_desktop_file_id_find(fad->app1);
+   else if (fad->app2) desktop = efreet_util_desktop_file_id_find(fad->app2);
+   if (desktop)
      {
        getcwd(pcwd, sizeof(pcwd));
        chdir(e_fm2_real_path_get(fad->fwin->fm_obj));
@@ -411,12 +411,12 @@
                  if (buf[0] != 0)
                    {
                       if (ici->mime)
-                        e_exehist_mime_app_add(ici->mime, a);
+                        e_exehist_mime_desktop_add(ici->mime, desktop);
                       ecore_list_append(files, strdup(ici->file));
                    }
               }
             evas_list_free(selected);
-            e_app_exec(fad->fwin->win->border->zone, a, NULL, files, "fwin");
+            e_exec(fad->fwin->win->border->zone, desktop, NULL, files, "fwin");
             ecore_list_destroy(files);
          }
        chdir(pcwd);
@@ -546,19 +546,19 @@
       case E_FWIN_EXEC_NONE:
        break;
       case E_FWIN_EXEC_DIRECT:
-       e_app_exec(fwin->win->border->zone, NULL, ici->file, NULL, "fwin");
+       e_exec(fwin->win->border->zone, NULL, ici->file, NULL, "fwin");
        break;
       case E_FWIN_EXEC_SH:
        snprintf(buf, sizeof(buf), "/bin/sh %s", 
e_util_filename_escape(ici->file));
-       e_app_exec(fwin->win->border->zone, NULL, buf, NULL, NULL);
+       e_exec(fwin->win->border->zone, NULL, buf, NULL, NULL);
        break;
       case E_FWIN_EXEC_TERMINAL_DIRECT:
        snprintf(buf, sizeof(buf), "%s %s", e_config->exebuf_term_cmd, 
e_util_filename_escape(ici->file));
-       e_app_exec(fwin->win->border->zone, NULL, buf, NULL, NULL);
+       e_exec(fwin->win->border->zone, NULL, buf, NULL, NULL);
        break;
       case E_FWIN_EXEC_TERMINAL_SH:
        snprintf(buf, sizeof(buf), "%s /bin/sh %s", e_config->exebuf_term_cmd, 
e_util_filename_escape(ici->file));
-       e_app_exec(fwin->win->border->zone, NULL, buf, NULL, NULL);
+       e_exec(fwin->win->border->zone, NULL, buf, NULL, NULL);
        break;
       case E_FWIN_EXEC_DESKTOP:
        snprintf(buf, sizeof(buf), "%s/%s", e_fm2_real_path_get(fwin->fm_obj), 
ici->file);
@@ -577,9 +577,8 @@
    Evas_Coord mw, mh;
    Evas_Object *o, *ocon, *of, *oi, *mt;
    Evas *evas;
-   Evas_List *l, *ll;
-   Evas_List *apps, *al;
-   E_App *a;
+   Evas_List *l;
+   Evas_List *apps;
    E_Fwin_Apps_Dialog *fad;
    E_Fm2_Config fmc;
    E_Fm2_Icon_Info *ici;
@@ -664,14 +663,18 @@
    apps = NULL;
    if (mlist)
      {
+       Ecore_List *ml;
+       Efreet_Desktop *desktop;
+
        for (l = mlist; l; l = l->next)
          {
-            al = e_app_mime_list(l->data);
-            if (al)
+            ml = efreet_util_desktop_mime_list(l->data);
+            if (ml)
               {
-                 for (ll = al; ll; ll = ll->next)
-                   apps = evas_list_append(apps, ll->data);
-                 evas_list_free(al);
+                 ecore_list_goto_first(ml);
+                 while ((desktop = ecore_list_next(ml)))
+                   apps = evas_list_append(apps, desktop);
+                 ecore_list_destroy(ml);
               }
          }
      }
@@ -694,12 +697,12 @@
         */
        if (evas_list_count(mlist) <= 1)
          {
+            Efreet_Desktop *desktop = NULL;
             char pcwd[4096];
             Ecore_List *files_list = NULL;
           
             need_dia = 1;
-            a = NULL;
-            if (mlist) a = e_exehist_mime_app_get(mlist->data);
+            if (mlist) desktop = e_exehist_mime_desktop_get(mlist->data);
             getcwd(pcwd, sizeof(pcwd));
             chdir(e_fm2_real_path_get(fwin->fm_obj));
             
@@ -723,9 +726,9 @@
                       need_dia = 0;
                    }
               }
-            if (a)
+            if (desktop)
               {
-                 if (e_app_exec(fwin->win->border->zone, a, NULL, files_list, 
"fwin"))
+                 if (e_exec(fwin->win->border->zone, desktop, NULL, 
files_list, "fwin"))
                    need_dia = 0;
               }
             ecore_list_destroy(files_list);
@@ -769,11 +772,13 @@
        fad->o_ilist = o;
        for (l = apps; l; l = l->next)
          {
-            a = l->data;
-            oi = e_app_icon_add(a, evas);
-            e_widget_ilist_append(o, oi, a->name,
+            Efreet_Desktop *desktop;
+
+            desktop = l->data;
+            oi = e_util_desktop_icon_add(desktop, "24x24", evas);
+            e_widget_ilist_append(o, oi, desktop->name,
                                   _e_fwin_cb_ilist_change, fad, 
-                                  ecore_file_get_file(a->path));
+                                  
efreet_util_path_to_file_id(desktop->orig_path));
          }
        evas_list_free(apps);
        e_widget_ilist_go(o);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to