forked from enlightenment/efl
Use ifdef instead of if for strict spec.
SVN revision: 29338
This commit is contained in:
parent
1e0ad5e156
commit
8ec72de321
|
@ -48,11 +48,16 @@ AM_CONDITIONAL(HAVE_ECORE_DESKTOP, test "x$have_ecore_desktop" = xyes)
|
||||||
AC_ARG_ENABLE(strict-spec,
|
AC_ARG_ENABLE(strict-spec,
|
||||||
[AC_HELP_STRING([--enable-strict-spec],[Enable strict spec compliance])],
|
[AC_HELP_STRING([--enable-strict-spec],[Enable strict spec compliance])],
|
||||||
[enable_strict_spec=$enableval], [enable_strict_spec="auto"])
|
[enable_strict_spec=$enableval], [enable_strict_spec="auto"])
|
||||||
STRICT_SPEC=0
|
|
||||||
if test "x$enable_strict_spec" = "xyes" ; then
|
if test "x$enable_strict_spec" = "xyes" ; then
|
||||||
STRICT_SPEC=1
|
AC_DEFINE(STRICT_SPEC, 1, [Strict Spec Compliance])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(sloppy-spec,
|
||||||
|
[AC_HELP_STRING([--enable-sloppy-spec],[Enable sloppy spec compliance])],
|
||||||
|
[enable_sloppy_spec=$enableval], [enable_sloppy_spec="auto"])
|
||||||
|
if test "x$enable_sloppy_spec" = "xyes" ; then
|
||||||
|
AC_DEFINE(SLOPPY_SPEC, 1, [Sloppy Spec Compliance])
|
||||||
fi
|
fi
|
||||||
AC_DEFINE_UNQUOTED(STRICT_SPEC, $STRICT_SPEC, [Strict Spec Compliance])
|
|
||||||
|
|
||||||
CFLAGS=$PCFLAGS
|
CFLAGS=$PCFLAGS
|
||||||
|
|
||||||
|
|
|
@ -669,7 +669,7 @@ efreet_desktop_string_list_parse(const char *string)
|
||||||
/* If this is true, the .desktop file does not follow the standard */
|
/* If this is true, the .desktop file does not follow the standard */
|
||||||
if (*s)
|
if (*s)
|
||||||
{
|
{
|
||||||
#if STRICT_SPEC
|
#ifdef STRICT_SPEC
|
||||||
printf("[Efreet]: Found a string list without ';' "
|
printf("[Efreet]: Found a string list without ';' "
|
||||||
"at the end: %s\n", string);
|
"at the end: %s\n", string);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1191,7 +1191,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
|
||||||
exec[len++] = *p;
|
exec[len++] = *p;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#if STRICT_SPEC
|
#ifdef STRICT_SPEC
|
||||||
printf("[Efreet]: Unknown conversion character: '%c'\n", *p);
|
printf("[Efreet]: Unknown conversion character: '%c'\n", *p);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -184,7 +184,7 @@ efreet_icon_theme_list_get(void)
|
||||||
|
|
||||||
theme = ecore_hash_get(efreet_icon_themes, dir);
|
theme = ecore_hash_get(efreet_icon_themes, dir);
|
||||||
if (theme->hidden || theme->fake) continue;
|
if (theme->hidden || theme->fake) continue;
|
||||||
#if !STRICT_SPEC
|
#ifndef STRICT_SPEC
|
||||||
if (!theme->name.name) continue;
|
if (!theme->name.name) continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -583,7 +583,7 @@ efreet_icon_fallback_dir_scan(const char *dir, const char *icon_name)
|
||||||
if (ecore_file_exists(path))
|
if (ecore_file_exists(path))
|
||||||
{
|
{
|
||||||
icon = efreet_icon_new(path);
|
icon = efreet_icon_new(path);
|
||||||
#if STRICT_SPEC
|
#ifdef STRICT_SPEC
|
||||||
if (icon)
|
if (icon)
|
||||||
printf("[Efreet]: Found an icon that already has an extension: %s\n", path);
|
printf("[Efreet]: Found an icon that already has an extension: %s\n", path);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1800,7 +1800,7 @@ efreet_menu_handle_legacy_dir_helper(Efreet_Menu_Internal *root,
|
||||||
|
|
||||||
efreet_menu_create_app_dirs_list(legacy_internal);
|
efreet_menu_create_app_dirs_list(legacy_internal);
|
||||||
ecore_list_append(legacy_internal->app_dirs, app_dir);
|
ecore_list_append(legacy_internal->app_dirs, app_dir);
|
||||||
#if !STRICT_SPEC
|
#ifndef STRICT_SPEC
|
||||||
if (root)
|
if (root)
|
||||||
{
|
{
|
||||||
/* XXX This seems wrong, but it makes efreet pass the fdo tests */
|
/* XXX This seems wrong, but it makes efreet pass the fdo tests */
|
||||||
|
@ -1999,7 +1999,7 @@ efreet_menu_handle_old(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
|
||||||
|
|
||||||
/* If we already moved this menu, remove the old move */
|
/* If we already moved this menu, remove the old move */
|
||||||
/* XXX This seems wrong, but it makes efreet pass the fdo tests */
|
/* XXX This seems wrong, but it makes efreet pass the fdo tests */
|
||||||
#if !STRICT_SPEC
|
#ifndef STRICT_SPEC
|
||||||
move = ecore_list_find(parent->moves,
|
move = ecore_list_find(parent->moves,
|
||||||
ECORE_COMPARE_CB(efreet_menu_cb_move_compare), xml->text);
|
ECORE_COMPARE_CB(efreet_menu_cb_move_compare), xml->text);
|
||||||
if (move) ecore_list_remove_destroy(parent->moves);
|
if (move) ecore_list_remove_destroy(parent->moves);
|
||||||
|
@ -3494,7 +3494,7 @@ efreet_menu_directory_get(Efreet_Menu_Internal *internal, const char *path)
|
||||||
static int
|
static int
|
||||||
efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b)
|
efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b)
|
||||||
{
|
{
|
||||||
#if STRICT_SPEC
|
#ifdef STRICT_SPEC
|
||||||
return strcmp(ecore_file_get_file(a->desktop->orig_path), ecore_file_get_file(b->desktop->orig_path));
|
return strcmp(ecore_file_get_file(a->desktop->orig_path), ecore_file_get_file(b->desktop->orig_path));
|
||||||
#else
|
#else
|
||||||
return strcasecmp(a->desktop->name, b->desktop->name);
|
return strcasecmp(a->desktop->name, b->desktop->name);
|
||||||
|
|
Loading…
Reference in New Issue