Commit 3e354748 authored by Mark McLoughlin's avatar Mark McLoughlin

Initial revision

parents
INSTALL
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config.*
configure
libtool
ltmain.sh
install-sh
intltool-extract
intltool-extract.in
intltool-merge
intltool-merge.in
intltool-update
intltool-update.in
missing
mkinstalldirs
stamp-h1
stamp-h
stamp-h.in
gnome-menus-*.tar.gz
*~
Mark McLoughlin <mark@skynet.ie>
Havoc Pennington <hp@redhat.com>
This diff is collapsed.
2004-11-09 Mark McLoughlin <mark@skynet.ie>
* Initial import.
Hacking on gnome-menus:
-----------------------
* Please send patches to desktop-devel-list@gnome.org or to
the people listed in the MAINTAINERS file. Your patch should be in
unified diff form. (The -u option to GNU diff.)
* Please try and send a patch against a recent version of this
package. Patches against CVS HEAD are most preferable. For information
on how to access GNOME CVS please read:
http://developer.gnome.org/tools/cvs.html
* Don't commit any but the most trivial patches to without
approval.
* Exceptions to this are
+ Translators may commit basic i18n related patches to
the build setup.
+ Members of the GNOME packaging product may commit
fixes to the .spec files.
+ Build sheriff are welcome - in accordance with the
relevant build sheriff constraints.
Currently active maintainers
----------------------------
Mark McLoughlin
E-mail: mark@skynet.ie
NULL =
SUBDIRS = \
po \
libmenu \
layout \
desktop-directories \
util \
$(NULL)
EXTRA_DIST = \
HACKING \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
$(NULL)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update \
$(NULL)
gnome-menus-2.9.1
=================
This package is free software and is part of the
GNOME project.
The package contains an implementation of the draft "Desktop
Menu Specification" from freedesktop.org:
http://www.freedesktop.org/Standards/menu-spec
Also contained here are the GNOME menu layout configuration
files, .directory files and assorted menu related utility programs.
You may download updates to the package from:
ftp://ftp.gnome.org/pub/GNOME/sources/gnome-menus
desktop-devel-list@gnome.org is the relevant mailing list:
http://mail.gnome.org/mailman/listinfo/desktop-devel-list
To subscribe:
Send a mail to desktop-devel-list-request@gnome.org
with the subject "subscribe".
Installation
============
See the file 'INSTALL'
How to report bugs
==================
Bugs should be reported to the GNOME bug tracking system.
(http://bugzilla.gnome.org, product gnome-menus) You will
need to create an account for yourself.
Please read the following page on how to prepare a useful
bug report
http://bugzilla.gnome.org/bug-HOWTO.html
Please read the HACKING file for information on where to
send changes or bugfixes for this package.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="GNOME Menus"
REQUIRED_AUTOMAKE_VERSION=1.7
(test -f $srcdir/configure.in \
&& test -f $srcdir/HACKING \
&& test -d $srcdir/libmenu) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME CVS"
exit 1
}
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
AC_INIT(libmenu/menu-tree.h)
AM_INIT_AUTOMAKE(gnome-panel, 2.9.1)
AM_CONFIG_HEADER(config.h)
# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
LIB_MENU_LT_VERSION=0:0:0
AC_SUBST(LIB_MENU_LT_VERSION)
AM_MAINTAINER_MODE
GETTEXT_PACKAGE=gnome-menus
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
AC_SUBST(GETTEXT_PACKAGE)
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT
AC_PROG_INTLTOOL([0.31])
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_ARG_PROGRAM
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
PKG_CHECK_MODULES(LIBMENU,
glib-2.0 >= 2.5.6 \
gnome-vfs-2.0 >= 2.8.2)
AC_SUBST(LIBMENU_CFLAGS)
AC_SUBST(LIBMENU_LIBS)
GNOME_COMPILE_WARNINGS(yes)
AC_ARG_ENABLE(deprecations,
[AC_HELP_STRING([--enable-deprecations],
[warn about deprecated usages [default=no]])],,
[enable_deprecations=no])
if test "x$enable_deprecations" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED"
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
dnl --enable-debug=(yes|minimum|no)
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=yes)
if test "$enable_debug" = "yes"; then
DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
else
DEBUG_CFLAGS=""
fi
fi
AC_SUBST(DEBUG_CFLAGS)
AC_OUTPUT([
Makefile
libmenu/Makefile
libmenu/libgnome-menu.pc
layout/Makefile
desktop-directories/Makefile
util/Makefile
po/Makefile.in
])
Makefile
Makefile.in
*.directory
[Desktop Entry]
_Name=Accessibility
_Comment=Accessibility Settings
Type=Directory
Icon=accessibility-directory
Encoding=UTF-8
[Desktop Entry]
_Name=Accessories
_Comment=Desktop accessories
Icon=gnome-util
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Applications
_Comment=Applications
Icon=gnome-applications
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Programming
_Comment=Tools for software development
Icon=gnome-devel
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Edutainment
Icon=package_edutainment
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Edutainment
Icon=package_edutainment
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Games
_Comment=Games and amusements
Icon=gnome-joystick
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Graphics
_Comment=Graphics applications
Icon=gnome-graphics
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Internet
_Comment=Programs for Internet access such as web and email
Icon=gnome-globe
Type=Directory
Encoding=UTF-8
NULL =
@INTLTOOL_DIRECTORY_RULE@
directorydir = $(datadir)/desktop-directories
directory_in_files = \
Accessibility.directory.in \
Accessories.directory.in \
Applications.directory.in \
Development.directory.in \
Edutainment.directory.in \
Games.directory.in \
Graphics.directory.in \
Internet.directory.in \
Multimedia.directory.in \
Office.directory.in \
Other.directory.in \
Settings-Accessibility.directory.in \
Settings.directory.in \
System-Settings.directory.in \
System-Tools.directory.in \
$(NULL)
directory_DATA = $(directory_in_files:.directory.in=.directory)
EXTRA_DIST= $(directory_in_files)
[Desktop Entry]
_Name=Sound & Video
_Comment=Multimedia menu
Icon=gnome-multimedia
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Office
_Comment=Office Applications
Icon=gnome-applications
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Other
_Comment=Applications that did not fit in other categories
Icon=gnome-other
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Accessibility
_Comment=Accessibility related preferences
Icon=accessibility-directory
Type=Directory
Encoding=UTF-8
[Desktop Entry]
_Name=Preferences
_Comment=Personal preferences and settings
Icon=gnome-settings
Type=Directory
Encoding=UTF-8
[Desktop Entry]
Type=Directory
_Name=System Settings
_Comment=Change systemwide settings (affects all users)
Icon=gnome-system
Encoding=UTF-8
[Desktop Entry]
_Name=System Tools
_Comment=System configuration and monitoring
Icon=gnome-system
Type=Directory
Encoding=UTF-8
Makefile
Makefile.in
NULL =
menudir = $(sysconfdir)/xdg/menus
menu_DATA = \
applications.menu \
preferences.menu \
$(NULL)
EXTRA_DIST= $(menu_DATA)
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
<Name>Applications</Name>
<Directory>Applications.directory</Directory>
<!-- Scan legacy dirs first, as later items take priority -->
<KDELegacyDirs/>
<LegacyDir>/etc/X11/applnk</LegacyDir>
<LegacyDir>/usr/share/gnome/apps</LegacyDir>
<!-- Read standard .directory and .desktop file locations -->
<DefaultAppDirs/>
<DefaultDirectoryDirs/>
<!-- Read in overrides and child menus from applications-merged/ -->
<DefaultMergeDirs/>
<!-- Merge in these other files as submenus -->
<Menu>
<Name>Preferences</Name>
<MergeFile>preferences.menu</MergeFile>
</Menu>
<Menu>
<Name>System Settings</Name>
<MergeFile>system-settings.menu</MergeFile>
</Menu>
<!-- Menu items to include in the toplevel -->
<Include>
<And>
<Category>Core</Category>
</And>
</Include>
<!-- Menu items to exclude from the toplevel -->
<Exclude>
<Filename>gnome-search-tool.desktop</Filename>
</Exclude>
<!-- Accessories submenu -->
<Menu>
<Name>Accessories</Name>
<Directory>Accessories.directory</Directory>
<Include>
<And>
<Category>Utility</Category>
<Not>
<Category>System</Category>
</Not>
</And>
</Include>
</Menu> <!-- End Accessories -->
<!-- Accessibility submenu -->
<Menu>
<Name>Accessibility</Name>
<Directory>Accessibility.directory</Directory>
<Include>
<And>
<Category>Accessibility</Category>
<Not>
<Category>Settings</Category>
</Not>
</And>
</Include>
</Menu> <!-- End Accessibility -->
<!-- Development Tools -->
<Menu>
<Name>Development</Name>
<Directory>Development.directory</Directory>
<Include>
<And>
<Category>Development</Category>
</And>
<Filename>emacs.desktop</Filename>
</Include>
</Menu> <!-- End Development Tools -->
<!-- Edutainment -->
<Menu>
<Name>Edutainment</Name>
<Directory>Edutainment.directory</Directory>
<Include>
<And>
<Category>Education</Category>
</And>
</Include>
</Menu> <!-- End Edutainment -->
<!-- Games -->
<Menu>
<Name>Games</Name>
<Directory>Games.directory</Directory>
<Include>
<And>
<Category>Game</Category>
</And>
</Include>
</Menu> <!-- End Games -->
<!-- Graphics -->
<Menu>
<Name>Graphics</Name>
<Directory>Graphics.directory</Directory>
<Include>
<And>
<Category>Graphics</Category>
</And>
</Include>
</Menu> <!-- End Graphics -->
<!-- Internet -->
<Menu>
<Name>Internet</Name>
<Directory>Internet.directory</Directory>
<Include>
<And>
<Category>Network</Category>
</And>
</Include>
</Menu> <!-- End Internet -->
<!-- Multimedia -->
<Menu>
<Name>Multimedia</Name>
<Directory>Multimedia.directory</Directory>
<Include>
<And>
<Category>AudioVideo</Category>
</And>
</Include>
</Menu> <!-- End Multimedia -->
<!-- Office -->
<Menu>
<Name>Office</Name>
<Directory>Office.directory</Directory>
<Include>
<And>
<Category>Office</Category>
</And>
</Include>
</Menu> <!-- End Office -->
<!-- System Settings -->
<Menu>
<Name>System Settings</Name>
<Directory>System-Settings.directory</Directory>
<Include>
<And>
<Category>Settings</Category>
<Category>System</Category>
</And>
</Include>
</Menu> <!-- End System Settings -->
<!-- System Tools-->
<Menu>
<Name>System</Name>
<Directory>System-Tools.directory</Directory>
<Include>
<And>
<Category>System</Category>
<Not><Category>Settings</Category></Not>
</And>
</Include>
</Menu> <!-- End System Tools -->
<!-- Other -->
<Menu>
<Name>Other</Name>
<Directory>Other.directory</Directory>
<OnlyUnallocated/>
<Include>
<And>
<Category>Application</Category>
<Not><Category>Settings</Category></Not>
</And>
</Include>
</Menu> <!-- End Other -->
</Menu> <!-- End Applications -->
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
<Name>Preferences</Name>
<Directory>Settings.directory</Directory>
<!-- Read standard .directory and .desktop file locations -->
<DefaultAppDirs/>
<DefaultDirectoryDirs/>
<!-- Read in overrides and child menus from preferences-merged/ -->
<DefaultMergeDirs/>
<!-- Stuff in the toplevel -->
<Include>
<And>
<Category>Settings</Category>
<Not>
<Or>
<Category>System</Category>
<Category>Accessibility</Category>
</Or>
</Not>
</And>
</Include>
<!-- Menu items to exclude from the toplevel -->
<Exclude>
<Filename>gnomecc.desktop</Filename>
</Exclude>
<!-- Accessibility -->
<Menu>
<Name>Accessibility</Name>
<Directory>Settings-Accessibility.directory</Directory>
<Include>
<And>
<Category>Settings</Category>
<Category>Accessibility</Category>
</And>
</Include>
</Menu>
</Menu> <!-- End Prefs -->
.deps
.libs
Makefile
Makefile.in
*.la
*.lo
libgnome-menu.pc
NULL =
INCLUDES = \
-DMENU_I_KNOW_THIS_IS_UNSTABLE \
$(LIBMENU_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
$(DEBUG_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
lib_LTLIBRARIES = libgnome-menu.la
libgnome_menu_la_SOURCES = \
canonicalize.c \
canonicalize.h \
desktop-entries.c \
desktop-entries.h \
entry-directories.c \
entry-directories.h \
menu-layout.c \
menu-layout.h \
menu-tree.c \
menu-tree.h \
menu-util.c \
menu-util.h \
$(NULL)
libgnome_menu_la_LIBADD = \
$(LIBMENU_LIBS) \
$(NULL)
libgnome_menu_la_LDFLAGS = \
-info $(LIB_MENU_LT_VERSION) \
-no-undefined \
$(NULL)
libgnome_menu_includedir = $(includedir)/gnome-menus
libgnome_menu_include_HEADERS = \
menu-tree.h \
$(NULL)
EXTRA_DIST = \
libgnome-menu.pc.in \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgnome-menu.pc
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 2002 Red Hat, Inc. (trivial port to GLib)
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <config.h>
#include "canonicalize.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
#include <stddef.h>
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any `.', `..' components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
RESOLVED is null, the result is malloc'd; otherwise, if the
canonical name is PATH_MAX chars or more, returns null with `errno'
set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
returns the name in RESOLVED. If the name cannot be resolved and
RESOLVED is non-NULL, it contains the path of the first component
that cannot be resolved. If the path can be resolved, RESOLVED
holds the same value as the value returned. */
static char*
menu_realpath (const char *name, char *resolved)
{
char *rpath, *dest, *extra_buf = NULL;
const char *start, *end, *rpath_limit;
long int path_max;
int num_links = 0;
if (name == NULL)
{
/* As per Single Unix Specification V2 we must return an error if
either parameter is a null pointer. We extend this to allow
the RESOLVED parameter to be NULL in case the we are expected to
allocate the room for the return value. */
errno = EINVAL;
return NULL;
}