forked from enlightenment/enlightenment
nuke leaks, valgrind complaints, etc.
SVN revision: 26854
This commit is contained in:
parent
405083f43f
commit
2c4d9d3332
|
@ -2078,7 +2078,10 @@ _e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
|
|||
/* FIXME: Use a real icon size. */
|
||||
v = (char *)ecore_desktop_icon_find(desktop->icon, NULL, e_config->icon_theme);
|
||||
if (v)
|
||||
ic->info.icon = evas_stringshare_add(v);
|
||||
{
|
||||
ic->info.icon = evas_stringshare_add(v);
|
||||
free(v);
|
||||
}
|
||||
}
|
||||
|
||||
if (desktop->type)
|
||||
|
|
|
@ -371,7 +371,6 @@ _e_fwin_cb_open(void *data, E_Dialog *dia)
|
|||
getcwd(pcwd, sizeof(pcwd));
|
||||
chdir(e_fm2_real_path_get(fad->fwin->fm_obj));
|
||||
|
||||
e_exehist_add(buf, cmd);
|
||||
selected = e_fm2_selected_list_get(fad->fwin->fm_obj);
|
||||
if (selected)
|
||||
{
|
||||
|
@ -536,6 +535,25 @@ _e_fwin_file_exec(E_Fwin *fwin, E_Fm2_Icon_Info *ici, E_Fwin_Exec_Type ext)
|
|||
{
|
||||
/* FIXME: execute file ici with either a temrinal, the shell, or directly
|
||||
* or open the .desktop and exec it */
|
||||
switch (ext)
|
||||
{
|
||||
case E_FWIN_EXEC_NONE:
|
||||
break;
|
||||
case E_FWIN_EXEC_DIRECT:
|
||||
e_zone_exec(fwin->win->border->zone, ici->file);
|
||||
e_exehist_add("fwin", ici->file);
|
||||
break;
|
||||
case E_FWIN_EXEC_SH:
|
||||
break;
|
||||
case E_FWIN_EXEC_TERMINAL_DIRECT:
|
||||
break;
|
||||
case E_FWIN_EXEC_TERMINAL_SH:
|
||||
break;
|
||||
case E_FWIN_EXEC_DESKTOP:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -551,7 +569,7 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
|
|||
E_Fwin_Apps_Dialog *fad;
|
||||
E_Fm2_Config fmc;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
char buf[4096];
|
||||
char buf[4096], *f;
|
||||
int need_dia = 0;
|
||||
Evas_Hash *mimes = NULL;
|
||||
Evas_List *mlist = NULL;
|
||||
|
@ -600,14 +618,21 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
|
|||
if (ici->link)
|
||||
{
|
||||
if (!S_ISDIR(ici->statinfo.st_mode))
|
||||
mimes = evas_hash_direct_add(mimes, e_fm_mime_filename_get(ici->link), (void *)1);
|
||||
{
|
||||
f = e_fm_mime_filename_get(ici->link);
|
||||
mimes = evas_hash_del(mimes, f, (void *)1);
|
||||
mimes = evas_hash_direct_add(mimes, f, (void *)1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/%s",
|
||||
e_fm2_real_path_get(fwin->fm_obj), ici->file);
|
||||
if (!S_ISDIR(ici->statinfo.st_mode))
|
||||
mimes = evas_hash_direct_add(mimes, ici->mime, (void *)1);
|
||||
{
|
||||
mimes = evas_hash_del(mimes, ici->mime, (void *)1);
|
||||
mimes = evas_hash_direct_add(mimes, ici->mime, (void *)1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -647,18 +647,21 @@ e_zone_exec(E_Zone *zone, char *exe)
|
|||
a = e_app_exe_find(exe);
|
||||
if (!a)
|
||||
{
|
||||
a = E_NEW(E_App, 1);
|
||||
a->name = strdup (exe);
|
||||
a->exe = strdup (exe);
|
||||
// a = E_NEW(E_App, 1);
|
||||
// a->name = strdup(exe);
|
||||
// a->exe = strdup(exe);
|
||||
}
|
||||
|
||||
inst = E_NEW(E_App_Instance, 1);
|
||||
if (!inst) return 0;
|
||||
if (a)
|
||||
{
|
||||
inst = E_NEW(E_App_Instance, 1);
|
||||
if (!inst) return 0;
|
||||
}
|
||||
|
||||
ex = ecore_exe_pipe_run(exe, ECORE_EXE_PIPE_AUTO | ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_ERROR | ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_ERROR_LINE_BUFFERED, inst);
|
||||
if (!ex)
|
||||
{
|
||||
free(inst);
|
||||
if (inst) free(inst);
|
||||
ret = 0;
|
||||
}
|
||||
/* reset env vars */
|
||||
|
@ -671,12 +674,19 @@ e_zone_exec(E_Zone *zone, char *exe)
|
|||
/* 20 lines at start and end, 20x100 limit on bytes at each end. */
|
||||
ecore_exe_auto_limits_set(ex, 2000, 2000, 20, 20);
|
||||
ecore_exe_tag_set(ex, "E/app");
|
||||
inst->app = a;
|
||||
inst->exe = ex;
|
||||
inst->launch_id = startup_id;
|
||||
inst->launch_time = ecore_time_get();
|
||||
a->instances = evas_list_append(a->instances, inst);
|
||||
if (a->startup_notify) a->starting = 1;
|
||||
if (a)
|
||||
{
|
||||
inst->app = a;
|
||||
inst->exe = ex;
|
||||
inst->launch_id = startup_id;
|
||||
inst->launch_time = ecore_time_get();
|
||||
a->instances = evas_list_append(a->instances, inst);
|
||||
if (a->startup_notify) a->starting = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ecore_exe_free(ex);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue