forked from enlightenment/enlightenment
1. move thngs to dialogs from the e_error ones. fileman files are left - they
have a lot of work to go to be done well (ie work that e_app does to read stdout/err shoudl be here too - or we need to eventually virtualise this) 2. stop self-feeding scan loop :) SVN revision: 20425
This commit is contained in:
parent
35c33bd826
commit
6f5e4ef0af
|
@ -422,12 +422,11 @@ e_app_exec(E_App *a, int launch_id)
|
|||
if (!exe)
|
||||
{
|
||||
free(inst);
|
||||
e_error_dialog_show(_("Run Error"),
|
||||
_("Enlightenment was unable to fork a child process:\n"
|
||||
"\n"
|
||||
"%s\n"
|
||||
"\n"),
|
||||
a->exe);
|
||||
e_util_dialog_show(_("Run Error"),
|
||||
_("Enlightenment was unable to fork a child process:<br>"
|
||||
"<br>"
|
||||
"%s<br>"),
|
||||
a->exe);
|
||||
return 0;
|
||||
}
|
||||
/* 20 lines at start and end, 20x100 limit on bytes at each end. */
|
||||
|
@ -1541,6 +1540,10 @@ _e_app_cb_monitor(void *data, Ecore_File_Monitor *em,
|
|||
printf("BUG: Weird event for .directory.eap: %d\n", event);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(file, ".eap.cache.cfg"))
|
||||
{
|
||||
/* ignore this file */
|
||||
}
|
||||
else
|
||||
{
|
||||
if (event == ECORE_FILE_EVENT_MODIFIED)
|
||||
|
@ -2003,7 +2006,7 @@ _e_app_cb_scan_cache_timer(void *data)
|
|||
}
|
||||
snprintf(buf, sizeof(buf), "%s/%s", sc->path, s);
|
||||
is_dir = ecore_file_is_dir(buf);
|
||||
if (e_util_glob_match(s, "*.eap") || is_dir)
|
||||
if (_e_app_is_eapp(s) || is_dir)
|
||||
{
|
||||
ac = evas_hash_find(sc->cache->subapps_hash, s);
|
||||
if (ac)
|
||||
|
|
|
@ -434,26 +434,26 @@ e_config_init(void)
|
|||
/* your config is too old - need new defaults */
|
||||
_e_config_free();
|
||||
ecore_timer_add(1.0, _e_config_cb_timer,
|
||||
_("Configuration data needed upgrading. Your old configuration\n"
|
||||
"has been wiped and a new set of defaults initialized. This\n"
|
||||
"will happen regularly during development, so don't report a\n"
|
||||
"bug. This simply means Enlightenment needs new configuration\n"
|
||||
"data by default for usable functionality that your old\n"
|
||||
"configuration simply lacks. This new set of defaults will fix\n"
|
||||
"that by adding it in. You can re-configure things now to your\n"
|
||||
"liking. Sorry for the hiccup in your configuration.\n"));
|
||||
_("Configuration data needed upgrading. Your old configuration<br>"
|
||||
"has been wiped and a new set of defaults initialized. This<br>"
|
||||
"will happen regularly during development, so don't report a<br>"
|
||||
"bug. This simply means Enlightenment needs new configuration<br>"
|
||||
"data by default for usable functionality that your old<br>"
|
||||
"configuration simply lacks. This new set of defaults will fix<br>"
|
||||
"that by adding it in. You can re-configure things now to your<br>"
|
||||
"liking. Sorry for the hiccup in your configuration.<br>"));
|
||||
}
|
||||
else if (e_config->config_version > E_CONFIG_FILE_VERSION)
|
||||
{
|
||||
/* your config is too new - what the fuck??? */
|
||||
_e_config_free();
|
||||
ecore_timer_add(1.0, _e_config_cb_timer,
|
||||
_("Your configuration is NEWER than Enlightenment. This is very\n"
|
||||
"strange. This should not happen unless you downgraded\n"
|
||||
"Enlightenment or copied the configuration from a place where\n"
|
||||
"a newer version of Enlightenment was running. This is bad and\n"
|
||||
"as a precaution your configuration has been now restored to\n"
|
||||
"defaults. Sorry for the inconvenience.\n"));
|
||||
_("Your configuration is NEWER than Enlightenment. This is very<br>"
|
||||
"strange. This should not happen unless you downgraded<br>"
|
||||
"Enlightenment or copied the configuration from a place where<br>"
|
||||
"a newer version of Enlightenment was running. This is bad and<br>"
|
||||
"as a precaution your configuration has been now restored to<br>"
|
||||
"defaults. Sorry for the inconvenience.<br>"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2174,7 +2174,7 @@ _e_config_free(void)
|
|||
static int
|
||||
_e_config_cb_timer(void *data)
|
||||
{
|
||||
e_error_dialog_show(_("Configuration Upgraded"),
|
||||
data);
|
||||
e_util_dialog_show(_("Configuration Upgraded"),
|
||||
data);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -307,6 +307,9 @@ e_fm_file_exec(E_Fm_File *file)
|
|||
{
|
||||
Ecore_Exe *exe;
|
||||
|
||||
/* FIXME: use the e app execution mechanisms where possible so we can
|
||||
* collect error output
|
||||
*/
|
||||
if(e_fm_file_has_mime(file,".eap"))
|
||||
{
|
||||
E_App *e_app;
|
||||
|
@ -359,6 +362,9 @@ e_fm_file_assoc_exec(E_Fm_File *file)
|
|||
|
||||
if (!assoc_apps) return 0;
|
||||
|
||||
/* FIXME: use the e app execution mechanisms where possible so we can
|
||||
* collect error output
|
||||
*/
|
||||
for (l = assoc_apps; l; l = l->next)
|
||||
{
|
||||
assoc = l->data;
|
||||
|
@ -397,6 +403,9 @@ e_fm_file_exec_with(E_Fm_File *file, char* exec_with)
|
|||
char app[PATH_MAX * 2];
|
||||
if (!exec_with || !file) return 0;
|
||||
|
||||
/* FIXME: use the e app execution mechanisms where possible so we can
|
||||
* collect error output
|
||||
*/
|
||||
snprintf(app, PATH_MAX * 2, "%s \"%s\"", exec_with, file->path);
|
||||
exe = ecore_exe_run(app, NULL);
|
||||
|
||||
|
|
|
@ -345,14 +345,13 @@ e_intl_input_method_set(const char *method)
|
|||
|
||||
if ( !_e_intl_input_method_exec ||
|
||||
!ecore_exe_pid_get(_e_intl_input_method_exec))
|
||||
e_error_dialog_show(_("Input Method Error"),
|
||||
_( "Error starting the input method "
|
||||
"executable\n\n"
|
||||
|
||||
"please make sure that your input\n"
|
||||
"method configuration is correct and\n"
|
||||
"that your configuration's\n"
|
||||
"executable is in your PATH\n"));
|
||||
e_util_dialog_show(_("Input Method Error"),
|
||||
_( "Error starting the input method executable<br><br>"
|
||||
|
||||
"please make sure that your input<br>"
|
||||
"method configuration is correct and<br>"
|
||||
"that your configuration's<br>"
|
||||
"executable is in your PATH<br>"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -226,12 +226,11 @@ e_util_head_exec(int head, char *cmd)
|
|||
exe = ecore_exe_run(cmd, NULL);
|
||||
if (!exe)
|
||||
{
|
||||
e_error_dialog_show(_("Run Error"),
|
||||
_("Enlightenment was unable to fork a child process:\n"
|
||||
"\n"
|
||||
"%s\n"
|
||||
"\n"),
|
||||
cmd);
|
||||
e_util_dialog_show(_("Run Error"),
|
||||
_("Enlightenment was unable to fork a child process:<br>"
|
||||
"<br>"
|
||||
"%s<br>"),
|
||||
cmd);
|
||||
ok = 0;
|
||||
}
|
||||
|
||||
|
@ -272,10 +271,10 @@ e_util_immortal_check(void)
|
|||
wins = e_border_immortal_windows_get();
|
||||
if (wins)
|
||||
{
|
||||
e_error_dialog_show(_("Cannot exit - immortal windows."),
|
||||
_("Some windows are left still around with the Lifespan lock enabled. This means\n"
|
||||
"that Enlightenment will not allow itself to exit until these windows have\n"
|
||||
"been closed or have the lifespan lock removed.\n"));
|
||||
e_util_dialog_show(_("Cannot exit - immortal windows."),
|
||||
_("Some windows are left still around with the Lifespan lock enabled. This means<br>"
|
||||
"that Enlightenment will not allow itself to exit until these windows have<br>"
|
||||
"been closed or have the lifespan lock removed.<br>"));
|
||||
/* FIXME: should really display a list of these lifespan locked */
|
||||
/* windows in a dialog and let the user disable their locks in */
|
||||
/* this dialog */
|
||||
|
@ -510,6 +509,22 @@ e_util_edje_collection_exists(char *file, char *coll)
|
|||
return 0;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_util_dialog_internal(char *title, char *txt)
|
||||
{
|
||||
E_Dialog *dia;
|
||||
|
||||
dia = e_dialog_new(e_container_current_get(e_manager_current_get()));
|
||||
if (!dia) return;
|
||||
e_dialog_title_set(dia, title);
|
||||
e_dialog_text_set(dia, txt);
|
||||
e_dialog_icon_set(dia, "enlightenment/error", 64);
|
||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||
e_dialog_button_focus_num(dia, 0);
|
||||
e_win_centered_set(dia->win, 1);
|
||||
e_dialog_show(dia);
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
_e_util_container_fake_mouse_up_cb(void *data)
|
||||
|
|
|
@ -6,6 +6,15 @@
|
|||
#ifndef E_UTILS_H
|
||||
#define E_UTILS_H
|
||||
|
||||
#define e_util_dialog_show(title, args...) \
|
||||
{ \
|
||||
char __tmpbuf[4096]; \
|
||||
\
|
||||
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
|
||||
e_util_dialog_internal(title, __tmpbuf); \
|
||||
}
|
||||
|
||||
|
||||
EAPI void e_util_container_fake_mouse_up_later(E_Container *con, int button);
|
||||
EAPI void e_util_container_fake_mouse_up_all_later(E_Container *con);
|
||||
EAPI void e_util_wakeup(void);
|
||||
|
@ -29,6 +38,7 @@ EAPI E_Container *e_util_container_window_find(Ecore_X_Window win);
|
|||
EAPI E_Border *e_util_desk_border_above(E_Border *bd);
|
||||
EAPI E_Border *e_util_desk_border_below(E_Border *bd);
|
||||
EAPI int e_util_edje_collection_exists(char *file, char *coll);
|
||||
EAPI void e_util_dialog_internal(char *title, char *txt);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue