add a cmd-line opt to skip format test...

SVN revision: 39891
This commit is contained in:
Carsten Haitzler 2009-04-08 08:30:13 +00:00
parent d2975ac947
commit 9b244804e9
2 changed files with 73 additions and 63 deletions

View File

@ -61,6 +61,8 @@ static void my_free_hook(void *p, const void *caller)
EAPI int e_precache_end = 0;
static int really_know = 0;
/* local subsystem functions */
static void _e_main_shutdown_push(int (*func)(void));
static void _e_main_shutdown(int errorcode);
@ -307,6 +309,15 @@ main(int argc, char **argv)
i++;
e_util_env_set("E_CONF_PROFILE", argv[i]);
}
else if (!strcmp(argv[i], "-i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it"))
{
really_know = 1;
}
else if (!strcmp(argv[i], "-locked"))
{
locked = 1;
puts("enlightenment will start with desklock on.");
}
else if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--help")))
@ -332,16 +343,13 @@ main(int argc, char **argv)
"\t-psychotic\n"
"\t\tBe psychotic.\n"
"\t-locked\n"
"\t\tstart with desklock on, so password will be asked.\n"
"\t\tStart with desklock on, so password will be asked.\n"
"\t-i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it\n"
"\t\tIf you need this help, you don't need this option.\n"
)
);
exit(0);
}
else if (!strcmp(argv[i], "-locked"))
{
locked = 1;
puts("enlightenment will start with desklock on.");
}
}
/* fix up DISPLAY to be :N.0 if no .screen is in it */
@ -665,65 +673,67 @@ main(int argc, char **argv)
_e_main_shutdown_push(e_init_shutdown);
pause();
}
e_init_status_set(_("Testing Format Support"));
TS("test file format support");
if (!really_know)
{
Ecore_Evas *ee;
Evas_Object *im, *txt;
char buf[4096];
Evas_Coord tw, th;
ee = ecore_evas_buffer_new(1, 1);
if (!ee)
{
e_error_message_show(_("Enlightenment found Evas can't create a buffer canvas. Please check\n"
"Evas has Software Buffer engine support.\n"));
_e_main_shutdown(-1);
}
e_canvas_add(ee);
im = evas_object_image_add(ecore_evas_get(ee));
snprintf(buf, sizeof(buf), "%s/data/images/test.png", e_prefix_data_get());
evas_object_image_file_set(im, buf, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load PNG files. Check Evas has PNG\n"
"loader support.\n"));
_e_main_shutdown(-1);
}
snprintf(buf, sizeof(buf), "%s/data/images/test.jpg", e_prefix_data_get());
evas_object_image_file_set(im, buf, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load JPEG files. Check Evas has JPEG\n"
"loader support.\n"));
_e_main_shutdown(-1);
}
snprintf(buf, sizeof(buf), "%s/data/images/test.edj", e_prefix_data_get());
evas_object_image_file_set(im, buf, "images/0");
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load EET files. Check Evas has EET\n"
"loader support.\n"));
_e_main_shutdown(-1);
}
evas_object_del(im);
txt = evas_object_text_add(ecore_evas_get(ee));
evas_object_text_font_set(txt, "Sans", 10);
evas_object_text_text_set(txt, "Hello");
evas_object_geometry_get(txt, NULL, NULL, &tw, &th);
if ((tw <= 0) && (th <= 0))
e_init_status_set(_("Testing Format Support"));
TS("test file format support");
{
e_error_message_show(_("Enlightenment found Evas can't load the 'Sans' font. Check Evas has fontconfig\n"
"support and system fontconfig defines a 'Sans' font.\n"));
_e_main_shutdown(-1);
Ecore_Evas *ee;
Evas_Object *im, *txt;
char buf[4096];
Evas_Coord tw, th;
ee = ecore_evas_buffer_new(1, 1);
if (!ee)
{
e_error_message_show(_("Enlightenment found Evas can't create a buffer canvas. Please check\n"
"Evas has Software Buffer engine support.\n"));
_e_main_shutdown(-1);
}
e_canvas_add(ee);
im = evas_object_image_add(ecore_evas_get(ee));
snprintf(buf, sizeof(buf), "%s/data/images/test.png", e_prefix_data_get());
evas_object_image_file_set(im, buf, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load PNG files. Check Evas has PNG\n"
"loader support.\n"));
_e_main_shutdown(-1);
}
snprintf(buf, sizeof(buf), "%s/data/images/test.jpg", e_prefix_data_get());
evas_object_image_file_set(im, buf, NULL);
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load JPEG files. Check Evas has JPEG\n"
"loader support.\n"));
_e_main_shutdown(-1);
}
snprintf(buf, sizeof(buf), "%s/data/images/test.edj", e_prefix_data_get());
evas_object_image_file_set(im, buf, "images/0");
if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
{
e_error_message_show(_("Enlightenment found Evas can't load EET files. Check Evas has EET\n"
"loader support.\n"));
_e_main_shutdown(-1);
}
evas_object_del(im);
txt = evas_object_text_add(ecore_evas_get(ee));
evas_object_text_font_set(txt, "Sans", 10);
evas_object_text_text_set(txt, "Hello");
evas_object_geometry_get(txt, NULL, NULL, &tw, &th);
if ((tw <= 0) && (th <= 0))
{
e_error_message_show(_("Enlightenment found Evas can't load the 'Sans' font. Check Evas has fontconfig\n"
"support and system fontconfig defines a 'Sans' font.\n"));
_e_main_shutdown(-1);
}
evas_object_del(txt);
e_canvas_del(ee);
ecore_evas_free(ee);
}
evas_object_del(txt);
e_canvas_del(ee);
ecore_evas_free(ee);
}
e_init_status_set(_("Setup Screens"));

View File

@ -856,7 +856,7 @@ wp_browser_new(E_Container *con)
snprintf(buf, sizeof(buf), "%s/data/backgrounds", e_prefix_data_get());
info->dirs = eina_list_append(info->dirs, strdup(buf));
e_win_title_set(win, _("Wallpaer Settings"));
e_win_title_set(win, _("Wallpaper Settings"));
e_win_name_class_set(win, "E", "_config_wallpaper_dialog");
e_win_border_icon_set(win, "preferences-desktop-wallpaper");
e_win_resize_callback_set(win, _resize);