parent
0563113280
commit
c8f3f10a81
2
src/E.h
2
src/E.h
|
@ -453,8 +453,6 @@ int ThemeConfigLoad(void);
|
|||
/* dialog.c */
|
||||
void __PRINTF_2__ DialogOK(const char *title, const char *fmt, ...);
|
||||
void DialogOKstr(const char *title, const char *txt);
|
||||
void __PRINTF__ DialogAlert(const char *fmt, ...);
|
||||
void __PRINTF__ DialogAlertOK(const char *fmt, ...);
|
||||
|
||||
/* econfig.c */
|
||||
void ConfigurationLoad(void);
|
||||
|
|
|
@ -106,25 +106,22 @@ execApplication(const char *params, int flags)
|
|||
{
|
||||
/* absolute path */
|
||||
if (isabspath(exe))
|
||||
DialogAlertOK(_
|
||||
("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file does not exist.\n"),
|
||||
exe);
|
||||
AlertOK(_("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file does not exist.\n"), exe);
|
||||
/* relative path */
|
||||
else
|
||||
DialogAlertOK(_
|
||||
("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is most probably because this "
|
||||
"program is not in the\n"
|
||||
"path for your shell which is %s. "
|
||||
"I suggest you read the manual\n"
|
||||
"page for that shell and read up how to "
|
||||
"change or add to your\n"
|
||||
"execution path.\n"), exe, sh);
|
||||
AlertOK(_("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is most probably because this "
|
||||
"program is not in the\n"
|
||||
"path for your shell which is %s. "
|
||||
"I suggest you read the manual\n"
|
||||
"page for that shell and read up how to "
|
||||
"change or add to your\n"
|
||||
"execution path.\n"), exe, sh);
|
||||
}
|
||||
else
|
||||
/* it is a node on the filing sys */
|
||||
|
@ -134,46 +131,41 @@ execApplication(const char *params, int flags)
|
|||
{
|
||||
/* can execute it */
|
||||
if (canexec(path))
|
||||
DialogAlertOK(_
|
||||
("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"I am unsure as to why you could not "
|
||||
"do this. The file exists,\n"
|
||||
"is a file, and you are allowed to "
|
||||
"execute it. I suggest you look\n"
|
||||
"into this.\n"), path);
|
||||
AlertOK(_("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"I am unsure as to why you could not "
|
||||
"do this. The file exists,\n"
|
||||
"is a file, and you are allowed to "
|
||||
"execute it. I suggest you look\n"
|
||||
"into this.\n"), path);
|
||||
/* not executable file */
|
||||
else
|
||||
DialogAlertOK(_
|
||||
("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file exists, is a "
|
||||
"file, but you are unable\n"
|
||||
"to execute it because you do not "
|
||||
"have execute "
|
||||
"access to this file.\n"), path);
|
||||
AlertOK(_("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file exists, is a "
|
||||
"file, but you are unable\n"
|
||||
"to execute it because you do not "
|
||||
"have execute " "access to this file.\n"), path);
|
||||
}
|
||||
/* it's not a file */
|
||||
else
|
||||
{
|
||||
/* its a dir */
|
||||
if (isdir(path))
|
||||
DialogAlertOK(_
|
||||
("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file is in fact "
|
||||
"a directory.\n"), path);
|
||||
AlertOK(_("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file is in fact "
|
||||
"a directory.\n"), path);
|
||||
/* its not a file or a dir */
|
||||
else
|
||||
DialogAlertOK(_
|
||||
("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file is not a "
|
||||
"regular file.\n"), path);
|
||||
AlertOK(_("There was an error running the program:\n"
|
||||
"%s\n"
|
||||
"This program could not be executed.\n"
|
||||
"This is because the file is not a "
|
||||
"regular file.\n"), path);
|
||||
}
|
||||
Efree(path);
|
||||
}
|
||||
|
@ -194,7 +186,7 @@ Espawn(int argc __UNUSED__, char **argv)
|
|||
|
||||
execvp(argv[0], argv);
|
||||
|
||||
DialogAlertOK(_("There was an error running the program:\n%s\n"), argv[0]);
|
||||
AlertOK(_("There was an error running the program:\n%s\n"), argv[0]);
|
||||
exit(100);
|
||||
}
|
||||
|
||||
|
|
13
src/alert.c
13
src/alert.c
|
@ -569,3 +569,16 @@ Alert(const char *fmt, ...)
|
|||
ShowAlert(_("Enlightenment Message Dialog"), _("Ignore this"),
|
||||
_("Restart Enlightenment"), _("Quit Enlightenment"), text);
|
||||
}
|
||||
|
||||
void
|
||||
AlertOK(const char *fmt, ...)
|
||||
{
|
||||
char text[10240];
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
Evsnprintf(text, 10240, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
ShowAlert(_("Attention !!!"), _("OK"), NULL, NULL, text);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
/* alert.c */
|
||||
void __PRINTF__ Alert(const char *fmt, ...);
|
||||
void __PRINTF__ AlertOK(const char *fmt, ...);
|
||||
void __PRINTF_5__ AlertX(const char *title, const char *ignore,
|
||||
const char *restart, const char *quit,
|
||||
const char *fmt, ...);
|
||||
|
|
24
src/dialog.c
24
src/dialog.c
|
@ -2042,30 +2042,6 @@ DialogOKstr(const char *title, const char *txt)
|
|||
DialogShow(d);
|
||||
}
|
||||
|
||||
void
|
||||
DialogAlert(const char *fmt, ...)
|
||||
{
|
||||
char text[10240];
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
Evsnprintf(text, 10240, fmt, args);
|
||||
va_end(args);
|
||||
Alert(text);
|
||||
}
|
||||
|
||||
void
|
||||
DialogAlertOK(const char *fmt, ...)
|
||||
{
|
||||
char text[10240];
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
Evsnprintf(text, 10240, fmt, args);
|
||||
va_end(args);
|
||||
AlertX(_("Attention !!!"), _("OK"), NULL, NULL, text);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dialog event handlers
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,6 @@ SignalHandler(int sig)
|
|||
{
|
||||
static int loop_count = 0;
|
||||
int status;
|
||||
const char *txt;
|
||||
|
||||
Mode.wm.in_signal_handler = 1;
|
||||
|
||||
|
@ -59,17 +58,17 @@ SignalHandler(int sig)
|
|||
break;
|
||||
|
||||
case SIGILL:
|
||||
txt = _("Enlightenment performed an Illegal Instruction.\n" "\n"
|
||||
Alert(_("Enlightenment performed an Illegal Instruction.\n" "\n"
|
||||
"This most likely is due to you having installed an run a\n"
|
||||
"binary of Enlightenment that was compiled for a make or model\n"
|
||||
"of CPU not 100%% identical or compatible with yours. Please\n"
|
||||
"either obtain the correct package for your system, or\n"
|
||||
"re-compile Enlightenment and possibly any support libraries\n"
|
||||
"that you got in binary format to run Enlightenment.\n");
|
||||
goto do_alert;
|
||||
"that you got in binary format to run Enlightenment.\n"));
|
||||
goto do_abort;
|
||||
|
||||
case SIGFPE:
|
||||
txt = _("Enlightenment caused a Floating Point Exception.\n" "\n"
|
||||
Alert(_("Enlightenment caused a Floating Point Exception.\n" "\n"
|
||||
"This means that Enlightenment or support library routines it calls\n"
|
||||
"have performed an illegal mathematical operation (most likely\n"
|
||||
"dividing a number by zero). This is most likely a bug. It is\n"
|
||||
|
@ -77,11 +76,11 @@ SignalHandler(int sig)
|
|||
"compile Enlightenment with debugging symbols in and run\n"
|
||||
"Enlightenment under gdb so you can backtrace for where it died and\n"
|
||||
"send in a useful bug report with backtrace information and variable\n"
|
||||
"dumps etc.\n");
|
||||
goto do_alert;
|
||||
"dumps etc.\n"));
|
||||
goto do_abort;
|
||||
|
||||
case SIGSEGV:
|
||||
txt = _("Enlightenment caused Segment Violation (Segfault)\n" "\n"
|
||||
Alert(_("Enlightenment caused Segment Violation (Segfault)\n" "\n"
|
||||
"This means that Enlightenment or support library routines it calls\n"
|
||||
"have accessed areas of your system's memory that they are not\n"
|
||||
"allowed access to. This is most likely a bug. It is recommended to\n"
|
||||
|
@ -89,17 +88,17 @@ SignalHandler(int sig)
|
|||
"Enlightenment with debugging symbols in and run Enlightenment\n"
|
||||
"under gdb so you can backtrace for where it died and send in a\n"
|
||||
"useful bug report with backtrace information and variable\n"
|
||||
"dumps etc.\n");
|
||||
goto do_alert;
|
||||
"dumps etc.\n"));
|
||||
goto do_abort;
|
||||
|
||||
case SIGBUS:
|
||||
txt = _("Enlightenment caused Bus Error.\n" "\n"
|
||||
Alert(_("Enlightenment caused Bus Error.\n" "\n"
|
||||
"It is suggested you check your hardware and OS installation.\n"
|
||||
"It is highly unusual to cause Bus Errors on operational\n"
|
||||
"hardware.\n");
|
||||
goto do_alert;
|
||||
"hardware.\n"));
|
||||
goto do_abort;
|
||||
|
||||
do_alert:
|
||||
do_abort:
|
||||
if (loop_count > 0)
|
||||
abort();
|
||||
loop_count++;
|
||||
|
@ -107,7 +106,6 @@ SignalHandler(int sig)
|
|||
disp = NULL;
|
||||
#endif
|
||||
Mode.wm.exit_now = 1;
|
||||
DialogAlert(txt);
|
||||
SessionExit(EEXIT_ERROR, NULL);
|
||||
abort();
|
||||
break;
|
||||
|
|
|
@ -340,12 +340,12 @@ ice_msgs_process(void)
|
|||
if (status == IceProcessMessagesIOError)
|
||||
{
|
||||
/* Less of the hope.... E survives */
|
||||
DialogAlert(_("ERROR!\n" "\n"
|
||||
"Lost the Session Manager that was there?\n"
|
||||
"Here here session manager... come here... want a bone?\n"
|
||||
"Oh come now! Stop sulking! Bugger. Oh well. "
|
||||
"Will continue without\n" "a session manager.\n" "\n"
|
||||
"I'll survive somehow.\n" "\n" "\n" "... I hope.\n"));
|
||||
Alert(_("ERROR!\n" "\n"
|
||||
"Lost the Session Manager that was there?\n"
|
||||
"Here here session manager... come here... want a bone?\n"
|
||||
"Oh come now! Stop sulking! Bugger. Oh well. "
|
||||
"Will continue without\n" "a session manager.\n" "\n"
|
||||
"I'll survive somehow.\n" "\n" "\n" "... I hope.\n"));
|
||||
ice_exit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue