and now if we find random .desktop files or .sh shellscripts or executables

around - we can execute them directly (as u'd expect).


SVN revision: 26855
This commit is contained in:
Carsten Haitzler 2006-10-29 09:46:19 +00:00
parent 2c4d9d3332
commit 3cac21c264
1 changed files with 18 additions and 0 deletions

View File

@ -59,6 +59,9 @@ e_fwin_shutdown(void)
return 1;
}
/* FIXME: this opens a new window - we need a way to inherit a zone as the
* "fwin" window
*/
EAPI E_Fwin *
e_fwin_new(E_Container *con, const char *dev, const char *path)
{
@ -533,6 +536,9 @@ _e_fwin_file_is_exec(E_Fm2_Icon_Info *ici)
static void
_e_fwin_file_exec(E_Fwin *fwin, E_Fm2_Icon_Info *ici, E_Fwin_Exec_Type ext)
{
char buf[4096];
E_App *a;
/* FIXME: execute file ici with either a temrinal, the shell, or directly
* or open the .desktop and exec it */
switch (ext)
@ -544,12 +550,24 @@ _e_fwin_file_exec(E_Fwin *fwin, E_Fm2_Icon_Info *ici, E_Fwin_Exec_Type ext)
e_exehist_add("fwin", ici->file);
break;
case E_FWIN_EXEC_SH:
snprintf(buf, sizeof(buf), "/bin/sh %s", e_util_filename_escape(ici->file));
e_zone_exec(fwin->win->border->zone, buf);
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_zone_exec(fwin->win->border->zone, buf);
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_zone_exec(fwin->win->border->zone, buf);
break;
case E_FWIN_EXEC_DESKTOP:
a = e_app_new(ici->file, 0);
if (a)
{
e_zone_app_exec(fwin->win->border->zone, a);
e_object_unref(E_OBJECT(a));
}
break;
default:
break;