Initial import of efreet, an implementation of the freedesktop icon and menu

specs.


SVN revision: 28214
devs/devilhorns/wayland_egl
ningerso 17 years ago committed by ningerso
parent 5bcce9f86b
commit 9e363d07e9
  1. 4
      legacy/efreet/AUTHORS
  2. 20
      legacy/efreet/COPYING
  3. 1252
      legacy/efreet/Doxyfile
  4. 48
      legacy/efreet/NOTES
  5. 20
      legacy/efreet/TODO
  6. 16
      legacy/efreet/autogen.sh
  7. 80
      legacy/efreet/configure.in
  8. 59
      legacy/efreet/efreet-config.in
  9. 15
      legacy/efreet/m4/ac_attribute.m4
  10. 47
      legacy/efreet/m4/ac_define_dir.m4
  11. 138
      legacy/efreet/m4/ac_path_generic.m4
  12. 4
      legacy/efreet/src/Makefile.am
  13. 25
      legacy/efreet/src/bin/Makefile.am
  14. 29
      legacy/efreet/src/bin/compare/Makefile.am
  15. 528
      legacy/efreet/src/bin/compare/comp.h
  16. 43
      legacy/efreet/src/bin/compare/compare_results.c
  17. 29
      legacy/efreet/src/bin/compare/ecore_alloc.c
  18. 26
      legacy/efreet/src/bin/compare/efreet_alloc.c
  19. 23
      legacy/efreet/src/bin/compare/efreet_menu_alloc.c
  20. 297
      legacy/efreet/src/bin/ef_data_dirs.c
  21. 346
      legacy/efreet/src/bin/ef_desktop.c
  22. 602
      legacy/efreet/src/bin/ef_icon_theme.c
  23. 157
      legacy/efreet/src/bin/ef_ini.c
  24. 83
      legacy/efreet/src/bin/ef_locale.c
  25. 75
      legacy/efreet/src/bin/ef_menu.c
  26. 58
      legacy/efreet/src/bin/efreet_spec_test.c
  27. 142
      legacy/efreet/src/bin/main.c
  28. 44
      legacy/efreet/src/lib/Efreet.h
  29. 37
      legacy/efreet/src/lib/Makefile.am
  30. 191
      legacy/efreet/src/lib/efreet.c
  31. 212
      legacy/efreet/src/lib/efreet_base.c
  32. 31
      legacy/efreet/src/lib/efreet_base.h
  33. 1469
      legacy/efreet/src/lib/efreet_desktop.c
  34. 120
      legacy/efreet/src/lib/efreet_desktop.h
  35. 1365
      legacy/efreet/src/lib/efreet_icon.c
  36. 178
      legacy/efreet/src/lib/efreet_icon.h
  37. 1464
      legacy/efreet/src/lib/efreet_icon_new.c
  38. 651
      legacy/efreet/src/lib/efreet_ini.c
  39. 60
      legacy/efreet/src/lib/efreet_ini.h
  40. 3946
      legacy/efreet/src/lib/efreet_menu.c
  41. 69
      legacy/efreet/src/lib/efreet_menu.h
  42. 183
      legacy/efreet/src/lib/efreet_private.h
  43. 579
      legacy/efreet/src/lib/efreet_xml.c
  44. 61
      legacy/efreet/src/lib/efreet_xml.h

@ -0,0 +1,4 @@
dan 'dj2' sinclair
Brian 'rephorm' Mattern
Sebastian 'englebass' Dransfeld
Nathan 'RbdPngn' Ingersoll

@ -0,0 +1,20 @@
Copyright (C) 2006 dan sinclair and various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies of the Software, its documentation and marketing & publicity
materials, and acknowledgment shall be given in the documentation, materials
and software packages that this Software was used.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,48 @@
rephorm one thing. if you plan to add .desktop editing, according to the
spec you need to keep EVERYTHING around (even sections / keys you don't know
/ care about)
dj2 k
rephorm but for most usage (read only) thats a waste of memory
dj2 hm, i guess the best way to do that is keep everything in a hash
dj2 and write accessor functions
dj2 or pull the common stuff out to functions and leve the rest in the hash
rephorm and maybe have a flag for 'readonly' to kill the hash
dj2 yea, will have to put some tought into the api for that
rephorm ooh. comments need to be preserved also in edits
rephorm efreet_xml has one bug that i see
rephorm if you have something like <tag>before<child />after</tag>, you
can't get to the 'after' text
dj2 hm, will have to look at that
rephorm (it stores 'before' as the text on 'tag')
rephorm it should probably create child nodes with the text
rephorm so tag would have 3 children, text: before, tag: child and text: after
efreet_desktop_string_list_parse() needs to optionally use comma (',') as
the separator if the desktop version is < 1.0 (but, what if it isn't set??)
desktop_command_get:
check for needed types (nNfFuU)
get lists of needed types (dirs, fullpaths, urls, etc)
if type in uU:
create Pending struct
start downloads, pass Pending in as data
else:
if tyep in UF...
exec
download cb:
if type in fF

@ -0,0 +1,20 @@
TODO
----
- Efreet_Menu should setup an Ecore_File_Monitor on the .menu files and the
app_dir and reload the menu when needed
- .desktop saving
- We need a better system to distinguish between when a user wants to create a
new .desktop file and when he wants to parse an existing file.
- The move handling is wrong when moving to a destination with /'s in the
name. We should be creating intermediate menus for each of the /'d items
instead of just making the name as we do now
Notes from the Menu Spec test
-----------------------------
- We're appending the / to the menu names in the test case. We should
possibly be doing that in the efreet code itself.

@ -0,0 +1,16 @@
#!/bin/sh
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
touch README
echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
echo "Running autoheader..." ; autoheader || exit 1
echo "Running autoconf..." ; autoconf || exit 1
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
if [ -z "$NOCONFIGURE" ]; then
./configure "$@"
fi

@ -0,0 +1,80 @@
AC_INIT(configure.in)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(efreet, 0.0.3)
AM_CONFIG_HEADER(config.h)
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL
AC_C___ATTRIBUTE__
dnl Set PACKAGE_DATA_DIR in config.h.
AC_DEFINE_DIR([PACKAGE_DATA_DIR], [datadir], [Shared Data Directory.])
PCFLAGS=$CFLAGS
AC_PATH_GENERIC(ecore, 0.9.9,
[ ],
[
AC_MSG_ERROR([
ERROR:
The ecore-config development script was not found in your execute
path. This may mean one of several things
1. You may not have installed the ecore-devel (or ecore-dev) packages.
2. You may have ecore installed somewhere not covered by your path.
If this is the case make sure you have the packages installed, AND
that the ecore-config script is in your execute path (see your
shell's manual page on setting the \$PATH environment variable), OR
alternatively, specify the script to use with --with-ecore-config.
])
]
)
CFLAGS=$ECORE_CFLAGS" "$CFLAGS
requirements="ecore"
AC_ARG_ENABLE(ecore-desktop,
[AC_HELP_STRING([--enable-ecore-desktop],[Enable Ecore_Desktop tests])],
[enable_ecore_desktop=$enableval], [enable_ecore_desktop="auto"])
have_ecore_desktop=no
if test "x$enable_ecore_desktop" != "xno" ; then
AC_CHECK_HEADER(Ecore_Desktop.h,
[have_ecore_desktop=yes],
[], [])
if test "x$have_ecore_desktop" = "xyes" ; then
AC_DEFINE(ENABLE_ECORE_DESKTOP, 1, [Enable Ecore_Desktop])
elif test "x$enable_ecore_desktop" = "xyes" ; then
AC_MSG_ERROR(No Ecore_Desktop found disabling comparison tests.)
fi
fi
AM_CONDITIONAL(HAVE_ECORE_DESKTOP, test "x$have_ecore_desktop" = xyes)
AC_ARG_ENABLE(strict-spec,
[AC_HELP_STRING([--enable-strict-spec],[Enable strict spec compliance])],
[enable_strict_spec=$enableval], [enable_strict_spec="auto"])
STRICT_SPEC=0
if test "x$enable_strict_spec" = "xyes" ; then
STRICT_SPEC=1
fi
AC_DEFINE_UNQUOTED(STRICT_SPEC, $STRICT_SPEC, [Strict Spec Compliance])
CFLAGS=$PCFLAGS
AC_SUBST(requirements)
AC_OUTPUT([
efreet-config
Makefile
src/Makefile
src/lib/Makefile
src/bin/Makefile
src/bin/data/Makefile
src/bin/data/sub/Makefile
src/bin/compare/Makefile
], []
)

@ -0,0 +1,59 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
usage="\
Usage: efreet-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
;;
--cflags)
if test @prefix@/include != /usr/include ; then
includes="-I@prefix@/include"
fi
echo $includes @ECORE_CFLAGS@ -I$prefix/include/efreet
;;
--libs)
libdirs=-L@libdir@
echo $libdirs -lefreet @ECORE_LIBS@
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
exit 0

@ -0,0 +1,15 @@
AC_DEFUN([AC_C___ATTRIBUTE__],
[
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
AC_TRY_COMPILE([#include <stdlib.h>
int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
[],
ac_cv___attribute__=yes, ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
fi
AC_MSG_RESULT($ac_cv___attribute__)
])

@ -0,0 +1,47 @@
##### http://autoconf-archive.cryp.to/ac_define_dir.html
#
# SYNOPSIS
#
# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
#
# DESCRIPTION
#
# This macro sets VARNAME to the expansion of the DIR variable,
# taking care of fixing up ${prefix} and such.
#
# VARNAME is then offered as both an output variable and a C
# preprocessor symbol.
#
# Example:
#
# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
#
# LAST MODIFICATION
#
# 2006-10-13
#
# COPYLEFT
#
# Copyright (c) 2006 Stepan Kasal <kasal@ucw.cz>
# Copyright (c) 2006 Andreas Schwab <schwab@suse.de>
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2006 Alexandre Oliva
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved.
AC_DEFUN([AC_DEFINE_DIR], [
prefix_NONE=
exec_prefix_NONE=
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
dnl refers to ${prefix}. Thus we have to use `eval' twice.
eval ac_define_dir="\"[$]$2\""
eval ac_define_dir="\"$ac_define_dir\""
AC_SUBST($1, "$ac_define_dir")
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
])

@ -0,0 +1,138 @@
dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl
dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
dnl
dnl The script must support `--cflags' and `--libs' args.
dnl If MINIMUM-VERSION is specified, the script must also support the
dnl `--version' arg.
dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
dnl it must also support `--prefix' and `--exec-prefix'.
dnl (In other words, it must be like gtk-config.)
dnl
dnl For example:
dnl
dnl AC_PATH_GENERIC(Foo, 1.0.0)
dnl
dnl would run `foo-config --version' and check that it is at least 1.0.0
dnl
dnl If so, the following would then be defined:
dnl
dnl FOO_CFLAGS to `foo-config --cflags`
dnl FOO_LIBS to `foo-config --libs`
dnl
dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
dnl
dnl @author Angus Lees <gusl@cse.unsw.edu.au>
AC_DEFUN([AC_PATH_GENERIC],
[dnl
dnl we're going to need uppercase, lowercase and user-friendly versions of the
dnl string `LIBRARY'
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
dnl
dnl Get the cflags and libraries from the LIBRARY-config script
dnl
AC_ARG_WITH(DOWN-prefix,
[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
AC_ARG_WITH(DOWN-exec-prefix,
[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
if test x$DOWN[]_config_exec_prefix != x ; then
DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
if test x${UP[]_CONFIG+set} != xset ; then
UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
fi
fi
if test x$DOWN[]_config_prefix != x ; then
DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
if test x${UP[]_CONFIG+set} != xset ; then
UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
fi
fi
AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
ifelse([$2], ,
AC_MSG_CHECKING(for $1),
AC_MSG_CHECKING(for $1 - version >= $2)
)
no_[]DOWN=""
if test "$UP[]_CONFIG" = "no" ; then
no_[]DOWN=yes
else
UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
ifelse([$2], , ,[
DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
# Compare wanted version to what config script returned.
# If I knew what library was being run, i'd probably also compile
# a test program at this point (which also extracted and tested
# the version in some library-specific way)
if test "$DOWN[]_config_major_version" -lt \
"$DOWN[]_wanted_major_version" \
-o \( "$DOWN[]_config_major_version" -eq \
"$DOWN[]_wanted_major_version" \
-a "$DOWN[]_config_minor_version" -lt \
"$DOWN[]_wanted_minor_version" \) \
-o \( "$DOWN[]_config_major_version" -eq \
"$DOWN[]_wanted_major_version" \
-a "$DOWN[]_config_minor_version" -eq \
"$DOWN[]_wanted_minor_version" \
-a "$DOWN[]_config_micro_version" -lt \
"$DOWN[]_wanted_micro_version" \) ; then
# older version found
no_[]DOWN=yes
echo -n "*** An old version of $1 "
echo -n "($DOWN[]_config_major_version"
echo -n ".$DOWN[]_config_minor_version"
echo ".$DOWN[]_config_micro_version) was found."
echo -n "*** You need a version of $1 newer than "
echo -n "$DOWN[]_wanted_major_version"
echo -n ".$DOWN[]_wanted_minor_version"
echo ".$DOWN[]_wanted_micro_version."
echo "***"
echo "*** If you have already installed a sufficiently new version, this error"
echo "*** probably means that the wrong copy of the DOWN-config shell script is"
echo "*** being found. The easiest way to fix this is to remove the old version"
echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
echo "*** correct copy of DOWN-config. (In this case, you will have to"
echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
echo "*** so that the correct libraries are found at run-time)"
fi
])
fi
if test "x$no_[]DOWN" = x ; then
AC_MSG_RESULT(yes)
ifelse([$3], , :, [$3])
else
AC_MSG_RESULT(no)
if test "$UP[]_CONFIG" = "no" ; then
echo "*** The DOWN-config script installed by $1 could not be found"
echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the UP[]_CONFIG environment variable to the"
echo "*** full path to DOWN-config."
fi
UP[]_CFLAGS=""
UP[]_LIBS=""
ifelse([$4], , :, [$4])
fi
AC_SUBST(UP[]_CFLAGS)
AC_SUBST(UP[]_LIBS)
popdef([UP])
popdef([DOWN])
])

@ -0,0 +1,4 @@
SUBDIRS = lib bin
MAINTAINERCLEANFILES = Makefile.in

@ -0,0 +1,25 @@
SUBDIRS = data compare
MAINTAINERCLEANFILES = Makefile.in
INCLUDES = \
-I. -I$(top_srcdir)/src/lib @ECORE_CFLAGS@
bin_PROGRAMS = efreet_test efreet_spec_test
efreet_test_DEPENDENCIES = $(top_builddir)/src/lib/libefreet.la
efreet_test_LDADD = $(top_builddir)/src/lib/libefreet.la @ECORE_LIBS@
efreet_test_SOURCES = \
ef_data_dirs.c \
ef_icon_theme.c \
ef_ini.c \
ef_locale.c \
ef_desktop.c \
ef_menu.c \
main.c
efreet_spec_test_DEPENDENCIES = $(top_builddir)/src/lib/libefreet.la
efreet_spec_test_LDADD = $(top_builddir)/src/lib/libefreet.la
efreet_spec_test_SOURCES = \
efreet_spec_test.c

@ -0,0 +1,29 @@
MAINTAINERCLEANFILES = Makefile.in
INCLUDES = \
-I. -I$(top_srcdir)/src/lib @ECORE_CFLAGS@
if HAVE_ECORE_DESKTOP
bin_PROGRAMS = efreet_alloc ecore_alloc compare_results efreet_menu_alloc
else
bin_PROGRAMS = efreet_alloc efreet_menu_alloc
endif
efreet_menu_alloc_DEPENDENCIES = $(top_builddir)/src/lib/libefreet.la
efreet_menu_alloc_SOURCES = efreet_menu_alloc.c comp.h
efreet_menu_alloc_LDADD = $(top_builddir)/src/lib/libefreet.la @ECORE_LIBS@
efreet_alloc_DEPENDENCIES = $(top_builddir)/src/lib/libefreet.la
efreet_alloc_SOURCES = efreet_alloc.c comp.h
efreet_alloc_LDADD = $(top_builddir)/src/lib/libefreet.la @ECORE_LIBS@
if HAVE_ECORE_DESKTOP
ecore_alloc_DEPENDENCIES =
ecore_alloc_SOURCES = ecore_alloc.c comp.h
ecore_alloc_LDADD = @ECORE_LIBS@
compare_results_DEPENDENCIES = $(top_builddir)/src/lib/libefreet.la
compare_results_SOURCES = compare_results.c comp.h
compare_results_LDADD = $(top_builddir)/src/lib/libefreet.la @ECORE_LIBS@
endif

@ -0,0 +1,528 @@
#ifndef COMP_H
#define COMP_H
#define LOOPS 1000
#define THEME "Tango"
#define SIZE "16x16"
#define ADDRESS_BOOK_NEW "address-book-new"
#define APPLICATION_EXIT "application-exit"
#define APPOINTMENT_NEW "appointment-new"
#define CONTACT_NEW "contact-new"
#define DIALOG_APPLY "dialog-apply"
#define DIALOG_CANCEL "dialog-cancel"
#define DIALOG_CLOSE "dialog-close"
#define DIALOG_OK "dialog-ok"
#define DOCUMENT_NEW "document-new"
#define DOCUMENT_OPEN "document-open"
#define DOCUMENT_OPEN_RECENT "document-open-recent"
#define DOCUMENT_PAGE_SETUP "document-page-setup"
#define DOCUMENT_PRINT "document-print"
#define DOCUMENT_PRINT_PREVIEW "document-print-preview"
#define DOCUMENT_PROPERTIES "document-properties"
#define DOCUMENT_REVERT "document-revert"
#define DOCUMENT_SAVE "document-save"
#define DOCUMENT_SAVE_AS "document-save-as"
#define EDIT_COPY "edit-copy"
#define EDIT_CUT "edit-cut"
#define EDIT_DELETE "edit-delete"
#define EDIT_FIND "edit-find"
#define EDIT_FIND_REPLACE "edit-find-replace"
#define EDIT_PASTE "edit-paste"
#define EDIT_REDO "edit-redo"
#define EDIT_SELECT_ALL "edit-select-all"
#define EDIT_UNDO "edit-undo"
#define FORMAT_INDENT_LESS "format-indent-less"
#define FORMAT_INDENT_MORE "format-indent-more"
#define FORMAT_JUSTIFY_CENTER "format-justify-center"
#define FORMAT_JUSTIFY_FILL "format-justify-fill"
#define FORMAT_JUSTIFY_LEFT "format-justify-left"
#define FORMAT_JUSTIFY_RIGHT "format-justify-right"
#define FORMAT_TEXT_DIRECTION_LTR "format-text-direction-ltr"
#define FORMAT_TEXT_DIRECTION_RTL "format-text-direction-rtl"
#define FORMAT_TEXT_BOLD "format-text-bold"
#define FORMAT_TEXT_ITALIC "format-text-italic"
#define FORMAT_TEXT_UNDERLINE "format-text-underline"
#define FORMAT_TEXT_STRIKETHROUGH "format-text-strikethrough"
#define GO_BOTTOM "go-bottom"
#define GO_DOWN "go-down"
#define GO_FIRST "go-first"
#define GO_HOME "go-home"
#define GO_JUMP "go-jump"
#define GO_LAST "go-last"
#define GO_NEXT "go-next"
#define GO_PREVIOUS "go-previous"
#define GO_TOP "go-top"
#define GO_UP "go-up"
#define HELP_ABOUT "help-about"
#define HELP_CONTENTS "help-contents"
#define HELP_FAQ "help-faq"
#define INSERT_IMAGE "insert-image"
#define INSERT_LINK "insert-link"
#define INSERT_OBJECT "insert-object"
#define INSERT_TEXT "insert-text"
#define LIST_ADD "list-add"
#define LIST_REMOVE "list-remove"
#define MAIL_FORWARD "mail-forward"
#define MAIL_MARK_IMPORTANT "mail-mark-important"
#define MAIL_MARK_JUNK "mail-mark-junk"
#define MAIL_MARK_NOTJUNK "mail-mark-notjunk"
#define MAIL_MARK_READ "mail-mark-read"
#define MAIL_MARK_UNREAD "mail-mark-unread"
#define MAIL_MESSAGE_NEW "mail-message-new"
#define MAIL_REPLY_ALL "mail-reply-all"
#define MAIL_REPLY_SENDER "mail-reply-sender"
#define MAIL_SEND_RECEIVE "mail-send-receive"
#define MEDIA_EJECT "media-eject"
#define MEDIA_PLAYBACK_PAUSE "media-playback-pause"
#define MEDIA_PLAYBACK_START "media-playback-start"
#define MEDIA_PLAYBACK_STOP "media-playback-stop"
#define MEDIA_RECORD "media-record"
#define MEDIA_SEEK_BACKWARD "media-seek-backward"
#define MEDIA_SEEK_FORWARD "media-seek-forward"
#define MEDIA_SKIP_BACKWARD "media-skip-backward"
#define MEDIA_SKIP_FORWARD "media-skip-forward"
#define SYSTEM_LOCK_SCREEN "system-lock-screen"
#define SYSTEM_LOG_OUT "system-log-out"
#define SYSTEM_RUN "system-run"
#define SYSTEM_SEARCH "system-search"
#define TOOLS_CHECK_SPELLING "tools-check-spelling"
#define VIEW_FULLSCREEN "view-fullscreen"
#define VIEW_REFRESH "view-refresh"
#define VIEW_SORT_ASCENDING "view-sort-ascending"
#define VIEW_SORT_DESCENDING "view-sort-descending"
#define WINDOW_CLOSE "window-close"
#define WINDOW_NEW "window-new"
#define ZOOM_BEST_FIT "zoom-best-fit"
#define ZOOM_IN "zoom-in"
#define ZOOM_ORIGINAL "zoom-original"
#define ZOOM_OUT "zoom-out"
#define PROCESS_WORKING "process-working"
#define ACCESSORIES_CALCULATOR "accessories-calculator"
#define ACCESSORIES_CHARACTER_MAP "accessories-character-map"
#define ACCESSORIES_DICTIONARY "accessories-dictionary"
#define ACCESSORIES_TEXT_EDITOR "accessories-text-editor"
#define HELP_BROWSER "help-browser"
#define MULTIMEDIA_VOLUME_CONTROL "multimedia-volume-control"
#define PREFERENCES_DESKTOP_ACCESSIBILITY "preferences-desktop-accessibility"
#define PREFERENCES_DESKTOP_FONT "preferences-desktop-font"
#define PREFERENCES_DESKTOP_KEYBOARD "preferences-desktop-keyboard"
#define PREFERENCES_DESKTOP_LOCALE "preferences-desktop-locale"
#define PREFERENCES_DESKTOP_MULTIMEDIA "preferences-desktop-multimedia"
#define PREFERENCES_DESKTOP_SCREENSAVER "preferences-desktop-screensaver"
#define PREFERENCES_DESKTOP_THEME "preferences-desktop-theme"
#define PREFERENCES_DESKTOP_WALLPAPER "preferences-desktop-wallpaper"
#define SYSTEM_FILE_MANAGER "system-file-manager"
#define SYSTEM_SOFTWARE_UPDATE "system-software-update"
#define UTILITIES_TERMINAL "utilities-terminal"
#define APPLICATIONS_ACCESSORIES "applications-accessories"
#define APPLICATIONS_DEVELOPMENT "applications-development"
#define APPLICATIONS_GAMES "applications-games"
#define APPLICATIONS_GRAPHICS "applications-graphics"
#define APPLICATIONS_INTERNET "applications-internet"
#define APPLICATIONS_MULTIMEDIA "applications-multimedia"
#define APPLICATIONS_OFFICE "applications-office"
#define APPLICATIONS_OTHER "applications-other"
#define APPLICATIONS_SYSTEM "applications-system"
#define APPLICATIONS_UTILITIES "applications-utilities"
#define PREFERENCES_DESKTOP "preferences-desktop"
#define PREFERENCES_DESKTOP_ACCESSIBILITY "preferences-desktop-accessibility"
#define PREFERENCES_DESKTOP_PERIPHERALS "preferences-desktop-peripherals"
#define PREFERENCES_DESKTOP_PERSONAL "preferences-desktop-personal"
#define PREFERENCES_OTHER "preferences-other"
#define PREFERENCES_SYSTEM "preferences-system"
#define PREFERENCES_SYSTEM_NETWORK "preferences-system-network"
#define SYSTEM_HELP "system-help"
#define AUDIO_CARD "audio-card"
#define AUDIO_INPUT_MICROPHONE "audio-input-microphone"
#define BATTERY "battery"
#define CAMERA_PHOTO "camera-photo"
#define CAMERA_VIDEO "camera-video"
#define COMPUTER "computer"
#define DRIVE_CDROM "drive-cdrom"
#define DRIVE_HARDDISK "drive-harddisk"
#define DRIVE_REMOVABLE_MEDIA "drive-removable-media"
#define INPUT_GAMING "input-gaming"
#define INPUT_KEYBOARD "input-keyboard"
#define INPUT_MOUSE "input-mouse"
#define MEDIA_CDROM "media-cdrom"
#define MEDIA_FLOPPY "media-floppy"
#define MULTIMEDIA_PLAYER "multimedia-player"
#define NETWORK_WIRED "network-wired"
#define NETWORK_WIRELESS "network-wireless"
#define PRINTER "printer"
#define EMBLEM_DEFAULT "emblem-default"
#define EMBLEM_DOCUMENTS "emblem-documents"
#define EMBLEM_DOWNLOADS "emblem-downloads"
#define EMBLEM_FAVORITE "emblem-favorite"
#define EMBLEM_IMPORTANT "emblem-important"
#define EMBLEM_MAIL "emblem-mail"
#define EMBLEM_PHOTOS "emblem-photos"
#define EMBLEM_READONLY "emblem-readonly"
#define EMBLEM_SHARED "emblem-shared"
#define EMBLEM_SYMBOLIC_LINK "emblem-symbolic-link"
#define EMBLEM_SYNCHRONIZED "emblem-synchronized"
#define EMBLEM_SYSTEM "emblem-system"
#define EMBLEM_UNREADABLE "emblem-unreadable"
#define FACE_ANGEL "face-angel"
#define FACE_CRYING "face-crying"
#define FACE_DEVIL_GRIN "face-devil-grin"
#define FACE_DEVIL_SAD "face-devil-sad"
#define FACE_GLASSES "face-glasses"
#define FACE_KISS "face-kiss"
#define FACE_MONKEY "face-monkey"
#define FACE_PLAIN "face-plain"
#define FACE_SAD "face-sad"
#define FACE_SMILE "face-smile"
#define FACE_SMILE_BIG "face-smile-big"
#define FACE_SMIRK "face-smirk"
#define FACE_SURPRISE "face-surprise"
#define FACE_WINK "face-wink"
#define APPLICATION_X_EXECUTABLE "application-x-executable"
#define AUDIO_X_GENERIC "audio-x-generic"
#define FONT_X_GENERIC "font-x-generic"
#define IMAGE_X_GENERIC "image-x-generic"
#define PACKAGE_X_GENERIC "package-x-generic"
#define TEXT_HTML "text-html"
#define TEXT_X_GENERIC "text-x-generic"
#define TEXT_X_GENERIC_TEMPLATE "text-x-generic-template"
#define TEXT_X_SCRIPT "text-x-script"
#define VIDEO_X_GENERIC "video-x-generic"
#define X_OFFICE_ADDRESS_BOOK "x-office-address-book"
#define X_OFFICE_CALENDAR "x-office-calendar"
#define X_OFFICE_DOCUMENT "x-office-document"
#define X_OFFICE_PRESENTATION "x-office-presentation"
#define X_OFFICE_SPREADSHEET "x-office-spreadsheet"
#define FOLDER "folder"
#define FOLDER_REMOTE "folder-remote"
#define NETWORK_SERVER "network-server"
#define NETWORK_WORKGROUP "network-workgroup"
#define START_HERE "start-here"
#define USER_DESKTOP "user-desktop"
#define USER_HOME "user-home"
#define USER_TRASH "user-trash"
#define APPOINTMENT_MISSED "appointment-missed"
#define APPOINTMENT_SOON "appointment-soon"
#define AUDIO_VOLUME_HIGH "audio-volume-high"
#define AUDIO_VOLUME_LOW "audio-volume-low"
#define AUDIO_VOLUME_MEDIUM "audio-volume-medium"
#define AUDIO_VOLUME_MUTED "audio-volume-muted"
#define BATTERY_CAUTION "battery-caution"
#define BATTERY_LOW "battery-low"
#define DIALOG_ERROR "dialog-error"
#define DIALOG_INFORMATION "dialog-information"
#define DIALOG_PASSWORD "dialog-password"
#define DIALOG_QUESTION "dialog-question"
#define DIALOG_WARNING "dialog-warning"
#define FOLDER_DRAG_ACCEPT "folder-drag-accept"
#define FOLDER_OPEN "folder-open"
#define FOLDER_VISITING "folder-visiting"
#define IMAGE_LOADING "image-loading"
#define IMAGE_MISSING "image-missing"
#define MAIL_ATTACHMENT "mail-attachment"
#define MAIL_UNREAD "mail-unread"
#define MAIL_READ "mail-read"
#define MAIL_REPLIED "mail-replied"
#define MAIL_SIGNED "mail-signed"
#define MAIL_SIGNED_VERIFIED "mail-signed-verified"
#define MEDIA_PLAYLIST_REPEAT "media-playlist-repeat"
#define MEDIA_PLAYLIST_SHUFFLE "media-playlist-shuffle"
#define NETWORK_ERROR "network-error"
#define NETWORK_IDLE "network-idle"
#define NETWORK_OFFLINE "network-offline"
#define NETWORK_RECEIVE "network-receive"
#define NETWORK_TRANSMIT "network-transmit"
#define NETWORK_TRANSMIT_RECEIVE "network-transmit-receive"
#define PRINTER_ERROR "printer-error"
#define PRINTER_PRINTING "printer-printing"
#define SOFTWARE_UPDATE_AVAILABLE "software-update-available"
#define SOFTWARE_UPDATE_URGENT "software-update-urgent"
#define SYNC_ERROR "sync-error"
#define SYNC_SYNCHRONIZING "sync-synchronizing"
#define TASK_DUE "task-due"
#define TASK_PASSED_DUE "task-passed-due"
#define USER_AWAY "user-away"
#define USER_IDLE "user-idle"
#define USER_OFFLINE "user-offline"
#define USER_ONLINE "user-online"
#define USER_TRASH_FULL "user-trash-full"
#define WEATHER_CLEAR "weather-clear"
#define WEATHER_CLEAR_NIGHT "weather-clear-night"
#define WEATHER_FEW_CLOUDS "weather-few-clouds"
#define WEATHER_FEW_CLOUDS_NIGHT "weather-few-clouds-night"
#define WEATHER_FOG "weather-fog"
#define WEATHER_OVERCAST "weather-overcast"
#define WEATHER_SEVERE_ALERT "weather-severe-alert"
#define WEATHER_SHOWERS "weather-showers"
#define WEATHER_SHOWERS_SCATTERED "weather-showers-scattered"
#define WEATHER_SNOW "weather-snow"
#define WEATHER_STORM "weather-storm"
const char *icons[] = {
ADDRESS_BOOK_NEW,
APPLICATION_EXIT,
APPOINTMENT_NEW,
CONTACT_NEW,
DIALOG_APPLY,
DIALOG_CANCEL,
DIALOG_CLOSE,
DIALOG_OK,
DOCUMENT_NEW,
DOCUMENT_OPEN,
DOCUMENT_OPEN_RECENT,
DOCUMENT_PAGE_SETUP,
DOCUMENT_PRINT,
DOCUMENT_PRINT_PREVIEW,
DOCUMENT_PROPERTIES,
DOCUMENT_REVERT,
DOCUMENT_SAVE,
DOCUMENT_SAVE_AS,
EDIT_COPY,
EDIT_CUT,
EDIT_DELETE,
EDIT_FIND,
EDIT_FIND_REPLACE,
EDIT_PASTE,
EDIT_REDO,
EDIT_SELECT_ALL,
EDIT_UNDO,
FORMAT_INDENT_LESS,
FORMAT_INDENT_MORE,
FORMAT_JUSTIFY_CENTER,
FORMAT_JUSTIFY_FILL,
FORMAT_JUSTIFY_LEFT,
FORMAT_JUSTIFY_RIGHT,
FORMAT_TEXT_DIRECTION_LTR,
FORMAT_TEXT_DIRECTION_RTL,
FORMAT_TEXT_BOLD,
FORMAT_TEXT_ITALIC,
FORMAT_TEXT_UNDERLINE,
FORMAT_TEXT_STRIKETHROUGH,
GO_BOTTOM,
GO_DOWN,
GO_FIRST,
GO_HOME,
GO_JUMP,
GO_LAST,
GO_NEXT,
GO_PREVIOUS,
GO_TOP,
GO_UP,
HELP_ABOUT,
HELP_CONTENTS,
HELP_FAQ,
INSERT_IMAGE,
INSERT_LINK,
INSERT_OBJECT,
INSERT_TEXT,
LIST_ADD,
LIST_REMOVE,
MAIL_FORWARD,
MAIL_MARK_IMPORTANT,
MAIL_MARK_JUNK,
MAIL_MARK_NOTJUNK,
MAIL_MARK_READ,
MAIL_MARK_UNREAD,
MAIL_MESSAGE_NEW,
MAIL_REPLY_ALL,
MAIL_REPLY_SENDER,
MAIL_SEND_RECEIVE,
MEDIA_EJECT,
MEDIA_PLAYBACK_PAUSE,
MEDIA_PLAYBACK_START,
MEDIA_PLAYBACK_STOP,
MEDIA_RECORD,
MEDIA_SEEK_BACKWARD,
MEDIA_SEEK_FORWARD,
MEDIA_SKIP_BACKWARD,
MEDIA_SKIP_FORWARD,
SYSTEM_LOCK_SCREEN,
SYSTEM_LOG_OUT,
SYSTEM_RUN,
SYSTEM_SEARCH,
TOOLS_CHECK_SPELLING,
VIEW_FULLSCREEN,
VIEW_REFRESH,
VIEW_SORT_ASCENDING,
VIEW_SORT_DESCENDING,
WINDOW_CLOSE,
WINDOW_NEW,
ZOOM_BEST_FIT,
ZOOM_IN,
ZOOM_ORIGINAL,
ZOOM_OUT,
PROCESS_WORKING,
ACCESSORIES_CALCULATOR,
ACCESSORIES_CHARACTER_MAP,
ACCESSORIES_DICTIONARY,
ACCESSORIES_TEXT_EDITOR,
HELP_BROWSER,
MULTIMEDIA_VOLUME_CONTROL,
PREFERENCES_DESKTOP_ACCESSIBILITY,
PREFERENCES_DESKTOP_FONT,
PREFERENCES_DESKTOP_KEYBOARD,
PREFERENCES_DESKTOP_LOCALE,
PREFERENCES_DESKTOP_MULTIMEDIA,
PREFERENCES_DESKTOP_SCREENSAVER,
PREFERENCES_DESKTOP_THEME,
PREFERENCES_DESKTOP_WALLPAPER,
SYSTEM_FILE_MANAGER,
SYSTEM_SOFTWARE_UPDATE,
UTILITIES_TERMINAL,
APPLICATIONS_ACCESSORIES,
APPLICATIONS_DEVELOPMENT,
APPLICATIONS_GAMES,
APPLICATIONS_GRAPHICS,
APPLICATIONS_INTERNET,
APPLICATIONS_MULTIMEDIA,
APPLICATIONS_OFFICE,
APPLICATIONS_OTHER,
APPLICATIONS_SYSTEM,
APPLICATIONS_UTILITIES,
PREFERENCES_DESKTOP,
PREFERENCES_DESKTOP_ACCESSIBILITY,
PREFERENCES_DESKTOP_PERIPHERALS,
PREFERENCES_DESKTOP_PERSONAL,
PREFERENCES_OTHER,
PREFERENCES_SYSTEM,
PREFERENCES_SYSTEM_NETWORK,
SYSTEM_HELP,
AUDIO_CARD,
AUDIO_INPUT_MICROPHONE,
BATTERY,
CAMERA_PHOTO,
CAMERA_VIDEO,
COMPUTER,
DRIVE_CDROM,
DRIVE_HARDDISK,
DRIVE_REMOVABLE_MEDIA,
INPUT_GAMING,
INPUT_KEYBOARD,
INPUT_MOUSE,
MEDIA_CDROM,
MEDIA_FLOPPY,
MULTIMEDIA_PLAYER,
NETWORK_WIRED,
NETWORK_WIRELESS,
PRINTER,
EMBLEM_DEFAULT,
EMBLEM_DOCUMENTS,
EMBLEM_DOWNLOADS,
EMBLEM_FAVORITE,
EMBLEM_IMPORTANT,
EMBLEM_MAIL,
EMBLEM_PHOTOS,
EMBLEM_READONLY,
EMBLEM_SHARED,
EMBLEM_SYMBOLIC_LINK,
EMBLEM_SYNCHRONIZED,
EMBLEM_SYSTEM,
EMBLEM_UNREADABLE,
FACE_ANGEL,
FACE_CRYING,
FACE_DEVIL_GRIN,
FACE_DEVIL_SAD,
FACE_GLASSES,
FACE_KISS,
FACE_MONKEY,
FACE_PLAIN,
FACE_SAD,
FACE_SMILE,
FACE_SMILE_BIG,
FACE_SMIRK,
FACE_SURPRISE,
FACE_WINK,
APPLICATION_X_EXECUTABLE,
AUDIO_X_GENERIC,
FONT_X_GENERIC,
IMAGE_X_GENERIC,
PACKAGE_X_GENERIC,
TEXT_HTML,
TEXT_X_GENERIC,
TEXT_X_GENERIC_TEMPLATE,
TEXT_X_SCRIPT,
VIDEO_X_GENERIC,
X_OFFICE_ADDRESS_BOOK,
X_OFFICE_CALENDAR,
X_OFFICE_DOCUMENT,
X_OFFICE_PRESENTATION,
X_OFFICE_SPREADSHEET,
FOLDER,
FOLDER_REMOTE,
NETWORK_SERVER,
NETWORK_WORKGROUP,
START_HERE,
USER_DESKTOP,
USER_HOME,
USER_TRASH,
APPOINTMENT_MISSED,
APPOINTMENT_SOON,
AUDIO_VOLUME_HIGH,
AUDIO_VOLUME_LOW,
AUDIO_VOLUME_MEDIUM,
AUDIO_VOLUME_MUTED,
BATTERY_CAUTION,
BATTERY_LOW,
DIALOG_ERROR,
DIALOG_INFORMATION,
DIALOG_PASSWORD,
DIALOG_QUESTION,
DIALOG_WARNING,
FOLDER_DRAG_ACCEPT,
FOLDER_OPEN,
FOLDER_VISITING,
IMAGE_LOADING,
IMAGE_MISSING,
MAIL_ATTACHMENT,
MAIL_UNREAD,
MAIL_READ,
MAIL_REPLIED,
MAIL_SIGNED,
MAIL_SIGNED_VERIFIED,
MEDIA_PLAYLIST_REPEAT,
MEDIA_PLAYLIST_SHUFFLE,
NETWORK_ERROR,
NETWORK_IDLE,
NETWORK_OFFLINE,
NETWORK_RECEIVE,
NETWORK_TRANSMIT,
NETWORK_TRANSMIT_RECEIVE,
PRINTER_ERROR,
PRINTER_PRINTING,
SOFTWARE_UPDATE_AVAILABLE,
SOFTWARE_UPDATE_URGENT,
SYNC_ERROR,
SYNC_SYNCHRONIZING,
TASK_DUE,
TASK_PASSED_DUE,
USER_AWAY,
USER_IDLE,
USER_OFFLINE,
USER_ONLINE,
USER_TRASH_FULL,
WEATHER_CLEAR,
WEATHER_CLEAR_NIGHT,
WEATHER_FEW_CLOUDS,
WEATHER_FEW_CLOUDS_NIGHT,
WEATHER_FOG,
WEATHER_OVERCAST,
WEATHER_SEVERE_ALERT,
WEATHER_SHOWERS,
WEATHER_SHOWERS_SCATTERED,
WEATHER_SNOW,
WEATHER_STORM,
NULL
};
#endif

@ -0,0 +1,43 @@
#include <Ecore.h>
#include <Ecore_Desktop.h>
#include <Efreet.h>
#include <stdio.h>
#include <string.h>
#include "comp.h"
int
main(int argc, char ** argv)
{
int i;
const char *ef, *ed;
ecore_init();
ecore_desktop_init();
efreet_init();
efreet_icon_extension_add(".svg");
for (i = 0; icons[i] != NULL; i++)
{
ef = efreet_icon_path_find(THEME, icons[i], SIZE);
ed = ecore_desktop_icon_find(icons[i], SIZE, THEME);
if (!ef && !ed) continue;
if (!ef && ed)
printf("%s matched ecore (%s) but not efreet\n", icons[i], ed);
else if (ef && !ed)
printf("%s matched efreet (%s) but not ecore\n", icons[i], ef);
else if (strcmp(ef, ed))
printf("%s didn't match ef(%s) vs ed(%s)\n", icons[i], ef, ed);
}
efreet_shutdown();
ecore_desktop_shutdown();
ecore_shutdown();
return 0;
}

@ -0,0 +1,29 @@
#include <Ecore.h>
#include <Ecore_Desktop.h>
#include <stdio.h>
#include "comp.h"
int
main(int argc, char ** argv)
{
int i = 0, k;
const char *path;
ecore_init();
ecore_desktop_init();
for (k = 0; k < LOOPS; k++)
{
for (i = 0; icons[i] != NULL; i++)
{
path = ecore_desktop_icon_find(icons[i], SIZE, THEME);
// printf("%s: %s\n", icons[i], (path ? path : "NOT FOUND"));
}
}
ecore_desktop_shutdown();
ecore_shutdown();
return 0;
}

@ -0,0 +1,26 @@
#include <Efreet.h>
#include <stdio.h>
#include "comp.h"
int
main(int argc, char **argv)
{
int i = 0, k;
const char *path;
efreet_init();
for (k = 0; k < LOOPS; k++)
{
for (i = 0; icons[i] != NULL; i++)
{
path = efreet_icon_path_find(THEME, icons[i], SIZE);
// printf("%s: %s\n", icons[i], (path ? path : "NOT FOUND"));
}
}
efreet_shutdown();
return 0;
}

@ -0,0 +1,23 @@
#include <Efreet.h>
#include <stdio.h>
#include "comp.h"
int
main(int argc, char **argv)
{
int k;
efreet_init();
for (k = 0; k < LOOPS; k++)
{
Efreet_Menu *menu;
menu = efreet_menu_get();
efreet_menu_free(menu);
}
efreet_shutdown();
return 0;
}

@ -0,0 +1,297 @@
#include "Efreet.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int
ef_cb_efreet_data_home(void)
{
const char *tmp;
int ret = 1;
putenv("XDG_DATA_HOME=/var/tmp");
tmp = efreet_data_home_get();
if (strcmp(tmp, "/var/tmp"))
{
printf("efreet_data_home_get() returned incorrect "
"value on XDG_DATA_HOME=/var/tmp\n");
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
efreet_init();
putenv("XDG_DATA_HOME=");
putenv("HOME=/home/tmp");
tmp = efreet_data_home_get();
if (strcmp(tmp, "/home/tmp/.local/share"))
{
printf("efreet_data_home_get() returned incorrect "
"value on blank XDG_DATA_HOME\n");
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
efreet_init();
putenv("XDG_DATA_HOME=");
putenv("HOME=");
tmp = efreet_data_home_get();
if (strcmp(tmp, "/tmp/.local/share"))
{
printf("efreet_data_home_get() returned incorrect "
"value (%s) on blank XDG_DATA_HOME and blank HOME\n", tmp);
ret = 0;
}
return ret;
}
int
ef_cb_efreet_config_home(void)
{
const char *tmp;
int ret = 1;
putenv("XDG_CONFIG_HOME=/var/tmp");
tmp = efreet_config_home_get();
if (strcmp(tmp, "/var/tmp"))
{
printf("efreet_config_home_get() returned incorrect "
"value on XDG_CONFIG_HOME=/var/tmp\n");
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
efreet_init();
putenv("XDG_CONFIG_HOME=");
putenv("HOME=/home/tmp");
tmp = efreet_config_home_get();
if (strcmp(tmp, "/home/tmp/.config"))
{
printf("efreet_config_home_get() returned incorrect "
"value on blank XDG_CONFIG_HOME\n");
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
efreet_init();
putenv("XDG_CONFIG_HOME=");
putenv("HOME=");
tmp = efreet_config_home_get();
if (strcmp(tmp, "/tmp/.config"))
{
printf("efreet_config_home_get() returned incorrect "
"value (%s) on blank XDG_CONFIG_HOME and blank HOME\n", tmp);
ret = 0;
}
return ret;
}
int
ef_cb_efreet_cache_home(void)
{
const char *tmp;
int ret = 1;
putenv("XDG_CACHE_HOME=/var/tmp");
tmp = efreet_cache_home_get();
if (strcmp(tmp, "/var/tmp"))
{
printf("efreet_cache_home_get() returned incorrect "
"value on XDG_CACHE_HOME=/var/tmp\n");
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
efreet_init();
putenv("XDG_CACHE_HOME=");
putenv("HOME=/home/tmp");
tmp = efreet_cache_home_get();
if (strcmp(tmp, "/home/tmp/.cache"))
{
printf("efreet_cache_home_get() returned incorrect "
"value on blank XDG_CACHE_HOME\n");
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
efreet_init();
putenv("XDG_CACHE_HOME=");
putenv("HOME=");
tmp = efreet_cache_home_get();
if (strcmp(tmp, "/tmp/.cache"))
{
printf("efreet_cache_home_get() returned incorrect "
"value (%s) on blank XDG_CACHE_HOME and blank HOME\n", tmp);
ret = 0;
}
return ret;
}
int
ef_cb_efreet_data_dirs(void)
{
Ecore_List *tmp;
int ret = 1, i;
char dirs[128], *val;
char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL};
char *def_vals[] = {"/usr/local/share", "/usr/share", NULL};
dirs[0] = '\0';
strcat(dirs, "XDG_DATA_DIRS=");
for (i = 0; vals[i] != NULL; i++)
{
if (i > 0) strcat(dirs, ":");
strcat(dirs, vals[i]);
}
putenv(dirs);
i = 0;
tmp = efreet_data_dirs_get();
ecore_list_goto_first(tmp);
while ((val = ecore_list_next(tmp)))
{
if (vals[i] == NULL)
{
printf("efreet_data_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, vals[i]))
{
printf("efreet_data_dirs_get() returned incorrect value (%s) when "
"%s set\n", val, dirs);
ret = 0;
}
i++;
}
efreet_shutdown();
efreet_init();
putenv("XDG_DATA_DIRS=");
i = 0;
tmp = efreet_data_dirs_get();
ecore_list_goto_first(tmp);
while ((val = ecore_list_next(tmp)))
{
if (def_vals[i] == NULL)
{
printf("efreet_data_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, def_vals[i]))
{
printf("efreet_data_dirs_get() returned incorrect value (%s) when "
"XDG_DATA_DIRS= is set\n", val);
ret = 0;
}
i++;
}
return ret;
}
int
ef_cb_efreet_config_dirs(void)
{
Ecore_List *tmp;
int ret = 1, i;
char dirs[128], *val;
char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL};
char *def_vals[] = {"/etc/xdg", NULL};
dirs[0] = '\0';
strcat(dirs, "XDG_CONFIG_DIRS=");
for (i = 0; vals[i] != NULL; i++)
{
if (i > 0) strcat(dirs, ":");
strcat(dirs, vals[i]);
}
putenv(dirs);
i = 0;
tmp = efreet_config_dirs_get();
ecore_list_goto_first(tmp);
while ((val = ecore_list_next(tmp)))
{
if (vals[i] == NULL)
{
printf("efreet_config_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, vals[i]))
{
printf("efreet_config_dirs_get() returned incorrect value (%s) when "
"%s set\n", val, dirs);
ret = 0;
}
i++;
}
efreet_shutdown();
efreet_init();
putenv("XDG_CONFIG_DIRS=");
i = 0;
tmp = efreet_config_dirs_get();
ecore_list_goto_first(tmp);
while ((val = ecore_list_next(tmp)))
{
if (def_vals[i] == NULL)
{
printf("efreet_config_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, def_vals[i]))
{
printf("efreet_config_dirs_get() returned incorrect value (%s) when "
"XDG_CONFIG_DIRS= is set\n", val);
ret = 0;
}
i++;
}
return ret;
}

@ -0,0 +1,346 @@
#include "Efreet.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include "../lib/efreet_private.h"
static void _cb_command(void *data, Efreet_Desktop *desktop, char *exec, int remaining);
int
ef_cb_desktop_parse(void)
{
Efreet_Desktop *desktop;
int ret = 1;
desktop = efreet_desktop_get(PACKAGE_DATA_DIR"/efreet/test/test.desktop");
if (!desktop)
{
printf("No desktop found.\n");
return 0;
}
if (!desktop->name || strcmp(desktop->name, "Efreet Test Application"))
{
printf("Invalid Name\n");
ret = 0;