handle shell execution failure exit code too :) and use a dialog... :)

SVN revision: 20026
This commit is contained in:
Carsten Haitzler 2006-01-25 08:22:33 +00:00
parent e8b2bc91d9
commit 39ac053aa6
1 changed files with 38 additions and 18 deletions

View File

@ -1860,15 +1860,35 @@ _e_apps_cb_exit(void *data, int type, void *event)
a = ai->app;
if (!a) return 1;
if ( (ev->exited) && (ev->exit_code == 127) ) /* /bin/sh uses this if cmd not found */
/* /bin/sh uses this if cmd not found */
if ((ev->exited) &&
((ev->exit_code == 127) || (ev->exit_code == 255)))
{
e_error_dialog_show(_("Run Error"),
_("Enlightenment was unable to run the program:\n"
"\n"
"%s\n"),
E_Dialog *dia;
dia = e_dialog_new(e_container_current_get(e_manager_current_get()));
if (dia)
{
char buf[4096];
e_dialog_title_set(dia, _("Application run error"));
snprintf(buf, sizeof(buf),
_("Enlightenment was unable to run the application:<br>"
"<br>"
"%s<br>"
"<br>"
"The application failed to start."),
a->exe);
e_dialog_text_set(dia, buf);
// e_dialog_icon_set(dia, "enlightenment/error", 64);
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
e_dialog_button_focus_num(dia, 1);
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
}
else if ( ! ((ev->exited) && (ev->exit_code == EXIT_SUCCESS)) ) /* Let's hope that everyhing returns this properly. */
}
/* Let's hope that everyhing returns this properly. */
else if (!((ev->exited) && (ev->exit_code == EXIT_SUCCESS)))
{ /* Show the error dialog with details from the exe. */
E_App_Autopsy *aut;