handle shell execution failure exit code too :) and use a dialog... :)
SVN revision: 20026
This commit is contained in:
parent
e8b2bc91d9
commit
39ac053aa6
|
@ -1860,15 +1860,35 @@ _e_apps_cb_exit(void *data, int type, void *event)
|
||||||
a = ai->app;
|
a = ai->app;
|
||||||
if (!a) return 1;
|
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"),
|
E_Dialog *dia;
|
||||||
_("Enlightenment was unable to run the program:\n"
|
|
||||||
"\n"
|
dia = e_dialog_new(e_container_current_get(e_manager_current_get()));
|
||||||
"%s\n"),
|
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);
|
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. */
|
{ /* Show the error dialog with details from the exe. */
|
||||||
E_App_Autopsy *aut;
|
E_App_Autopsy *aut;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue