diff -Nru libdbusmenu-0.3.6/aclocal.m4 libdbusmenu-0.3.12/aclocal.m4 --- libdbusmenu-0.3.6/aclocal.m4 2010-07-15 15:30:09.000000000 +0100 +++ libdbusmenu-0.3.12/aclocal.m4 2010-08-26 21:12:22.000000000 +0100 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -301,7 +301,7 @@ dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. + dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" @@ -430,7 +430,7 @@ dnl dnl Now the definitions that aclocal will find dnl -ifdef(glib_configure_in,[],[ +ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl @@ -722,7 +722,7 @@ AC_DEFUN([IT_PO_SUBDIR], [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. dnl -dnl The following CONFIG_COMMANDS should be exetuted at the very end +dnl The following CONFIG_COMMANDS should be executed at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ @@ -8826,8 +8826,9 @@ m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -# nls.m4 serial 3 (gettext-0.15) -dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -8845,20 +8846,21 @@ dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ(2.50) +AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS - AC_ARG_ENABLE(nls, + AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -8886,7 +8888,10 @@ AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -8899,7 +8904,6 @@ AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -8908,34 +8912,31 @@ # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -8977,16 +8978,17 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -8994,25 +8996,24 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES diff -Nru libdbusmenu-0.3.6/configure libdbusmenu-0.3.12/configure --- libdbusmenu-0.3.6/configure 2010-07-15 15:30:11.000000000 +0100 +++ libdbusmenu-0.3.12/configure 2010-08-26 21:12:24.000000000 +0100 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for libdbusmenu 0.3.6. +# Generated by GNU Autoconf 2.67 for libdbusmenu 0.3.12. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -321,7 +321,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -361,19 +361,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -684,7 +684,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -703,8 +703,8 @@ # Identity of this package. PACKAGE_NAME='libdbusmenu' PACKAGE_TARNAME='libdbusmenu' -PACKAGE_VERSION='0.3.6' -PACKAGE_STRING='libdbusmenu 0.3.6' +PACKAGE_VERSION='0.3.12' +PACKAGE_STRING='libdbusmenu 0.3.12' PACKAGE_BUGREPORT='ted@canonical.com' PACKAGE_URL='' @@ -776,6 +776,8 @@ INTROSPECTION_SCANNER DBUSMENUTESTS_LIBS DBUSMENUTESTS_CFLAGS +DBUSMENUDUMPER_LIBS +DBUSMENUDUMPER_CFLAGS DBUSMENUGTK_LIBS DBUSMENUGTK_CFLAGS DBUSMENUGLIB_LIBS @@ -798,6 +800,8 @@ GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG HTML_DIR GTKDOC_MKPDF @@ -977,10 +981,14 @@ CPPFLAGS CPP PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR DBUSMENUGLIB_CFLAGS DBUSMENUGLIB_LIBS DBUSMENUGTK_CFLAGS DBUSMENUGTK_LIBS +DBUSMENUDUMPER_CFLAGS +DBUSMENUDUMPER_LIBS DBUSMENUTESTS_CFLAGS DBUSMENUTESTS_LIBS' @@ -1045,8 +1053,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1091,7 +1100,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1117,7 +1126,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1321,7 +1330,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1337,7 +1346,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1367,8 +1376,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1376,7 +1385,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1394,13 +1403,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1423,7 +1432,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1437,8 +1446,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1453,9 +1462,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1494,11 +1503,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1524,7 +1533,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libdbusmenu 0.3.6 to adapt to many kinds of systems. +\`configure' configures libdbusmenu 0.3.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1538,7 +1547,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1594,7 +1603,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdbusmenu 0.3.6:";; + short | recursive ) echo "Configuration of libdbusmenu 0.3.12:";; esac cat <<\_ACEOF @@ -1645,6 +1654,10 @@ you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path DBUSMENUGLIB_CFLAGS C compiler flags for DBUSMENUGLIB, overriding pkg-config DBUSMENUGLIB_LIBS @@ -1653,6 +1666,10 @@ C compiler flags for DBUSMENUGTK, overriding pkg-config DBUSMENUGTK_LIBS linker flags for DBUSMENUGTK, overriding pkg-config + DBUSMENUDUMPER_CFLAGS + C compiler flags for DBUSMENUDUMPER, overriding pkg-config + DBUSMENUDUMPER_LIBS + linker flags for DBUSMENUDUMPER, overriding pkg-config DBUSMENUTESTS_CFLAGS C compiler flags for DBUSMENUTESTS, overriding pkg-config DBUSMENUTESTS_LIBS @@ -1724,10 +1741,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdbusmenu configure 0.3.6 -generated by GNU Autoconf 2.65 +libdbusmenu configure 0.3.12 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -1832,7 +1849,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1912,7 +1929,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1979,7 +1996,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2009,10 +2026,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2048,7 +2065,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2071,17 +2088,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## -------------------------------- ## +( $as_echo "## -------------------------------- ## ## Report this to ted@canonical.com ## -## -------------------------------- ## -_ASBOX +## -------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2097,8 +2112,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libdbusmenu $as_me 0.3.6, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by libdbusmenu $as_me 0.3.12, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2208,11 +2223,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2246,11 +2259,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2263,11 +2274,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2281,11 +2290,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2340,7 +2347,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2355,7 +2367,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done @@ -2431,7 +2447,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2454,16 +2470,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2579,11 +2601,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2605,7 +2627,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2615,7 +2637,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2853,7 +2875,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2861,7 +2883,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2895,7 +2917,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2911,7 +2933,7 @@ # Define the identity of the package. PACKAGE=libdbusmenu - VERSION=0.3.6 + VERSION=0.3.12 # Some tools Automake needs. @@ -3343,8 +3365,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3458,9 +3480,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3502,8 +3523,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3560,9 +3581,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi @@ -3613,8 +3634,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3966,7 +3987,7 @@ case "$am__api_version" in 1.01234) - as_fn_error "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 + as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 ;; *) ;; @@ -3983,7 +4004,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - as_fn_error "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5 + as_fn_error $? "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5 fi # Extract the first word of "intltool-update", so it can be a program name with args. @@ -4107,7 +4128,7 @@ if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then - as_fn_error "The intltool scripts were not found. Please install intltool." "$LINENO" 5 + as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' @@ -4389,13 +4410,13 @@ if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then - as_fn_error "GNU gettext tools not found; required for intltool" "$LINENO" 5 + as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then - as_fn_error "GNU gettext tools not found; required for intltool" "$LINENO" 5 + as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi # Extract the first word of "perl", so it can be a program name with args. @@ -4439,13 +4460,13 @@ if test -z "$INTLTOOL_PERL"; then - as_fn_error "perl not found" "$LINENO" 5 + as_fn_error $? "perl not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 $as_echo_n "checking for perl >= 5.8.1... " >&6; } $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then - as_fn_error "perl 5.8.1 is required for intltool" "$LINENO" 5 + as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5 else IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 @@ -4458,7 +4479,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else - as_fn_error "XML::Parser perl module is required for intltool" "$LINENO" 5 + as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 fi fi @@ -4862,8 +4883,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -5238,7 +5259,7 @@ fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5397,7 +5418,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5413,11 +5434,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5456,7 +5477,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5472,18 +5493,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -5544,7 +5565,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -5610,7 +5631,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -5762,7 +5783,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -5773,16 +5794,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -5807,7 +5828,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -5815,7 +5836,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -5888,7 +5909,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -5967,7 +5988,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -6083,7 +6104,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -6285,13 +6306,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6288: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6309: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6291: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6312: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6294: output\"" >&5) + (eval echo "\"\$as_me:6315: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7496,7 +7517,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7499 "configure"' > conftest.$ac_ext + echo '#line 7520 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8250,8 +8271,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8772,11 +8792,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8775: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8795: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8779: \$? = $ac_status" >&5 + echo "$as_me:8799: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9111,11 +9131,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9114: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9134: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9118: \$? = $ac_status" >&5 + echo "$as_me:9138: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9216,11 +9236,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9219: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9239: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9223: \$? = $ac_status" >&5 + echo "$as_me:9243: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9271,11 +9291,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9274: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9294: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9278: \$? = $ac_status" >&5 + echo "$as_me:9298: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11655,7 +11675,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11658 "configure" +#line 11678 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11751,7 +11771,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11754 "configure" +#line 11774 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12001,6 +12021,10 @@ + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -12113,7 +12137,6 @@ $as_echo "no" >&6; } PKG_CONFIG="" fi - fi @@ -12272,7 +12295,7 @@ test $ac_status = 0; }; then : else - as_fn_error "You need to have gtk-doc >= 1.4 installed to build $PACKAGE_NAME" "$LINENO" 5 + as_fn_error $? "You need to have gtk-doc >= 1.4 installed to build $PACKAGE_NAME" "$LINENO" 5 fi fi @@ -12365,7 +12388,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error "gnome-doc-utils >= $gdu_cv_version_required not found" "$LINENO" 5 + as_fn_error $? "gnome-doc-utils >= $gdu_cv_version_required not found" "$LINENO" 5 fi @@ -12445,11 +12468,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUSMENUGLIB" >&5 $as_echo_n "checking for DBUSMENUGLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DBUSMENUGLIB_CFLAGS"; then - pkg_cv_DBUSMENUGLIB_CFLAGS="$DBUSMENUGLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUSMENUGLIB_CFLAGS"; then + pkg_cv_DBUSMENUGLIB_CFLAGS="$DBUSMENUGLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION dbus-glib-1 >= \$DBUS_REQUIRED_VERSION libxml-2.0 >= \$XML_REQUIRED_VERSION\""; } >&5 @@ -12465,15 +12487,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DBUSMENUGLIB_LIBS"; then - pkg_cv_DBUSMENUGLIB_LIBS="$DBUSMENUGLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUSMENUGLIB_LIBS"; then + pkg_cv_DBUSMENUGLIB_LIBS="$DBUSMENUGLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION dbus-glib-1 >= \$DBUS_REQUIRED_VERSION libxml-2.0 >= \$XML_REQUIRED_VERSION\""; } >&5 @@ -12489,14 +12509,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12504,18 +12525,18 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUSMENUGLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION + DBUSMENUGLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION - libxml-2.0 >= $XML_REQUIRED_VERSION"` + libxml-2.0 >= $XML_REQUIRED_VERSION" 2>&1` else - DBUSMENUGLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION + DBUSMENUGLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION - libxml-2.0 >= $XML_REQUIRED_VERSION"` + libxml-2.0 >= $XML_REQUIRED_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUSMENUGLIB_PKG_ERRORS" >&5 - as_fn_error "Package requirements (glib-2.0 >= $GLIB_REQUIRED_VERSION + as_fn_error $? "Package requirements (glib-2.0 >= $GLIB_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION libxml-2.0 >= $XML_REQUIRED_VERSION) were not met: @@ -12526,12 +12547,13 @@ Alternatively, you may set the environment variables DBUSMENUGLIB_CFLAGS and DBUSMENUGLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -12540,13 +12562,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else DBUSMENUGLIB_CFLAGS=$pkg_cv_DBUSMENUGLIB_CFLAGS DBUSMENUGLIB_LIBS=$pkg_cv_DBUSMENUGLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi @@ -12563,11 +12585,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUSMENUGTK" >&5 $as_echo_n "checking for DBUSMENUGTK... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DBUSMENUGTK_CFLAGS"; then - pkg_cv_DBUSMENUGTK_CFLAGS="$DBUSMENUGTK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUSMENUGTK_CFLAGS"; then + pkg_cv_DBUSMENUGTK_CFLAGS="$DBUSMENUGTK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION glib-2.0 >= \$GLIB_REQUIRED_VERSION dbus-glib-1 >= \$DBUS_REQUIRED_VERSION @@ -12586,15 +12607,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DBUSMENUGTK_LIBS"; then - pkg_cv_DBUSMENUGTK_LIBS="$DBUSMENUGTK_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUSMENUGTK_LIBS"; then + pkg_cv_DBUSMENUGTK_LIBS="$DBUSMENUGTK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION glib-2.0 >= \$GLIB_REQUIRED_VERSION dbus-glib-1 >= \$DBUS_REQUIRED_VERSION @@ -12613,14 +12632,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12628,20 +12648,20 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUSMENUGTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION + DBUSMENUGTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION - libxml-2.0 >= $XML_REQUIRED_VERSION"` + libxml-2.0 >= $XML_REQUIRED_VERSION" 2>&1` else - DBUSMENUGTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION + DBUSMENUGTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION - libxml-2.0 >= $XML_REQUIRED_VERSION"` + libxml-2.0 >= $XML_REQUIRED_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUSMENUGTK_PKG_ERRORS" >&5 - as_fn_error "Package requirements (gtk+-2.0 >= $GTK_REQUIRED_VERSION + as_fn_error $? "Package requirements (gtk+-2.0 >= $GTK_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION libxml-2.0 >= $XML_REQUIRED_VERSION) were not met: @@ -12653,12 +12673,13 @@ Alternatively, you may set the environment variables DBUSMENUGTK_CFLAGS and DBUSMENUGTK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -12667,13 +12688,121 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else DBUSMENUGTK_CFLAGS=$pkg_cv_DBUSMENUGTK_CFLAGS DBUSMENUGTK_LIBS=$pkg_cv_DBUSMENUGTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + +fi + + + + +########################### +# Dependencies - dumper +########################### + +X11_REQUIRED_VERSION=1.3 + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUSMENUDUMPER" >&5 +$as_echo_n "checking for DBUSMENUDUMPER... " >&6; } + +if test -n "$DBUSMENUDUMPER_CFLAGS"; then + pkg_cv_DBUSMENUDUMPER_CFLAGS="$DBUSMENUDUMPER_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION + x11 >= \$X11_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DBUSMENUDUMPER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$DBUSMENUDUMPER_LIBS"; then + pkg_cv_DBUSMENUDUMPER_LIBS="$DBUSMENUDUMPER_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION + x11 >= \$X11_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DBUSMENUDUMPER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + DBUSMENUDUMPER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION" 2>&1` + else + DBUSMENUDUMPER_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DBUSMENUDUMPER_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION) were not met: + +$DBUSMENUDUMPER_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DBUSMENUDUMPER_CFLAGS +and DBUSMENUDUMPER_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DBUSMENUDUMPER_CFLAGS +and DBUSMENUDUMPER_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5 ; } +else + DBUSMENUDUMPER_CFLAGS=$pkg_cv_DBUSMENUDUMPER_CFLAGS + DBUSMENUDUMPER_LIBS=$pkg_cv_DBUSMENUDUMPER_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi @@ -12691,11 +12820,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUSMENUTESTS" >&5 $as_echo_n "checking for DBUSMENUTESTS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DBUSMENUTESTS_CFLAGS"; then - pkg_cv_DBUSMENUTESTS_CFLAGS="$DBUSMENUTESTS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUSMENUTESTS_CFLAGS"; then + pkg_cv_DBUSMENUTESTS_CFLAGS="$DBUSMENUTESTS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= \$JSON_GLIB_REQUIRED_VERSION gio-unix-2.0 >= \$GIO_UNIX_REQUIRED_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION @@ -12708,15 +12836,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DBUSMENUTESTS_LIBS"; then - pkg_cv_DBUSMENUTESTS_LIBS="$DBUSMENUTESTS_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DBUSMENUTESTS_LIBS"; then + pkg_cv_DBUSMENUTESTS_LIBS="$DBUSMENUTESTS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= \$JSON_GLIB_REQUIRED_VERSION gio-unix-2.0 >= \$GIO_UNIX_REQUIRED_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION @@ -12729,14 +12855,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12744,16 +12871,16 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION - gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION"` + DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION + gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION" 2>&1` else - DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION - gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION"` + DBUSMENUTESTS_PKG_ERRORS=`$PKG_CONFIG --print-errors "json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION + gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUSMENUTESTS_PKG_ERRORS" >&5 - as_fn_error "Package requirements (json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION + as_fn_error $? "Package requirements (json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION) were not met: $DBUSMENUTESTS_PKG_ERRORS @@ -12763,12 +12890,13 @@ Alternatively, you may set the environment variables DBUSMENUTESTS_CFLAGS and DBUSMENUTESTS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -12777,13 +12905,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else DBUSMENUTESTS_CFLAGS=$pkg_cv_DBUSMENUTESTS_CFLAGS DBUSMENUTESTS_LIBS=$pkg_cv_DBUSMENUTESTS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi @@ -12820,7 +12948,7 @@ test $ac_status = 0; }; then : else - as_fn_error "gobject-introspection-1.0 is not installed" "$LINENO" 5 + as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5 fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.6.7\""; } >&5 @@ -12830,7 +12958,7 @@ test $ac_status = 0; }; then found_introspection=yes else - as_fn_error "You need to have gobject-introspection >= 0.6.7 installed to build libdbusmenu" "$LINENO" 5 + as_fn_error $? "You need to have gobject-introspection >= 0.6.7 installed to build libdbusmenu" "$LINENO" 5 fi ;; #( auto) : @@ -12846,7 +12974,7 @@ fi ;; #( *) : - as_fn_error "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5 + as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5 @@ -12937,7 +13065,7 @@ ########################### LIBDBUSMENU_CURRENT=1 -LIBDBUSMENU_REVISION=11 +LIBDBUSMENU_REVISION=14 LIBDBUSMENU_AGE=0 @@ -13768,6 +13896,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -13791,15 +13920,15 @@ fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -13807,39 +13936,39 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then - as_fn_error "conditional \"ENABLE_GTK_DOC\" was never defined. + as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then - as_fn_error "conditional \"GTK_DOC_BUILD_HTML\" was never defined. + as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then - as_fn_error "conditional \"GTK_DOC_BUILD_PDF\" was never defined. + as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then - as_fn_error "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. + as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then - as_fn_error "conditional \"GTK_DOC_USE_REBASE\" was never defined. + as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_SK_TRUE}" && test -z "${ENABLE_SK_FALSE}"; then - as_fn_error "conditional \"ENABLE_SK\" was never defined. + as_fn_error $? "conditional \"ENABLE_SK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GNOME_DOC_UTILS_TRUE}" && test -z "${HAVE_GNOME_DOC_UTILS_FALSE}"; then - as_fn_error "conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. + as_fn_error $? "conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then - as_fn_error "conditional \"HAVE_INTROSPECTION\" was never defined. + as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -13989,19 +14118,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -14197,7 +14326,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14250,8 +14379,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libdbusmenu $as_me 0.3.6, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by libdbusmenu $as_me 0.3.12, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14316,11 +14445,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libdbusmenu config.status 0.3.6 -configured by $0, generated by GNU Autoconf 2.65, +libdbusmenu config.status 0.3.12 +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14338,11 +14467,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -14364,6 +14498,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -14376,7 +14511,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -14385,7 +14520,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -14718,7 +14853,7 @@ "docs/libdbusmenu-gtk/reference/version.xml") CONFIG_FILES="$CONFIG_FILES docs/libdbusmenu-gtk/reference/version.xml" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -14756,7 +14891,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -14773,7 +14908,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -14787,18 +14922,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -14887,20 +15022,28 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -14928,7 +15071,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15013,7 +15156,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15026,7 +15169,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15054,7 +15197,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15081,7 +15224,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15218,22 +15361,22 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -15244,19 +15387,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -16036,7 +16179,7 @@ esac ;; "po/stamp-it":C) if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then - as_fn_error "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 + as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 fi rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" @@ -16064,7 +16207,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -16085,7 +16228,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru libdbusmenu-0.3.6/configure.ac libdbusmenu-0.3.12/configure.ac --- libdbusmenu-0.3.6/configure.ac 2010-07-15 15:30:00.000000000 +0100 +++ libdbusmenu-0.3.12/configure.ac 2010-08-26 21:12:08.000000000 +0100 @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.3.6, ted@canonical.com) +AC_INIT(libdbusmenu, 0.3.12, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.3.6, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.12, [-Wno-portability]) AM_MAINTAINER_MODE @@ -58,6 +58,18 @@ AC_SUBST(DBUSMENUGTK_LIBS) ########################### +# Dependencies - dumper +########################### + +X11_REQUIRED_VERSION=1.3 + +PKG_CHECK_MODULES(DBUSMENUDUMPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION + x11 >= $X11_REQUIRED_VERSION) + +AC_SUBST(DBUSMENUDUMPER_CFLAGS) +AC_SUBST(DBUSMENUDUMPER_LIBS) + +########################### # Dependencies - Testing ########################### @@ -87,7 +99,7 @@ ########################### LIBDBUSMENU_CURRENT=1 -LIBDBUSMENU_REVISION=11 +LIBDBUSMENU_REVISION=14 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) diff -Nru libdbusmenu-0.3.6/debian/changelog libdbusmenu-0.3.12/debian/changelog --- libdbusmenu-0.3.6/debian/changelog 2010-08-27 22:36:38.000000000 +0100 +++ libdbusmenu-0.3.12/debian/changelog 2010-08-27 22:36:38.000000000 +0100 @@ -1,8 +1,78 @@ -libdbusmenu (0.3.6-0lucid1) lucid; urgency=low +libdbusmenu (0.3.12-0ubuntu1~webupd8) lucid; urgency=low - * bump for lucid rebuild + * debian/rules: update the shlibs - -- Ken VanDine Fri, 16 Jul 2010 09:00:04 -0400 + [ Ted Gould ] + * New upstream release. + * Support activation of menus client side + * Increase layout XML size (LP: #621238) + * Display an event for the status of the signal to the server + + -- Alin Andrei Thu, 26 Aug 2010 23:34:45 +0200 + +libdbusmenu (0.3.11-0ubuntu1) maverick; urgency=low + + * New upstream release. + * Fix to handle whitespace in layout XML better + * Fixes to test scripts on ARM + + -- Ted Gould Thu, 19 Aug 2010 13:47:33 -0500 + +libdbusmenu (0.3.10-0ubuntu1) maverick; urgency=low + + * New upstream release. + * Fixes to dbusmenu-dumper + + -- Ted Gould Thu, 12 Aug 2010 11:28:37 -0500 + +libdbusmenu (0.3.9-0ubuntu2) maverick; urgency=low + + * Rebuild with the current gobject introspection version + + -- Sebastien Bacher Tue, 10 Aug 2010 21:50:16 +0200 + +libdbusmenu (0.3.9-0ubuntu1) maverick; urgency=low + + * New upstream release. + * Making it so that properties are requested bredth first + * Globbing layout signaling from the server + * Globbing property requests into group requests (LP: #604670) + + -- Ted Gould Mon, 02 Aug 2010 20:28:58 -0500 + +libdbusmenu (0.3.8-0ubuntu1) maverick; urgency=low + + * New upstream release. + - Added ItemActivationRequested signal. + + -- Ken VanDine Fri, 30 Jul 2010 13:44:34 -0400 + +libdbusmenu (0.3.7-1) unstable; urgency=low + + * Merge latest upstream from Ubuntu. + * Standards-Version: 3.9.1 + + -- Evgeni Golov Thu, 29 Jul 2010 12:00:04 +0200 + +libdbusmenu (0.3.7-0ubuntu1) maverick; urgency=low + + * New upstream release. + + -- Ken VanDine Thu, 22 Jul 2010 21:17:13 +0200 + +libdbusmenu (0.3.6-1) unstable; urgency=low + + * Merge new upstream from Ubuntu. + + -- Evgeni Golov Sat, 17 Jul 2010 10:47:35 +0200 + +libdbusmenu (0.3.6-0ubuntu2~ppa1) lucid; urgency=low + + * Upstream Merge + * Making dbusmenu-dumper have a click to dump feature. + * Autogen update + + -- Ted Gould Tue, 20 Jul 2010 16:40:29 -0500 libdbusmenu (0.3.6-0ubuntu1) maverick; urgency=low @@ -11,6 +81,14 @@ -- Ted Gould Thu, 15 Jul 2010 09:42:07 -0500 +libdbusmenu (0.3.5-1) unstable; urgency=low + + * Merge new upstream and changes from Ubuntu. + * debian/control: + + Add missing "used" to the json package description. + + -- Evgeni Golov Wed, 14 Jul 2010 10:21:29 +0200 + libdbusmenu (0.3.5-0ubuntu1) maverick; urgency=low * New upstream release. diff -Nru libdbusmenu-0.3.6/debian/control libdbusmenu-0.3.12/debian/control --- libdbusmenu-0.3.6/debian/control 2010-08-27 22:36:38.000000000 +0100 +++ libdbusmenu-0.3.12/debian/control 2010-08-27 22:36:38.000000000 +0100 @@ -19,8 +19,9 @@ libgirepository1.0-dev, gir1.0-glib-2.0, gir1.0-gtk-2.0, + libx11-dev (>= 1.3), valac -Standards-Version: 3.9.0 +Standards-Version: 3.9.1 Homepage: https://launchpad.net/dbusmenu Vcs-Bzr: https://code.launchpad.net/~dbusmenu-team/dbusmenu/ubuntu Vcs-Browser: http://bazaar.launchpad.net/~dbusmenu-team/dbusmenu/ubuntu @@ -159,8 +160,8 @@ create a menu simply without worrying about how it is displayed on the other side of the bus. . - This package contains shared libraries to be by test suites in applications - or libraries using dbusmenu. + This package contains shared libraries to be used by test suites in + applications or libraries using dbusmenu. Package: libdbusmenu-jsonloader-dev Section: libdevel @@ -170,7 +171,7 @@ libdbus-glib-1-dev (>= 0.76), libdbusmenu-glib-dev (= ${binary:Version}), libjson-glib-dev -Description: library for passing menus over DBus - Test lib +Description: library for passing menus over DBus - Test lib development files libdbusmenu passes a menu structure across DBus so that a program can create a menu simply without worrying about how it is displayed on the other side of the bus. diff -Nru libdbusmenu-0.3.6/debian/rules libdbusmenu-0.3.12/debian/rules --- libdbusmenu-0.3.6/debian/rules 2010-08-27 22:36:38.000000000 +0100 +++ libdbusmenu-0.3.12/debian/rules 2010-08-27 22:36:38.000000000 +0100 @@ -6,6 +6,6 @@ DEB_CONFIGURE_EXTRA_FLAGS += --disable-scrollkeeper --enable-gtk-doc LDFLAGS += -Wl,-z,defs -Wl,--as-needed -DEB_DH_MAKESHLIBS_ARGS_libdbusmenu-gtk1 += -V 'libdbusmenu-gtk1 (>= 0.3.3)' -DEB_DH_MAKESHLIBS_ARGS_libdbusmenu-glib1 += -V 'libdbusmenu-glib1 (>= 0.3.3)' +DEB_DH_MAKESHLIBS_ARGS_libdbusmenu-gtk1 += -V 'libdbusmenu-gtk1 (>= 0.3.12)' +DEB_DH_MAKESHLIBS_ARGS_libdbusmenu-glib1 += -V 'libdbusmenu-glib1 (>= 0.3.12)' diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/Makefile.in libdbusmenu-0.3.12/docs/libdbusmenu-glib/Makefile.in --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -110,6 +110,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -190,6 +192,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/annotation-glossary.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/annotation-glossary.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/annotation-glossary.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/annotation-glossary.html 2010-08-26 21:13:52.000000000 +0100 @@ -7,7 +7,7 @@ - + @@ -57,6 +57,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/api-index-full.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/api-index-full.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/api-index-full.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/api-index-full.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -409,6 +409,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/ch01.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/ch01.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/ch01.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/ch01.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -21,7 +21,7 @@

-API

+API
DbusmenuServer @@ -43,6 +43,6 @@
+ Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/index.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/index.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/index.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/index.html 2010-08-26 21:13:52.000000000 +0100 @@ -6,7 +6,7 @@ - + @@ -41,6 +41,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -54,24 +54,24 @@ #define DBUSMENU_CLIENT_TYPES_IMAGE DbusmenuClient; DbusmenuClientClass; -gboolean (*DbusmenuClientTypeHandler) (DbusmenuMenuitem *newitem, +gboolean (*DbusmenuClientTypeHandler) (DbusmenuMenuitem *newitem, DbusmenuMenuitem *parent, DbusmenuClient *client); -DbusmenuClient * dbusmenu_client_new (const gchar *name, - const gchar *object); +DbusmenuClient * dbusmenu_client_new (const gchar *name, + const gchar *object); DbusmenuMenuitem * dbusmenu_client_get_root (DbusmenuClient *client); -gboolean dbusmenu_client_add_type_handler (DbusmenuClient *client, - const gchar *type, +gboolean dbusmenu_client_add_type_handler (DbusmenuClient *client, + const gchar *type, DbusmenuClientTypeHandler newfunc); void dbusmenu_client_send_event (DbusmenuClient *client, - gint id, - const gchar *name, - const GValue *value, - guint timestamp); + gint id, + const gchar *name, + const GValue *value, + guint timestamp); void dbusmenu_client_send_about_to_show (DbusmenuClient *client, - gint id, + gint id, void (cbgpointer user_data) (), - gpointer cb_data); + gpointer cb_data);
@@ -172,9 +172,9 @@
- +

GObject parent;

GObject parent;

-GObject. +GObject.
@@ -188,12 +188,13 @@ void (*layout_updated)(void); void (*root_changed) (DbusmenuMenuitem * newroot); void (*new_menuitem) (DbusmenuMenuitem * newitem); + void (*item_activate) (DbusmenuMenuitem * item, guint timestamp); /* Reserved for future use */ void (*reserved1) (void); void (*reserved2) (void); void (*reserved3) (void); - void (*reserved4) (void); + /* void (*reserved4) (void); */ } DbusmenuClientClass;

@@ -205,9 +206,9 @@ -

GObjectClass parent_class;

+

GObjectClass parent_class;

-GObjectClass +GObjectClass @@ -226,22 +227,22 @@ -

reserved1 ()

-Reserved for future use. +

item_activate ()

+Slote for "item-activate". -

reserved2 ()

+

reserved1 ()

Reserved for future use. -

reserved3 ()

+

reserved2 ()

Reserved for future use. -

reserved4 ()

+

reserved3 ()

Reserved for future use. @@ -251,7 +252,7 @@

DbusmenuClientTypeHandler ()

-
gboolean            (*DbusmenuClientTypeHandler)        (DbusmenuMenuitem *newitem,
+
gboolean            (*DbusmenuClientTypeHandler)        (DbusmenuMenuitem *newitem,
                                                          DbusmenuMenuitem *parent,
                                                          DbusmenuClient *client);

@@ -285,8 +286,8 @@


dbusmenu_client_new ()

-
DbusmenuClient *    dbusmenu_client_new                 (const gchar *name,
-                                                         const gchar *object);
+
DbusmenuClient *    dbusmenu_client_new                 (const gchar *name,
+                                                         const gchar *object);

This function creates a new client that connects to a specific server on DBus. That server is at a specific location sharing @@ -340,7 +341,7 @@

Returns :

A DbusmenuMenuitem representing the root of menu on the server. If there is no server or there is - an error receiving its layout it'll return NULL. + an error receiving its layout it'll return NULL. @@ -349,8 +350,8 @@

dbusmenu_client_add_type_handler ()

-
gboolean            dbusmenu_client_add_type_handler    (DbusmenuClient *client,
-                                                         const gchar *type,
+
gboolean            dbusmenu_client_add_type_handler    (DbusmenuClient *client,
+                                                         const gchar *type,
                                                          DbusmenuClientTypeHandler newfunc);

This function connects into the type handling of the DbusmenuClient. @@ -397,10 +398,10 @@

dbusmenu_client_send_event ()

void                dbusmenu_client_send_event          (DbusmenuClient *client,
-                                                         gint id,
-                                                         const gchar *name,
-                                                         const GValue *value,
-                                                         guint timestamp);
+ gint id, + const gchar *name, + const GValue *value, + guint timestamp);

@@ -438,9 +439,9 @@

dbusmenu_client_send_about_to_show ()

void                dbusmenu_client_send_about_to_show  (DbusmenuClient *client,
-                                                         gint id,
+                                                         gint id,
                                                          void (cbgpointer user_data) (),
-                                                         gpointer cb_data);
+ gpointer cb_data);

@@ -456,6 +457,8 @@ @@ -470,6 +473,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClientMenuitem.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClientMenuitem.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClientMenuitem.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClientMenuitem.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,115 +0,0 @@ - - - - -DbusmenuClientMenuitem - - - - - - - - - -
gpointer user_data: gpointer user_data: +gpointer user_data: +gpointer user_data:
- - - - - - - - - -
-
-
- - -
-

DbusmenuClientMenuitem

-

DbusmenuClientMenuitem

-
- -
-

Description

-

-

-
-
-

Details

-
-

DBUSMENU_CLIENT_MENUITEM_TYPE

-
#define DBUSMENU_CLIENT_MENUITEM_TYPE            (dbusmenu_client_menuitem_get_type ())
-
-

-

-
-
-
-

DbusmenuClientMenuitem

-
typedef struct {
-	DbusmenuMenuitem parent;
-} DbusmenuClientMenuitem;
-
-

-

-
-
-
-

DbusmenuClientMenuitemClass

-
typedef struct {
-	DbusmenuMenuitemClass parent_class;
-} DbusmenuClientMenuitemClass;
-
-

-

-
-
-
-

dbusmenu_client_menuitem_new ()

-
DbusmenuClientMenuitem * dbusmenu_client_menuitem_new   (gint id,
-                                                         DbusmenuClient *client);
-

-

-
-- - - - - - - - - - - - - - -

id :

-

client :

-

Returns :

-
-
-
-
- - - \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -70,80 +70,80 @@ DbusmenuMenuitem; void (*dbusmenu_menuitem_about_to_show_cb) (DbusmenuMenuitem *mi, - gpointer user_data); + gpointer user_data); void (*dbusmenu_menuitem_buildxml_slot_t) (DbusmenuMenuitem *mi, - GPtrArray *stringarray); + GPtrArray *stringarray); DbusmenuMenuitemClass; DbusmenuMenuitem * dbusmenu_menuitem_new (void); -DbusmenuMenuitem * dbusmenu_menuitem_new_with_id (gint id); -gint dbusmenu_menuitem_get_id (DbusmenuMenuitem *mi); -GList * dbusmenu_menuitem_get_children (DbusmenuMenuitem *mi); -GList * dbusmenu_menuitem_take_children (DbusmenuMenuitem *mi); -guint dbusmenu_menuitem_get_position (DbusmenuMenuitem *mi, +DbusmenuMenuitem * dbusmenu_menuitem_new_with_id (gint id); +gint dbusmenu_menuitem_get_id (DbusmenuMenuitem *mi); +GList * dbusmenu_menuitem_get_children (DbusmenuMenuitem *mi); +GList * dbusmenu_menuitem_take_children (DbusmenuMenuitem *mi); +guint dbusmenu_menuitem_get_position (DbusmenuMenuitem *mi, DbusmenuMenuitem *parent); -guint dbusmenu_menuitem_get_position_realized +guint dbusmenu_menuitem_get_position_realized (DbusmenuMenuitem *mi, DbusmenuMenuitem *parent); -gboolean dbusmenu_menuitem_child_append (DbusmenuMenuitem *mi, +gboolean dbusmenu_menuitem_child_append (DbusmenuMenuitem *mi, DbusmenuMenuitem *child); -gboolean dbusmenu_menuitem_child_prepend (DbusmenuMenuitem *mi, +gboolean dbusmenu_menuitem_child_prepend (DbusmenuMenuitem *mi, DbusmenuMenuitem *child); -gboolean dbusmenu_menuitem_child_delete (DbusmenuMenuitem *mi, +gboolean dbusmenu_menuitem_child_delete (DbusmenuMenuitem *mi, DbusmenuMenuitem *child); -gboolean dbusmenu_menuitem_child_add_position +gboolean dbusmenu_menuitem_child_add_position (DbusmenuMenuitem *mi, DbusmenuMenuitem *child, - guint position); -gboolean dbusmenu_menuitem_child_reorder (DbusmenuMenuitem *mi, + guint position); +gboolean dbusmenu_menuitem_child_reorder (DbusmenuMenuitem *mi, DbusmenuMenuitem *child, - guint position); + guint position); DbusmenuMenuitem * dbusmenu_menuitem_child_find (DbusmenuMenuitem *mi, - gint id); + gint id); DbusmenuMenuitem * dbusmenu_menuitem_find_id (DbusmenuMenuitem *mi, - gint id); -gboolean dbusmenu_menuitem_property_set (DbusmenuMenuitem *mi, - const gchar *property, - const gchar *value); -gboolean dbusmenu_menuitem_property_set_value + gint id); +gboolean dbusmenu_menuitem_property_set (DbusmenuMenuitem *mi, + const gchar *property, + const gchar *value); +gboolean dbusmenu_menuitem_property_set_value (DbusmenuMenuitem *mi, - const gchar *property, - const GValue *value); -gboolean dbusmenu_menuitem_property_set_bool (DbusmenuMenuitem *mi, - const gchar *property, - const gboolean value); -gboolean dbusmenu_menuitem_property_set_int (DbusmenuMenuitem *mi, - const gchar *property, - const gint value); -const gchar * dbusmenu_menuitem_property_get (DbusmenuMenuitem *mi, - const gchar *property); -const GValue * dbusmenu_menuitem_property_get_value + const gchar *property, + const GValue *value); +gboolean dbusmenu_menuitem_property_set_bool (DbusmenuMenuitem *mi, + const gchar *property, + const gboolean value); +gboolean dbusmenu_menuitem_property_set_int (DbusmenuMenuitem *mi, + const gchar *property, + const gint value); +const gchar * dbusmenu_menuitem_property_get (DbusmenuMenuitem *mi, + const gchar *property); +const GValue * dbusmenu_menuitem_property_get_value (DbusmenuMenuitem *mi, - const gchar *property); -gboolean dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem *mi, - const gchar *property); -gint dbusmenu_menuitem_property_get_int (DbusmenuMenuitem *mi, - const gchar *property); -gboolean dbusmenu_menuitem_property_exist (DbusmenuMenuitem *mi, - const gchar *property); -GList * dbusmenu_menuitem_properties_list (DbusmenuMenuitem *mi); -GHashTable * dbusmenu_menuitem_properties_copy (DbusmenuMenuitem *mi); + const gchar *property); +gboolean dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem *mi, + const gchar *property); +gint dbusmenu_menuitem_property_get_int (DbusmenuMenuitem *mi, + const gchar *property); +gboolean dbusmenu_menuitem_property_exist (DbusmenuMenuitem *mi, + const gchar *property); +GList * dbusmenu_menuitem_properties_list (DbusmenuMenuitem *mi); +GHashTable * dbusmenu_menuitem_properties_copy (DbusmenuMenuitem *mi); void dbusmenu_menuitem_property_remove (DbusmenuMenuitem *mi, - const gchar *property); + const gchar *property); void dbusmenu_menuitem_set_root (DbusmenuMenuitem *mi, - gboolean root); -gboolean dbusmenu_menuitem_get_root (DbusmenuMenuitem *mi); + gboolean root); +gboolean dbusmenu_menuitem_get_root (DbusmenuMenuitem *mi); void dbusmenu_menuitem_foreach (DbusmenuMenuitem *mi, void (funcDbusmenuMenuitem * mi, gpointer data) (), - gpointer data); + gpointer data); void dbusmenu_menuitem_handle_event (DbusmenuMenuitem *mi, - const gchar *name, - const GValue *value, - guint timestamp); + const gchar *name, + const GValue *value, + guint timestamp); void dbusmenu_menuitem_send_about_to_show (DbusmenuMenuitem *mi, dbusmenu_menuitem_about_to_show_cb cb, - gpointer cb_data); + gpointer cb_data);
@@ -356,7 +356,7 @@ } DbusmenuMenuitem;

-This is the GObject based object that represents a menu +This is the GObject based object that represents a menu item. It gets created the same on both the client and the server side and libdbusmenu-glib does the work of making this object model appear on both sides of DBus. Simple @@ -369,7 +369,7 @@

dbusmenu_menuitem_about_to_show_cb ()

void                (*dbusmenu_menuitem_about_to_show_cb)
                                                         (DbusmenuMenuitem *mi,
-                                                         gpointer user_data);
+ gpointer user_data);

Callback prototype for a callback that is called when the menu should be shown. @@ -384,7 +384,8 @@

user_data :

- Extra user data sent with the function. closure + Extra user data sent with the function. [closure] +
@@ -394,7 +395,7 @@

dbusmenu_menuitem_buildxml_slot_t ()

void                (*dbusmenu_menuitem_buildxml_slot_t)
                                                         (DbusmenuMenuitem *mi,
-                                                         GPtrArray *stringarray);
+ GPtrArray *stringarray);

This is the function that is called to represent this menu item as an XML fragment. Should call it's own children. @@ -404,11 +405,13 @@

mi :

- Menu item that should be built from. in. + Menu item that should be built from. [in] +

stringarray :

- An array of strings that can be combined into an XML file.. inout. transfer none. array. element-type utf8. + An array of strings that can be combined into an XML file. [inout][transfer none][array][element-type utf8] +
@@ -432,7 +435,8 @@ void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); - void (*reserved1) (void); + void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data); + /* void (*reserved1) (void); */ /* void (*reserved2) (void); */ /* void (*reserved3) (void); */ /* void (*reserved4) (void); -- realized, realloc when bumping lib version */ @@ -442,7 +446,7 @@ -

GObjectClass parent_class;

+

GObjectClass parent_class;

@@ -492,8 +496,8 @@ -

reserved1 ()

-Reserved for future use. +

show_to_user ()

+Slot for "show-to-user". @@ -518,7 +522,7 @@

dbusmenu_menuitem_new_with_id ()

-
DbusmenuMenuitem *  dbusmenu_menuitem_new_with_id       (gint id);
+
DbusmenuMenuitem *  dbusmenu_menuitem_new_with_id       (gint id);

This creates a blank DbusmenuMenuitem with a specific ID.

@@ -541,7 +545,7 @@

dbusmenu_menuitem_get_id ()

-
gint                dbusmenu_menuitem_get_id            (DbusmenuMenuitem *mi);
+
gint                dbusmenu_menuitem_get_id            (DbusmenuMenuitem *mi);

Gets the unique ID for mi.

@@ -564,7 +568,7 @@

dbusmenu_menuitem_get_children ()

-
GList *             dbusmenu_menuitem_get_children      (DbusmenuMenuitem *mi);
+
GList *             dbusmenu_menuitem_get_children      (DbusmenuMenuitem *mi);

Returns simply the list of children that this menu item has. The list is valid until another child related function @@ -580,7 +584,7 @@

Returns :

- A GList of pointers to DbusmenuMenuitem objects. + A GList of pointers to DbusmenuMenuitem objects. @@ -589,7 +593,7 @@

dbusmenu_menuitem_take_children ()

-
GList *             dbusmenu_menuitem_take_children     (DbusmenuMenuitem *mi);
+
GList *             dbusmenu_menuitem_take_children     (DbusmenuMenuitem *mi);

While the name sounds devious that's exactly what this function does. It takes the list of children from the mi and clears the @@ -607,7 +611,7 @@

Returns :

- A GList of pointers to DbusmenuMenuitem objects. + A GList of pointers to DbusmenuMenuitem objects. @@ -616,7 +620,7 @@

dbusmenu_menuitem_get_position ()

-
guint               dbusmenu_menuitem_get_position      (DbusmenuMenuitem *mi,
+
guint               dbusmenu_menuitem_get_position      (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *parent);

This function returns the position of the menu item mi @@ -647,7 +651,7 @@


dbusmenu_menuitem_get_position_realized ()

-
guint               dbusmenu_menuitem_get_position_realized
+
guint               dbusmenu_menuitem_get_position_realized
                                                         (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *parent);

@@ -678,7 +682,7 @@


dbusmenu_menuitem_child_append ()

-
gboolean            dbusmenu_menuitem_child_append      (DbusmenuMenuitem *mi,
+
gboolean            dbusmenu_menuitem_child_append      (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *child);

This function adds child to the list of children on mi at @@ -708,7 +712,7 @@


dbusmenu_menuitem_child_prepend ()

-
gboolean            dbusmenu_menuitem_child_prepend     (DbusmenuMenuitem *mi,
+
gboolean            dbusmenu_menuitem_child_prepend     (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *child);

This function adds child to the list of children on mi at @@ -738,11 +742,11 @@


dbusmenu_menuitem_child_delete ()

-
gboolean            dbusmenu_menuitem_child_delete      (DbusmenuMenuitem *mi,
+
gboolean            dbusmenu_menuitem_child_delete      (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *child);

This function removes child from the children list of mi. It does - not call g_object_unref on child. + not call g_object_unref on child.

@@ -769,10 +773,10 @@

dbusmenu_menuitem_child_add_position ()

-
gboolean            dbusmenu_menuitem_child_add_position
+
gboolean            dbusmenu_menuitem_child_add_position
                                                         (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *child,
-                                                         guint position);
+ guint position);

Puts child in the list of children for mi at the location specified in position. If there is not enough entires available @@ -807,9 +811,9 @@


dbusmenu_menuitem_child_reorder ()

-
gboolean            dbusmenu_menuitem_child_reorder     (DbusmenuMenuitem *mi,
+
gboolean            dbusmenu_menuitem_child_reorder     (DbusmenuMenuitem *mi,
                                                          DbusmenuMenuitem *child,
-                                                         guint position);
+ guint position);

This function moves a child on the list of children. It is for a child that is already in the list, but simply needs a @@ -845,10 +849,10 @@

dbusmenu_menuitem_child_find ()

DbusmenuMenuitem *  dbusmenu_menuitem_child_find        (DbusmenuMenuitem *mi,
-                                                         gint id);
+ gint id);

Search the children of mi to find one with the ID of id. - If it doesn't exist then we return NULL. + If it doesn't exist then we return NULL.

@@ -865,7 +869,7 @@ - @@ -876,7 +880,7 @@

dbusmenu_menuitem_find_id ()

DbusmenuMenuitem *  dbusmenu_menuitem_find_id           (DbusmenuMenuitem *mi,
-                                                         gint id);
+ gint id);

This function searchs the whole tree of children that are attached to mi. This could be quite a few nodes, all @@ -899,7 +903,7 @@

@@ -909,9 +913,9 @@

dbusmenu_menuitem_property_set ()

-
gboolean            dbusmenu_menuitem_property_set      (DbusmenuMenuitem *mi,
-                                                         const gchar *property,
-                                                         const gchar *value);
+
gboolean            dbusmenu_menuitem_property_set      (DbusmenuMenuitem *mi,
+                                                         const gchar *property,
+                                                         const gchar *value);

Takes the pair of property and value and places them as a property on mi. If a property already exists by that name, @@ -949,10 +953,10 @@


dbusmenu_menuitem_property_set_value ()

-
gboolean            dbusmenu_menuitem_property_set_value
+
gboolean            dbusmenu_menuitem_property_set_value
                                                         (DbusmenuMenuitem *mi,
-                                                         const gchar *property,
-                                                         const GValue *value);
+ const gchar *property, + const GValue *value);

Returns :

The menu item with the ID id or NULL if it + The menu item with the ID id or NULL if it can't be found.

Returns :

The DbusmenuMenuitem with the ID of id - or NULL if there isn't such a menu item in the tree + or NULL if there isn't such a menu item in the tree represented by mi.
@@ -984,9 +988,9 @@

dbusmenu_menuitem_property_set_bool ()

-
gboolean            dbusmenu_menuitem_property_set_bool (DbusmenuMenuitem *mi,
-                                                         const gchar *property,
-                                                         const gboolean value);
+
gboolean            dbusmenu_menuitem_property_set_bool (DbusmenuMenuitem *mi,
+                                                         const gchar *property,
+                                                         const gboolean value);

Takes a boolean value and sets it on property as a property on mi. If a property already exists by that name, @@ -1024,9 +1028,9 @@


dbusmenu_menuitem_property_set_int ()

-
gboolean            dbusmenu_menuitem_property_set_int  (DbusmenuMenuitem *mi,
-                                                         const gchar *property,
-                                                         const gint value);
+
gboolean            dbusmenu_menuitem_property_set_int  (DbusmenuMenuitem *mi,
+                                                         const gchar *property,
+                                                         const gint value);

Takes a boolean value and sets it on property as a property on mi. If a property already exists by that name, @@ -1064,11 +1068,11 @@


dbusmenu_menuitem_property_get ()

-
const gchar *       dbusmenu_menuitem_property_get      (DbusmenuMenuitem *mi,
-                                                         const gchar *property);
+
const gchar *       dbusmenu_menuitem_property_get      (DbusmenuMenuitem *mi,
+                                                         const gchar *property);

Look up a property on mi and return the value of it if - it exits. NULL will be returned if the property doesn't + it exits. NULL will be returned if the property doesn't exist.

@@ -1087,7 +1091,7 @@ @@ -1097,12 +1101,12 @@

dbusmenu_menuitem_property_get_value ()

-
const GValue *      dbusmenu_menuitem_property_get_value
+
const GValue *      dbusmenu_menuitem_property_get_value
                                                         (DbusmenuMenuitem *mi,
-                                                         const gchar *property);
+ const gchar *property);

Look up a property on mi and return the value of it if - it exits. NULL will be returned if the property doesn't + it exits. NULL will be returned if the property doesn't exist.

Returns :

A string with the value of the property - that shouldn't be free'd. Or NULL if the property + that shouldn't be free'd. Or NULL if the property is not set or is not a string.
@@ -1129,11 +1133,11 @@

dbusmenu_menuitem_property_get_bool ()

-
gboolean            dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem *mi,
-                                                         const gchar *property);
+
gboolean            dbusmenu_menuitem_property_get_bool (DbusmenuMenuitem *mi,
+                                                         const gchar *property);

Look up a property on mi and return the value of it if - it exits. Returns FALSE if the property doesn't exist. + it exits. Returns FALSE if the property doesn't exist.

@@ -1150,7 +1154,7 @@ - @@ -1159,8 +1163,8 @@

dbusmenu_menuitem_property_get_int ()

-
gint                dbusmenu_menuitem_property_get_int  (DbusmenuMenuitem *mi,
-                                                         const gchar *property);
+
gint                dbusmenu_menuitem_property_get_int  (DbusmenuMenuitem *mi,
+                                                         const gchar *property);

Look up a property on mi and return the value of it if it exits. Returns zero if the property doesn't exist. @@ -1189,8 +1193,8 @@


dbusmenu_menuitem_property_exist ()

-
gboolean            dbusmenu_menuitem_property_exist    (DbusmenuMenuitem *mi,
-                                                         const gchar *property);
+
gboolean            dbusmenu_menuitem_property_exist    (DbusmenuMenuitem *mi,
+                                                         const gchar *property);

Returns :

The value of the property or FALSE. + The value of the property or FALSE.
@@ -1217,12 +1221,12 @@

dbusmenu_menuitem_properties_list ()

-
GList *             dbusmenu_menuitem_properties_list   (DbusmenuMenuitem *mi);
+
GList *             dbusmenu_menuitem_properties_list   (DbusmenuMenuitem *mi);

This functiong gets a list of the names of all the properties that are set on this menu item. This data on the list is owned by the menuitem but the list is not and should be freed using - g_list_free() when the calling function is done with it. + g_list_free() when the calling function is done with it.

@@ -1244,14 +1248,14 @@

dbusmenu_menuitem_properties_copy ()

-
GHashTable *        dbusmenu_menuitem_properties_copy   (DbusmenuMenuitem *mi);
+
GHashTable *        dbusmenu_menuitem_properties_copy   (DbusmenuMenuitem *mi);

This function takes the properties of a DbusmenuMenuitem - and puts them into a GHashTable that is referenced by the + and puts them into a GHashTable that is referenced by the key of a string and has the value of a string. The hash table may not have any entries if there aren't any or there is an error in processing. It is the caller's responsibility - to destroy the created GHashTable. + to destroy the created GHashTable.

@@ -1264,7 +1268,7 @@ - @@ -1275,7 +1279,7 @@

dbusmenu_menuitem_property_remove ()

void                dbusmenu_menuitem_property_remove   (DbusmenuMenuitem *mi,
-                                                         const gchar *property);
+ const gchar *property);

Removes a property from the menuitem.

@@ -1299,7 +1303,7 @@

dbusmenu_menuitem_set_root ()

void                dbusmenu_menuitem_set_root          (DbusmenuMenuitem *mi,
-                                                         gboolean root);
+ gboolean root);

This function sets the internal value of whether this is a root node or not. @@ -1324,7 +1328,7 @@


dbusmenu_menuitem_get_root ()

-
gboolean            dbusmenu_menuitem_get_root          (DbusmenuMenuitem *mi);
+
gboolean            dbusmenu_menuitem_get_root          (DbusmenuMenuitem *mi);

This function returns the internal value of whether this is a root node or not. @@ -1340,7 +1344,7 @@

- @@ -1351,7 +1355,7 @@

dbusmenu_menuitem_foreach ()

void                dbusmenu_menuitem_foreach           (DbusmenuMenuitem *mi,
                                                          void (funcDbusmenuMenuitem * mi, gpointer data) (),
-                                                         gpointer data);
+ gpointer data);

This calls the function func on this menu item and all of the children of this item. And their children. And @@ -1368,7 +1372,8 @@

- +

Returns :

A brand new GHashTable that contains all of the + A brand new GHashTable that contains all of the properties that are on this DbusmenuMenuitem mi.

Returns :

TRUE if this is a root node + TRUE if this is a root node

data :

User data to pass to the function. closure User data to pass to the function. [closure] +
@@ -1377,9 +1382,9 @@

dbusmenu_menuitem_handle_event ()

void                dbusmenu_menuitem_handle_event      (DbusmenuMenuitem *mi,
-                                                         const gchar *name,
-                                                         const GValue *value,
-                                                         guint timestamp);
+ const gchar *name, + const GValue *value, + guint timestamp);

This function is called to create an event. It is likely to be overrided by subclasses. The default menu item @@ -1427,7 +1432,7 @@

void                dbusmenu_menuitem_send_about_to_show
                                                         (DbusmenuMenuitem *mi,
                                                          dbusmenu_menuitem_about_to_show_cb cb,
-                                                         gpointer cb_data);
+ gpointer cb_data);

This function is used to send the even that the submenu of this item is about to be shown. Callers to this event @@ -1449,7 +1454,8 @@

cb_data :

- Data to pass to the callback.. closure + Data to pass to the callback. [closure] +
@@ -1458,6 +1464,6 @@
+ Generated by GTK-Doc V1.15
\ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitemProxy.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitemProxy.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitemProxy.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitemProxy.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -121,7 +121,7 @@

Returns :

- A DbusmenuMenuitem object or a NULL if we + A DbusmenuMenuitem object or a NULL if we don't have one or there is an error. @@ -132,6 +132,6 @@
+ Generated by GTK-Doc V1.15
\ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -46,7 +46,7 @@ #define DBUSMENU_SERVER_PROP_VERSION DbusmenuServer; DbusmenuServerClass; -DbusmenuServer * dbusmenu_server_new (const gchar *object); +DbusmenuServer * dbusmenu_server_new (const gchar *object); void dbusmenu_server_set_root (DbusmenuServer *server, DbusmenuMenuitem *root); @@ -127,9 +127,9 @@
- +

GObject parent;

GObject parent;

-GObject +GObject
@@ -144,12 +144,12 @@ void (*id_prop_update)(gint id, gchar * property, gchar * value); void (*id_update)(gint id); void (*layout_updated)(gint revision); + void (*item_activation)(gint id, guint timestamp); /* Reserved */ void (*dbusmenu_server_reserved1)(void); void (*dbusmenu_server_reserved2)(void); void (*dbusmenu_server_reserved3)(void); - void (*dbusmenu_server_reserved4)(void); } DbusmenuServerClass;

@@ -159,9 +159,9 @@ -

GObjectClass parent_class;

+

GObjectClass parent_class;

-GObjectClass +GObjectClass @@ -180,22 +180,22 @@ -

dbusmenu_server_reserved1 ()

-Reserved for future use. +

item_activation ()

+ -

dbusmenu_server_reserved2 ()

+

dbusmenu_server_reserved1 ()

Reserved for future use. -

dbusmenu_server_reserved3 ()

+

dbusmenu_server_reserved2 ()

Reserved for future use. -

dbusmenu_server_reserved4 ()

+

dbusmenu_server_reserved3 ()

Reserved for future use. @@ -205,7 +205,7 @@

dbusmenu_server_new ()

-
DbusmenuServer *    dbusmenu_server_new                 (const gchar *object);
+
DbusmenuServer *    dbusmenu_server_new                 (const gchar *object);

Creates a new DbusmenuServer object with a specific object path on DBus. If object is set to NULL the default object @@ -234,7 +234,7 @@

void                dbusmenu_server_set_root            (DbusmenuServer *server,
                                                          DbusmenuMenuitem *root);

-This function contains all of the GValue wrapping +This function contains all of the GValue wrapping required to set the property "root-node" on the server self.

@@ -258,6 +258,6 @@
+ Generated by GTK-Doc V1.15
\ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/object-tree.html libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/object-tree.html --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/object-tree.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/object-tree.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@
+ Generated by GTK-Doc V1.15
\ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/style.css libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/style.css --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/html/style.css 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/html/style.css 2010-08-26 21:13:52.000000000 +0100 @@ -209,6 +209,14 @@ font-weight: normal; } +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-size: 80%; + font-weight: normal; +} + /* code listings */ .listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/Makefile.in libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/Makefile.in --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -77,6 +77,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -157,6 +159,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/tmpl/client.sgml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/tmpl/client.sgml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/tmpl/client.sgml 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/tmpl/client.sgml 2010-08-26 21:13:52.000000000 +0100 @@ -92,10 +92,10 @@ @layout_updated: @root_changed: @new_menuitem: +@item_activate: @reserved1: @reserved2: @reserved3: -@reserved4: @@ -158,6 +158,8 @@ @client: @id: @gpointer user_data: +@gpointer user_data: +@gpointer user_data: @gpointer user_data: @cb_data: diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml 2010-08-26 21:13:52.000000000 +0100 @@ -221,7 +221,7 @@ @buildxml: @handle_event: @send_about_to_show: -@reserved1: +@show_to_user: @@ -506,6 +506,8 @@ @mi: @DbusmenuMenuitem * mi, gpointer data: +@DbusmenuMenuitem * mi, gpointer data: +@DbusmenuMenuitem * mi, gpointer data: @DbusmenuMenuitem * mi, gpointer data: @data: diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/tmpl/server.sgml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/tmpl/server.sgml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/tmpl/server.sgml 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/tmpl/server.sgml 2010-08-26 21:13:52.000000000 +0100 @@ -85,10 +85,10 @@ @id_prop_update: @id_update: @layout_updated: +@item_activation: @dbusmenu_server_reserved1: @dbusmenu_server_reserved2: @dbusmenu_server_reserved3: -@dbusmenu_server_reserved4: diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/version.xml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/version.xml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/version.xml 2010-07-15 15:30:14.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/version.xml 2010-08-26 21:12:29.000000000 +0100 @@ -1 +1 @@ -0.3.6 +0.3.12 diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/xml/client.xml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/xml/client.xml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/xml/client.xml 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/xml/client.xml 2010-08-26 21:13:52.000000000 +0100 @@ -160,12 +160,13 @@ void (*layout_updated)(void); void (*root_changed) (DbusmenuMenuitem * newroot); void (*new_menuitem) (DbusmenuMenuitem * newitem); + void (*item_activate) (DbusmenuMenuitem * item, guint timestamp); /* Reserved for future use */ void (*reserved1) (void); void (*reserved2) (void); void (*reserved3) (void); - void (*reserved4) (void); + /* void (*reserved4) (void); */ } DbusmenuClientClass; @@ -189,6 +190,10 @@ Slot for "new-menuitem". +item_activate () +Slote for "item-activate". + + reserved1 () Reserved for future use. @@ -201,10 +206,6 @@ Reserved for future use. -reserved4 () -Reserved for future use. - - DbusmenuClientTypeHandler () @@ -343,6 +344,8 @@ gpointer user_data: gpointer user_data: +gpointer user_data: +gpointer user_data: cb_data : diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/xml/menuitem.xml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/xml/menuitem.xml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/xml/menuitem.xml 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/xml/menuitem.xml 2010-08-26 21:13:52.000000000 +0100 @@ -339,7 +339,7 @@ Menu item that should be shown user_data : - Extra user data sent with the function. closure + Extra user data sent with the function. [closure] dbusmenu_menuitem_buildxml_slot_t () @@ -352,9 +352,9 @@ as an XML fragment. Should call it's own children. mi : - Menu item that should be built from. in. + Menu item that should be built from. [in] stringarray : - An array of strings that can be combined into an XML file.. inout. transfer none. array. element-type utf8. + An array of strings that can be combined into an XML file. [inout][transfer none][array][element-type utf8] DbusmenuMenuitemClass @@ -375,7 +375,8 @@ void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); - void (*reserved1) (void); + void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data); + /* void (*reserved1) (void); */ /* void (*reserved2) (void); */ /* void (*reserved3) (void); */ /* void (*reserved4) (void); -- realized, realloc when bumping lib version */ @@ -422,8 +423,8 @@ Virtual function that notifies server that the client is about to show a menu. -reserved1 () -Reserved for future use. +show_to_user () +Slot for "show-to-user". @@ -963,7 +964,7 @@ The DbusmenItem to start from data : - User data to pass to the function. closure + User data to pass to the function. [closure] dbusmenu_menuitem_handle_event () @@ -1020,7 +1021,7 @@ Callback to call when the call has returned. cb_data : - Data to pass to the callback.. closure + Data to pass to the callback. [closure] diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/xml/server.xml libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/xml/server.xml --- libdbusmenu-0.3.6/docs/libdbusmenu-glib/reference/xml/server.xml 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-glib/reference/xml/server.xml 2010-08-26 21:13:52.000000000 +0100 @@ -117,12 +117,12 @@ void (*id_prop_update)(gint id, gchar * property, gchar * value); void (*id_update)(gint id); void (*layout_updated)(gint revision); + void (*item_activation)(gint id, guint timestamp); /* Reserved */ void (*dbusmenu_server_reserved1)(void); void (*dbusmenu_server_reserved2)(void); void (*dbusmenu_server_reserved3)(void); - void (*dbusmenu_server_reserved4)(void); } DbusmenuServerClass; @@ -144,6 +144,10 @@ Slot for "layout-update". +item_activation () + + + dbusmenu_server_reserved1 () Reserved for future use. @@ -156,10 +160,6 @@ Reserved for future use. -dbusmenu_server_reserved4 () -Reserved for future use. - - dbusmenu_server_new () diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/Makefile.in libdbusmenu-0.3.12/docs/libdbusmenu-gtk/Makefile.in --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -110,6 +110,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -190,6 +192,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/api-index-full.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/api-index-full.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/api-index-full.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/api-index-full.html 2010-08-26 21:13:52.000000000 +0100 @@ -7,7 +7,7 @@ - + @@ -167,6 +167,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/ch01.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/ch01.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/ch01.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/ch01.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -21,7 +21,7 @@

-API

+API
DbusmenuGtkMenu @@ -39,6 +39,6 @@
+ Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/Genericmenuitem.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/Genericmenuitem.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/Genericmenuitem.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/Genericmenuitem.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -52,28 +52,28 @@ GenericmenuitemPrivate; enum GenericmenuitemCheckType; enum GenericmenuitemState; -GType genericmenuitem_get_type (void); +GType genericmenuitem_get_type (void); void genericmenuitem_set_check_type (Genericmenuitem *item, GenericmenuitemCheckType check_type); void genericmenuitem_set_state (Genericmenuitem *item, GenericmenuitemState state); void genericmenuitem_set_image (Genericmenuitem *item, - GtkWidget *image); -GtkWidget * genericmenuitem_get_image (Genericmenuitem *item); + GtkWidget *image); +GtkWidget * genericmenuitem_get_image (Genericmenuitem *item);

Object Hierarchy

-  GObject
-   +----GInitiallyUnowned
-         +----GtkObject
-               +----GtkWidget
-                     +----GtkContainer
-                           +----GtkBin
-                                 +----GtkItem
-                                       +----GtkMenuItem
-                                             +----GtkCheckMenuItem
+  GObject
+   +----GInitiallyUnowned
+         +----GtkObject
+               +----GtkWidget
+                     +----GtkContainer
+                           +----GtkBin
+                                 +----GtkItem
+                                       +----GtkMenuItem
+                                             +----GtkCheckMenuItem
                                                    +----Genericmenuitem
 
@@ -81,7 +81,7 @@

Implemented Interfaces

Genericmenuitem implements - AtkImplementorIface, GtkBuildable and GtkActivatable.

+ AtkImplementorIface, GtkBuildable and GtkActivatable.

Description

@@ -238,7 +238,7 @@

genericmenuitem_get_type ()

-
GType               genericmenuitem_get_type            (void);
+
GType               genericmenuitem_get_type            (void);

@@ -307,7 +307,7 @@

genericmenuitem_set_image ()

void                genericmenuitem_set_image           (Genericmenuitem *item,
-                                                         GtkWidget *image);
+ GtkWidget *image);

Sets the image of the menu item.

@@ -330,7 +330,7 @@

genericmenuitem_get_image ()

-
GtkWidget *         genericmenuitem_get_image           (Genericmenuitem *item);
+
GtkWidget *         genericmenuitem_get_image           (Genericmenuitem *item);

Returns the image if there is one.

@@ -344,7 +344,7 @@
- @@ -355,6 +355,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/index.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/index.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/index.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/index.html 2010-08-26 21:13:52.000000000 +0100 @@ -6,7 +6,7 @@ - + @@ -37,6 +37,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -40,16 +40,16 @@
#define             DBUSMENU_GTKCLIENT_TYPE
 #define             DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED
                     DbusmenuGtkClientClass;
-DbusmenuGtkClient * dbusmenu_gtkclient_new              (gchar *dbus_name,
-                                                         gchar *dbus_object);
-GtkMenuItem *       dbusmenu_gtkclient_menuitem_get     (DbusmenuGtkClient *client,
+DbusmenuGtkClient * dbusmenu_gtkclient_new              (gchar *dbus_name,
+                                                         gchar *dbus_object);
+GtkMenuItem *       dbusmenu_gtkclient_menuitem_get     (DbusmenuGtkClient *client,
                                                          DbusmenuMenuitem *item);
-GtkMenu *           dbusmenu_gtkclient_menuitem_get_submenu
+GtkMenu *           dbusmenu_gtkclient_menuitem_get_submenu
                                                         (DbusmenuGtkClient *client,
                                                          DbusmenuMenuitem *item);
 void                dbusmenu_gtkclient_newitem_base     (DbusmenuGtkClient *client,
                                                          DbusmenuMenuitem *item,
-                                                         GtkMenuItem *gmi,
+                                                         GtkMenuItem *gmi,
                                                          DbusmenuMenuitem *parent);
 
@@ -131,8 +131,8 @@

dbusmenu_gtkclient_new ()

-
DbusmenuGtkClient * dbusmenu_gtkclient_new              (gchar *dbus_name,
-                                                         gchar *dbus_object);
+
DbusmenuGtkClient * dbusmenu_gtkclient_new              (gchar *dbus_name,
+                                                         gchar *dbus_object);

Creates a new DbusmenuGtkClient object and creates a DbusmenuClient that connects across DBus to a DbusmenuServer. @@ -161,10 +161,10 @@


dbusmenu_gtkclient_menuitem_get ()

-
GtkMenuItem *       dbusmenu_gtkclient_menuitem_get     (DbusmenuGtkClient *client,
+
GtkMenuItem *       dbusmenu_gtkclient_menuitem_get     (DbusmenuGtkClient *client,
                                                          DbusmenuMenuitem *item);

-This grabs the GtkMenuItem that is associated with the +This grabs the GtkMenuItem that is associated with the DbusmenuMenuitem.

Returns :

A pointer to the image of the item or NULL + A pointer to the image of the item or NULL if there isn't one.
@@ -178,12 +178,12 @@ - @@ -192,7 +192,7 @@

dbusmenu_gtkclient_menuitem_get_submenu ()

-
GtkMenu *           dbusmenu_gtkclient_menuitem_get_submenu
+
GtkMenu *           dbusmenu_gtkclient_menuitem_get_submenu
                                                         (DbusmenuGtkClient *client,
                                                          DbusmenuMenuitem *item);

@@ -209,12 +209,12 @@

- @@ -225,7 +225,7 @@

dbusmenu_gtkclient_newitem_base ()

void                dbusmenu_gtkclient_newitem_base     (DbusmenuGtkClient *client,
                                                          DbusmenuMenuitem *item,
-                                                         GtkMenuItem *gmi,
+                                                         GtkMenuItem *gmi,
                                                          DbusmenuMenuitem *parent);

This function provides some of the basic connectivity for being in @@ -253,7 +253,7 @@

- @@ -268,6 +268,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -39,8 +39,8 @@

Synopsis

#define             DBUSMENU_GTKMENU_TYPE
                     DbusmenuGtkMenuClass;
-DbusmenuGtkMenu *   dbusmenu_gtkmenu_new                (gchar *dbus_name,
-                                                         gchar *dbus_object);
+DbusmenuGtkMenu *   dbusmenu_gtkmenu_new                (gchar *dbus_name,
+                                                         gchar *dbus_object);
 DbusmenuGtkClient * dbusmenu_gtkmenu_get_client         (DbusmenuGtkMenu *menu);
 
@@ -106,8 +106,8 @@

dbusmenu_gtkmenu_new ()

-
DbusmenuGtkMenu *   dbusmenu_gtkmenu_new                (gchar *dbus_name,
-                                                         gchar *dbus_object);
+
DbusmenuGtkMenu *   dbusmenu_gtkmenu_new                (gchar *dbus_name,
+                                                         gchar *dbus_object);

Creates a new DbusmenuGtkMenu object and creates a DbusmenuClient that connects across DBus to a DbusmenuServer. @@ -161,6 +161,6 @@

+ Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -37,13 +37,13 @@

item :

-DbusmenuMenuitem to get associated GtkMenuItem on. +DbusmenuMenuitem to get associated GtkMenuItem on.

Returns :

The GtkMenuItem that can be played with. + The GtkMenuItem that can be played with.

item :

-DbusmenuMenuitem to get associated GtkMenu on. +DbusmenuMenuitem to get associated GtkMenu on.

Returns :

The GtkMenu if there is one. + The GtkMenu if there is one.

gmi :

A GtkMenuItem representing the GTK world's view of this menuitem +A GtkMenuItem representing the GTK world's view of this menuitem

Synopsis

-
gboolean            dbusmenu_menuitem_property_set_image
+
gboolean            dbusmenu_menuitem_property_set_image
                                                         (DbusmenuMenuitem *menuitem,
-                                                         const gchar *property,
-                                                         const GdkPixbuf *data);
-GdkPixbuf *         dbusmenu_menuitem_property_get_image
+                                                         const gchar *property,
+                                                         const GdkPixbuf *data);
+GdkPixbuf *         dbusmenu_menuitem_property_get_image
                                                         (DbusmenuMenuitem *menuitem,
-                                                         const gchar *property);
+                                                         const gchar *property);
 
@@ -55,10 +55,10 @@

Details

dbusmenu_menuitem_property_set_image ()

-
gboolean            dbusmenu_menuitem_property_set_image
+
gboolean            dbusmenu_menuitem_property_set_image
                                                         (DbusmenuMenuitem *menuitem,
-                                                         const gchar *property,
-                                                         const GdkPixbuf *data);
+ const gchar *property, + const GdkPixbuf *data);

This function takes the pixbuf that is stored in data and turns it into a base64 encoded PNG so that it can be placed @@ -94,13 +94,13 @@


dbusmenu_menuitem_property_get_image ()

-
GdkPixbuf *         dbusmenu_menuitem_property_get_image
+
GdkPixbuf *         dbusmenu_menuitem_property_get_image
                                                         (DbusmenuMenuitem *menuitem,
-                                                         const gchar *property);
+ const gchar *property);

This function looks on the menu item for a property by the name of property. If one exists it tries to turn it into - a GdkPixbuf. It assumes that the property is a base64 encoded + a GdkPixbuf. It assumes that the property is a base64 encoded PNG file like the one created by dbusmenu_menuite_property_set_image.

@@ -118,7 +118,7 @@ - @@ -128,6 +128,6 @@ + Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/object-tree.html libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/object-tree.html --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/object-tree.html 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/object-tree.html 2010-08-26 21:13:52.000000000 +0100 @@ -8,7 +8,7 @@ - + @@ -23,20 +23,20 @@

Object Hierarchy

-    GObject
-        GInitiallyUnowned
-            GtkObject
-                GtkWidget
-                    GtkContainer
-                        GtkBin
-                            GtkItem
-                                GtkMenuItem
-                                    GtkCheckMenuItem
+    GObject
+        GInitiallyUnowned
+            GtkObject
+                GtkWidget
+                    GtkContainer
+                        GtkBin
+                            GtkItem
+                                GtkMenuItem
+                                    GtkCheckMenuItem
                                         Genericmenuitem
 
+ Generated by GTK-Doc V1.15 \ No newline at end of file diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/style.css libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/style.css --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/html/style.css 2010-07-15 15:30:16.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/html/style.css 2010-08-26 21:13:52.000000000 +0100 @@ -209,6 +209,14 @@ font-weight: normal; } +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-size: 80%; + font-weight: normal; +} + /* code listings */ .listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/Makefile.in libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/Makefile.in --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -77,6 +77,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -157,6 +159,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/version.xml libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/version.xml --- libdbusmenu-0.3.6/docs/libdbusmenu-gtk/reference/version.xml 2010-07-15 15:30:15.000000000 +0100 +++ libdbusmenu-0.3.12/docs/libdbusmenu-gtk/reference/version.xml 2010-08-26 21:12:29.000000000 +0100 @@ -1 +1 @@ -0.3.6 +0.3.12 diff -Nru libdbusmenu-0.3.6/docs/Makefile.in libdbusmenu-0.3.12/docs/Makefile.in --- libdbusmenu-0.3.6/docs/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/docs/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -110,6 +110,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -190,6 +192,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/client.c libdbusmenu-0.3.12/libdbusmenu-glib/client.c --- libdbusmenu-0.3.6/libdbusmenu-glib/client.c 2010-07-14 15:25:00.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/client.c 2010-08-26 21:11:31.000000000 +0100 @@ -41,6 +41,7 @@ #include "client-menuitem.h" #include "dbusmenu-client.h" #include "server-marshal.h" +#include "client-marshal.h" /* Properties */ enum { @@ -54,6 +55,8 @@ LAYOUT_UPDATED, ROOT_CHANGED, NEW_MENUITEM, + ITEM_ACTIVATE, + EVENT_RESULT, LAST_SIGNAL }; @@ -78,6 +81,10 @@ DBusGProxy * dbusproxy; GHashTable * type_handlers; + + GArray * delayed_property_list; + GArray * delayed_property_listeners; + gint delayed_idle; }; typedef struct _newItemPropData newItemPropData; @@ -88,6 +95,24 @@ DbusmenuMenuitem * parent; }; +typedef struct _properties_listener_t properties_listener_t; +struct _properties_listener_t { + gint id; + org_ayatana_dbusmenu_get_properties_reply callback; + gpointer user_data; + gboolean replied; +}; + +typedef struct _event_data_t event_data_t; +struct _event_data_t { + DbusmenuClient * client; + DbusmenuMenuitem * menuitem; + gchar * event; + GValue data; + guint timestamp; +}; + + #define DBUSMENU_CLIENT_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_TYPE_CLIENT, DbusmenuClientPrivate)) @@ -109,6 +134,9 @@ static void update_layout_cb (DBusGProxy * proxy, guint rev, gchar * xml, GError * in_error, void * data); static void update_layout (DbusmenuClient * client); static void menuitem_get_properties_cb (DBusGProxy * proxy, GHashTable * properties, GError * error, gpointer data); +static void get_properties_globber (DbusmenuClient * client, gint id, const gchar ** properties, org_ayatana_dbusmenu_get_properties_reply callback, gpointer user_data); +static GQuark error_domain (void); +static void item_activated (DBusGProxy * proxy, gint id, guint timestamp, DbusmenuClient * client); /* Build a type */ G_DEFINE_TYPE (DbusmenuClient, dbusmenu_client, G_TYPE_OBJECT); @@ -173,6 +201,41 @@ NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); + /** + DbusmenuClient::item-activate: + @arg0: The #DbusmenuClient object + @arg1: The #DbusmenuMenuitem activated + @arg2: A timestamp that the event happened at + + Signaled when the server wants to activate an item in + order to display the menu. + */ + signals[ITEM_ACTIVATE] = g_signal_new(DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE, + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DbusmenuClientClass, item_activate), + NULL, NULL, + _dbusmenu_client_marshal_VOID__OBJECT_UINT, + G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_UINT); + /** + DbusmenuClient::event-error: + @arg0: The #DbusmenuClient object + @arg1: The #DbusmenuMenuitem sent an event + @arg2: The ID of the event sent + @arg3: The data sent along with the event + @arg4: A timestamp that the event happened at + @arg5: Possibly the error in sending the event (or NULL) + + Signal sent to show that there was an error in sending the event + to the server. + */ + signals[EVENT_RESULT] = g_signal_new(DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT, + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DbusmenuClientClass, event_result), + NULL, NULL, + _dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT_POINTER, + G_TYPE_NONE, 5, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_POINTER); g_object_class_install_property (object_class, PROP_DBUSOBJECT, g_param_spec_string(DBUSMENU_CLIENT_PROP_DBUS_OBJECT, "DBus Object we represent", @@ -211,6 +274,10 @@ priv->type_handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + priv->delayed_idle = 0; + priv->delayed_property_list = g_array_new(TRUE, FALSE, sizeof(gchar *)); + priv->delayed_property_listeners = g_array_new(FALSE, FALSE, sizeof(properties_listener_t)); + return; } @@ -219,6 +286,44 @@ { DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(object); + if (priv->delayed_idle != 0) { + g_source_remove(priv->delayed_idle); + priv->delayed_idle = 0; + } + + /* Only used for queueing up a new command, so we can + just drop this array. */ + if (priv->delayed_property_list == NULL) { + gchar ** dataregion = (gchar **)g_array_free(priv->delayed_property_list, FALSE); + if (dataregion != NULL) { + g_strfreev(dataregion); + } + priv->delayed_property_list = NULL; + } + + if (priv->delayed_property_listeners == NULL) { + gint i; + GError * localerror = NULL; + + /* Making sure all the callbacks get called so that if they had + memory in their user_data that needs to be free'd that happens. */ + for (i = 0; i < priv->delayed_property_listeners->len; i++) { + properties_listener_t * listener = &g_array_index(priv->delayed_property_listeners, properties_listener_t, i); + if (!listener->replied) { + if (localerror == NULL) { + g_set_error_literal(&localerror, error_domain(), 0, "DbusmenuClient Shutdown"); + } + listener->callback(priv->menuproxy, NULL, localerror, listener->user_data); + } + } + if (localerror != NULL) { + g_error_free(localerror); + } + + g_array_free(priv->delayed_property_listeners, TRUE); + priv->delayed_property_listeners = NULL; + } + if (priv->layoutcall != NULL) { dbus_g_proxy_cancel_call(priv->menuproxy, priv->layoutcall); priv->layoutcall = NULL; @@ -310,6 +415,246 @@ /* Internal funcs */ +static GQuark +error_domain (void) +{ + static GQuark error = 0; + if (error == 0) { + error = g_quark_from_static_string(G_LOG_DOMAIN "-CLIENT"); + } + return error; +} + +/* Quick little function to search through the listeners and find + one that matches an ID */ +static properties_listener_t * +find_listener (GArray * listeners, guint index, gint id) +{ + if (index >= listeners->len) { + return NULL; + } + + properties_listener_t * retval = &g_array_index(listeners, properties_listener_t, index); + if (retval->id == id) { + return retval; + } + + return find_listener(listeners, index + 1, id); +} + +/* Call back from getting the group properties, now we need + to unwind and call the various functions. */ +static void +get_properties_callback (DBusGProxy *proxy, GPtrArray *OUT_properties, GError *error, gpointer userdata) +{ + GArray * listeners = (GArray *)userdata; + int i; + + #ifdef MASSIVEDEBUGGING + g_debug("Get properties callback: %d", OUT_properties->len); + #endif + + if (error != NULL) { + /* If we get an error, all our callbacks need to hear about it. */ + g_warning("Group Properties error: %s", error->message); + for (i = 0; i < listeners->len; i++) { + properties_listener_t * listener = &g_array_index(listeners, properties_listener_t, i); + listener->callback(proxy, NULL, error, listener->user_data); + } + g_array_free(listeners, TRUE); + return; + } + + /* Callback all the folks we can find */ + for (i = 0; i < OUT_properties->len; i++) { + GValueArray * varray = (GValueArray *)g_ptr_array_index(OUT_properties, i); + + if (varray->n_values != 2) { + g_warning("Value Array is %d entries long but we expected 2.", varray->n_values); + continue; + } + + GValue * vid = g_value_array_get_nth(varray, 0); + GValue * vproperties = g_value_array_get_nth(varray, 1); + + if (G_VALUE_TYPE(vid) != G_TYPE_INT) { + g_warning("ID Entry not holding an int: %s", G_VALUE_TYPE_NAME(vid)); + } + if (G_VALUE_TYPE(vproperties) != dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)) { + g_warning("Properties Entry not holding an a{sv}: %s", G_VALUE_TYPE_NAME(vproperties)); + } + + gint id = g_value_get_int(vid); + GHashTable * properties = g_value_get_boxed(vproperties); + + properties_listener_t * listener = find_listener(listeners, 0, id); + if (listener == NULL) { + g_warning("Unable to find listener for ID %d", id); + continue; + } + + if (!listener->replied) { + listener->callback(proxy, properties, NULL, listener->user_data); + listener->replied = TRUE; + } else { + g_warning("Odd, we've already replied to the listener on ID %d", id); + } + } + + /* Provide errors for those who we can't */ + GError * localerror = NULL; + for (i = 0; i < listeners->len; i++) { + properties_listener_t * listener = &g_array_index(listeners, properties_listener_t, i); + if (!listener->replied) { + if (localerror == NULL) { + g_set_error_literal(&localerror, error_domain(), 0, "Error getting properties for ID"); + } + listener->callback(proxy, NULL, localerror, listener->user_data); + } + } + if (localerror != NULL) { + g_error_free(localerror); + } + + /* Clean up */ + g_array_free(listeners, TRUE); + + return; +} + +/* Idle handler to send out all of our property requests as one big + lovely property request. */ +static gboolean +get_properties_idle (gpointer user_data) +{ + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(user_data); + //org_ayatana_dbusmenu_get_properties_async(priv->menuproxy, id, properties, callback, user_data); + + if (priv->delayed_property_listeners->len == 0) { + g_warning("Odd, idle func got no listeners."); + return FALSE; + } + + /* Build up an ID list to pass */ + GArray * idlist = g_array_new(FALSE, FALSE, sizeof(gint)); + gint i; + for (i = 0; i < priv->delayed_property_listeners->len; i++) { + g_array_append_val(idlist, g_array_index(priv->delayed_property_listeners, properties_listener_t, i).id); + } + + org_ayatana_dbusmenu_get_group_properties_async(priv->menuproxy, idlist, (const gchar **)priv->delayed_property_list->data, get_properties_callback, priv->delayed_property_listeners); + + /* Free ID List */ + g_array_free(idlist, TRUE); + + /* Free properties */ + gchar ** dataregion = (gchar **)g_array_free(priv->delayed_property_list, FALSE); + if (dataregion != NULL) { + g_strfreev(dataregion); + } + priv->delayed_property_list = g_array_new(TRUE, FALSE, sizeof(gchar *)); + + /* Rebuild the listeners */ + priv->delayed_property_listeners = g_array_new(FALSE, FALSE, sizeof(properties_listener_t)); + + /* Make sure we set for a new idle */ + priv->delayed_idle = 0; + + return FALSE; +} + +/* Forces a call out to start getting properties with the menu items + that we have queued up already. */ +static void +get_properties_flush (DbusmenuClient * client) +{ + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + + if (priv->delayed_idle == 0) { + return; + } + + g_source_remove(priv->delayed_idle); + priv->delayed_idle = 0; + + get_properties_idle(client); + + dbus_g_connection_flush(priv->session_bus); + + return; +} + +/* A function to group all the get_properties commands to make them + more efficient over dbus. */ +static void +get_properties_globber (DbusmenuClient * client, gint id, const gchar ** properties, org_ayatana_dbusmenu_get_properties_reply callback, gpointer user_data) +{ + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + if (find_listener(priv->delayed_property_listeners, 0, id) != NULL) { + g_warning("Asking for properties from same ID twice: %d", id); + GError * localerror = NULL; + g_set_error_literal(&localerror, error_domain(), 0, "ID already queued"); + callback(priv->menuproxy, NULL, localerror, user_data); + g_error_free(localerror); + return; + } + + if (properties == NULL || properties[0] == NULL) { + /* get all case */ + if (priv->delayed_property_list->len != 0) { + /* If there are entries in the list, then we'll need to + remove them all, and start over */ + gchar ** dataregion = (gchar **)g_array_free(priv->delayed_property_list, FALSE); + if (dataregion != NULL) { + g_strfreev(dataregion); + } + priv->delayed_property_list = g_array_new(TRUE, FALSE, sizeof(gchar *)); + } + } else { + /* there could be a list we care about */ + /* TODO: No one uses this today */ + /* TODO: Copy them into the list */ + } + + properties_listener_t listener = {0}; + listener.id = id; + listener.callback = callback; + listener.user_data = user_data; + listener.replied = FALSE; + + g_array_append_val(priv->delayed_property_listeners, listener); + + if (priv->delayed_idle == 0) { + priv->delayed_idle = g_idle_add(get_properties_idle, client); + } + + return; +} + +/* Called when a server item wants to activate the menu */ +static void +item_activated (DBusGProxy * proxy, gint id, guint timestamp, DbusmenuClient * client) +{ + g_return_if_fail(DBUSMENU_IS_CLIENT(client)); + + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + + if (priv->root == NULL) { + g_warning("Asked to activate item %d when we don't have a menu structure.", id); + return; + } + + DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id); + if (menuitem == NULL) { + g_warning("Unable to find menu item %d to activate.", id); + return; + } + + g_signal_emit(G_OBJECT(client), signals[ITEM_ACTIVATE], 0, menuitem, timestamp, TRUE); + + return; +} + /* Annoying little wrapper to make the right function update */ static void layout_update (DBusGProxy * proxy, guint revision, gint parent, DbusmenuClient * client) @@ -367,10 +712,9 @@ DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id); g_return_if_fail(menuitem != NULL); - gchar * properties[1] = {NULL}; /* This gets them all */ g_debug("Getting properties"); g_object_ref(menuitem); - org_ayatana_dbusmenu_get_properties_async(proxy, id, (const gchar **)properties, menuitem_get_properties_cb, menuitem); + get_properties_globber(client, id, NULL, menuitem_get_properties_cb, menuitem); return; } @@ -550,6 +894,10 @@ dbus_g_proxy_add_signal(priv->menuproxy, "ItemUpdated", G_TYPE_INT, G_TYPE_INVALID); dbus_g_proxy_connect_signal(priv->menuproxy, "ItemUpdated", G_CALLBACK(id_update), client, NULL); + dbus_g_object_register_marshaller(_dbusmenu_server_marshal_VOID__INT_UINT, G_TYPE_NONE, G_TYPE_INT, G_TYPE_UINT, G_TYPE_INVALID); + dbus_g_proxy_add_signal(priv->menuproxy, "ItemActivationRequested", G_TYPE_INT, G_TYPE_UINT, G_TYPE_INVALID); + dbus_g_proxy_connect_signal(priv->menuproxy, "ItemActivationRequested", G_CALLBACK(item_activated), client, NULL); + update_layout(client); return; @@ -655,16 +1003,19 @@ static void menuitem_get_properties_new_cb (DBusGProxy * proxy, GHashTable * properties, GError * error, gpointer data) { + g_return_if_fail(data != NULL); + newItemPropData * propdata = (newItemPropData *)data; + if (error != NULL) { g_warning("Error getting properties on a new menuitem: %s", error->message); - g_object_unref(data); + g_object_unref(propdata->item); + g_free(data); return; } - g_return_if_fail(data != NULL); - newItemPropData * propdata = (newItemPropData *)data; DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(propdata->client); + /* Extra ref as get_properties will unref once itself */ g_object_ref(propdata->item); menuitem_get_properties_cb (proxy, properties, error, propdata->item); @@ -704,10 +1055,19 @@ static void menuitem_call_cb (DBusGProxy * proxy, GError * error, gpointer userdata) { + event_data_t * edata = (event_data_t *)userdata; + if (error != NULL) { g_warning("Unable to call menu item %d: %s", GPOINTER_TO_INT(userdata), error->message); } + g_signal_emit(edata->client, signals[EVENT_RESULT], 0, edata->menuitem, edata->event, edata->data, edata->timestamp, error, TRUE); + + g_value_unset(&edata->data); + g_free(edata->event); + g_object_unref(edata->menuitem); + g_free(edata); + return; } @@ -720,6 +1080,13 @@ g_return_if_fail(id >= 0); g_return_if_fail(name != NULL); + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id); + if (mi == NULL) { + g_warning("Asked to activate a menuitem %d that we don't know about", id); + return; + } + if (value == NULL) { GValue internalval = {0}; g_value_init(&internalval, G_TYPE_INT); @@ -727,8 +1094,16 @@ value = &internalval; } - DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); - org_ayatana_dbusmenu_event_async (priv->menuproxy, id, name, value, timestamp, menuitem_call_cb, GINT_TO_POINTER(id)); + event_data_t * edata = g_new0(event_data_t, 1); + edata->client = client; + edata->menuitem = mi; + g_object_ref(edata->menuitem); + edata->event = g_strdup(name); + g_value_init(&edata->data, G_VALUE_TYPE(value)); + g_value_copy(value, &edata->data); + edata->timestamp = timestamp; + + org_ayatana_dbusmenu_event_async (priv->menuproxy, id, name, value, timestamp, menuitem_call_cb, edata); return; } @@ -784,11 +1159,51 @@ return; } +/* Builds a new child with property requests and everything + else to clean up the code a bit */ +static DbusmenuMenuitem * +parse_layout_new_child (gint id, DbusmenuClient * client, DbusmenuMenuitem * parent) +{ + DbusmenuMenuitem * item = NULL; + + /* Build a new item */ + item = DBUSMENU_MENUITEM(dbusmenu_client_menuitem_new(id, client)); + if (parent == NULL) { + dbusmenu_menuitem_set_root(item, TRUE); + } + + /* Get the properties queued up for this item */ + /* Not happy allocating about this, but I need these :( */ + newItemPropData * propdata = g_new0(newItemPropData, 1); + if (propdata != NULL) { + propdata->client = client; + propdata->item = item; + propdata->parent = parent; + + g_object_ref(item); + get_properties_globber(client, id, NULL, menuitem_get_properties_new_cb, propdata); + } else { + g_warning("Unable to allocate memory to get properties for menuitem. This menuitem will never be realized."); + } + + return item; +} + +/* Refresh the properties on this item */ +static void +parse_layout_update (DbusmenuMenuitem * item, DbusmenuClient * client) +{ + g_object_ref(item); + get_properties_globber(client, dbusmenu_menuitem_get_id(item), NULL, menuitem_get_properties_replace_cb, item); + return; +} + /* Parse recursively through the XML and make it into objects as need be */ static DbusmenuMenuitem * parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * parent, DBusGProxy * proxy) { + /* First verify and figure out what we've got */ gint id = parse_node_get_id(node); if (id < 0) { return NULL; @@ -796,56 +1211,31 @@ #ifdef MASSIVEDEBUGGING g_debug("Client looking at node with id: %d", id); #endif - /* If we don't have any item, or the IDs don't match */ - if (item == NULL || dbusmenu_menuitem_get_id(item) != id) { - if (item != NULL) { - if (parent != NULL) { - dbusmenu_menuitem_child_delete(parent, item); - } - item = NULL; - } - /* Build a new item */ - item = DBUSMENU_MENUITEM(dbusmenu_client_menuitem_new(id, client)); - if (parent == NULL) { - dbusmenu_menuitem_set_root(item, TRUE); - } - - /* Get the properties queued up for this item */ - /* Not happy about this, but I need these :( */ - newItemPropData * propdata = g_new0(newItemPropData, 1); - if (propdata != NULL) { - propdata->client = client; - propdata->item = item; - propdata->parent = parent; - - gchar * properties[1] = {NULL}; /* This gets them all */ - g_object_ref(item); - org_ayatana_dbusmenu_get_properties_async(proxy, id, (const gchar **)properties, menuitem_get_properties_new_cb, propdata); - } else { - g_warning("Unable to allocate memory to get properties for menuitem. This menuitem will never be realized."); - } - } else { - /* Refresh the properties */ - /* XXX: We shouldn't need to get the properties everytime we reuse an entry */ - gchar * properties[1] = {NULL}; /* This gets them all */ - g_object_ref(item); - org_ayatana_dbusmenu_get_properties_async(proxy, id, (const gchar **)properties, menuitem_get_properties_replace_cb, item); - } + g_return_val_if_fail(item != NULL, NULL); + g_return_val_if_fail(id == dbusmenu_menuitem_get_id(item), NULL); + /* Some variables */ xmlNodePtr children; guint position; GList * oldchildren = g_list_copy(dbusmenu_menuitem_get_children(item)); /* g_debug("Starting old children: %d", g_list_length(oldchildren)); */ + /* Go through all the XML Nodes and make sure that we have menuitems + to cover those XML nodes. */ for (children = node->children, position = 0; children != NULL; children = children->next, position++) { /* g_debug("Looking at child: %d", position); */ gint childid = parse_node_get_id(children); if (childid < 0) { + /* Don't increment the position when there isn't a valid + node in the XML tree. It's probably a comment. */ + position--; continue; } DbusmenuMenuitem * childmi = NULL; + /* First see if we can recycle a node that we've already built + on this menu item */ GList * childsearch = NULL; for (childsearch = oldchildren; childsearch != NULL; childsearch = g_list_next(childsearch)) { DbusmenuMenuitem * cs_mi = DBUSMENU_MENUITEM(childsearch->data); @@ -856,20 +1246,26 @@ } } - DbusmenuMenuitem * newchildmi = parse_layout_xml(client, children, childmi, item, proxy); - - if (newchildmi != childmi) { - if (childmi != NULL) { - dbusmenu_menuitem_child_delete(item, childmi); - } - dbusmenu_menuitem_child_add_position(item, newchildmi, position); - g_object_unref(newchildmi); + if (childmi == NULL) { + #ifdef MASSIVEDEBUGGING + g_debug("Building new menu item %d at position %d", childid, position); + #endif + /* If we can't recycle, then we build a new one */ + childmi = parse_layout_new_child(childid, client, item); + dbusmenu_menuitem_child_add_position(item, childmi, position); + g_object_unref(childmi); } else { + #ifdef MASSIVEDEBUGGING + g_debug("Recycling menu item %d at position %d", childid, position); + #endif + /* If we can recycle, make sure it's in the right place */ dbusmenu_menuitem_child_reorder(item, childmi, position); + parse_layout_update(childmi, client); } } - /* g_debug("Stopping old children: %d", g_list_length(oldchildren)); */ + /* Remove any children that are no longer used by this version of + the layout. */ GList * oldchildleft = NULL; for (oldchildleft = oldchildren; oldchildleft != NULL; oldchildleft = g_list_next(oldchildleft)) { DbusmenuMenuitem * oldmi = DBUSMENU_MENUITEM(oldchildleft->data); @@ -880,6 +1276,40 @@ } g_list_free(oldchildren); + /* We've got everything built up at this node and reconcilled */ + + /* Flush the properties requests */ + get_properties_flush(client); + + /* now it's time to recurse down the tree. */ + children = node->children; + GList * childmis = dbusmenu_menuitem_get_children(item); + while (children != NULL && childmis != NULL) { + gint xmlid = parse_node_get_id(children); + /* If this isn't a valid menu item we need to move on + until we have one. This avoids things like comments. */ + if (xmlid < 0) { + children = children->next; + continue; + } + + #ifdef MASSIVEDEBUGGING + gint miid = dbusmenu_menuitem_get_id(DBUSMENU_MENUITEM(childmis->data)); + g_debug("Recursing parse_layout_xml. XML ID: %d MI ID: %d", xmlid, miid); + #endif + + parse_layout_xml(client, children, DBUSMENU_MENUITEM(childmis->data), item, proxy); + + children = children->next; + childmis = g_list_next(childmis); + } + if (children != NULL) { + g_warning("Sync failed, now we've got extra XML nodes."); + } + if (childmis != NULL) { + g_warning("Sync failed, now we've got extra menu items."); + } + return item; } @@ -896,7 +1326,8 @@ xmlDocPtr xmldoc; - xmldoc = xmlReadMemory(layout, g_utf8_strlen(layout, 16*1024), "dbusmenu.xml", NULL, 0); + /* No one should need more characters than this! */ + xmldoc = xmlReadMemory(layout, g_utf8_strlen(layout, 1024*1024), "dbusmenu.xml", NULL, 0); xmlNodePtr root = xmlDocGetRootElement(xmldoc); @@ -906,6 +1337,12 @@ DbusmenuMenuitem * oldroot = priv->root; + if (priv->root == NULL) { + priv->root = parse_layout_new_child(0, client, NULL); + } else { + parse_layout_update(priv->root, client); + } + priv->root = parse_layout_xml(client, root, priv->root, NULL, priv->menuproxy); xmlFreeDoc(xmldoc); diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/client.h libdbusmenu-0.3.12/libdbusmenu-glib/client.h --- libdbusmenu-0.3.6/libdbusmenu-glib/client.h 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/client.h 2010-08-26 21:11:31.000000000 +0100 @@ -46,6 +46,8 @@ #define DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED "layout-updated" #define DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED "root-changed" #define DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM "new-menuitem" +#define DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE "item-activate" +#define DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT "event-result" #define DBUSMENU_CLIENT_PROP_DBUS_NAME "dbus-name" #define DBUSMENU_CLIENT_PROP_DBUS_OBJECT "dbus-object" @@ -59,10 +61,10 @@ @parent_class: #GObjectClass @layout_updated: Slot for #DbusmenuClient::layout-updated. @new_menuitem: Slot for #DbusmenuClient::new-menuitem. + @item_activate: Slot for #DbusmenuClient::item-activate. + @event_result: Slot for #DbusmenuClient::event-error. @reserved1: Reserved for future use. @reserved2: Reserved for future use. - @reserved3: Reserved for future use. - @reserved4: Reserved for future use. A simple class that takes all of the information from a #DbusmenuServer over DBus and makes the same set of @@ -75,12 +77,14 @@ void (*layout_updated)(void); void (*root_changed) (DbusmenuMenuitem * newroot); void (*new_menuitem) (DbusmenuMenuitem * newitem); + void (*item_activate) (DbusmenuMenuitem * item, guint timestamp); + void (*event_result) (DbusmenuMenuitem * item, gchar * event, GValue * data, guint timestamp, GError * error); /* Reserved for future use */ void (*reserved1) (void); void (*reserved2) (void); - void (*reserved3) (void); - void (*reserved4) (void); + /* void (*reserved3) (void); */ + /* void (*reserved4) (void); */ }; /** diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/client-marshal.c libdbusmenu-0.3.12/libdbusmenu-glib/client-marshal.c --- libdbusmenu-0.3.6/libdbusmenu-glib/client-marshal.c 1970-01-01 01:00:00.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/client-marshal.c 2010-08-26 21:12:30.000000000 +0100 @@ -0,0 +1,131 @@ + +#include + + +#ifdef G_ENABLE_DEBUG +#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) +#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) +#define g_marshal_value_peek_int(v) g_value_get_int (v) +#define g_marshal_value_peek_uint(v) g_value_get_uint (v) +#define g_marshal_value_peek_long(v) g_value_get_long (v) +#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) +#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) +#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) +#define g_marshal_value_peek_enum(v) g_value_get_enum (v) +#define g_marshal_value_peek_flags(v) g_value_get_flags (v) +#define g_marshal_value_peek_float(v) g_value_get_float (v) +#define g_marshal_value_peek_double(v) g_value_get_double (v) +#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) +#define g_marshal_value_peek_param(v) g_value_get_param (v) +#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) +#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) +#define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) +#else /* !G_ENABLE_DEBUG */ +/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. + * Do not access GValues directly in your code. Instead, use the + * g_value_get_*() functions + */ +#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int +#define g_marshal_value_peek_char(v) (v)->data[0].v_int +#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint +#define g_marshal_value_peek_int(v) (v)->data[0].v_int +#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint +#define g_marshal_value_peek_long(v) (v)->data[0].v_long +#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 +#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 +#define g_marshal_value_peek_enum(v) (v)->data[0].v_long +#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_float(v) (v)->data[0].v_float +#define g_marshal_value_peek_double(v) (v)->data[0].v_double +#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer +#endif /* !G_ENABLE_DEBUG */ + + +/* VOID:OBJECT,UINT (./client-marshal.list:1) */ +void +_dbusmenu_client_marshal_VOID__OBJECT_UINT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_UINT) (gpointer data1, + gpointer arg_1, + guint arg_2, + gpointer data2); + register GMarshalFunc_VOID__OBJECT_UINT callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_UINT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_uint (param_values + 2), + data2); +} + +/* VOID:OBJECT,STRING,POINTER,UINT,POINTER (./client-marshal.list:2) */ +void +_dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT_POINTER (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_STRING_POINTER_UINT_POINTER) (gpointer data1, + gpointer arg_1, + gpointer arg_2, + gpointer arg_3, + guint arg_4, + gpointer arg_5, + gpointer data2); + register GMarshalFunc_VOID__OBJECT_STRING_POINTER_UINT_POINTER callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 6); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_STRING_POINTER_UINT_POINTER) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_string (param_values + 2), + g_marshal_value_peek_pointer (param_values + 3), + g_marshal_value_peek_uint (param_values + 4), + g_marshal_value_peek_pointer (param_values + 5), + data2); +} + diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/client-marshal.h libdbusmenu-0.3.12/libdbusmenu-glib/client-marshal.h --- libdbusmenu-0.3.6/libdbusmenu-glib/client-marshal.h 1970-01-01 01:00:00.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/client-marshal.h 2010-08-26 21:12:30.000000000 +0100 @@ -0,0 +1,28 @@ + +#ifndef ___dbusmenu_client_marshal_MARSHAL_H__ +#define ___dbusmenu_client_marshal_MARSHAL_H__ + +#include + +G_BEGIN_DECLS + +/* VOID:OBJECT,UINT (./client-marshal.list:1) */ +extern void _dbusmenu_client_marshal_VOID__OBJECT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +/* VOID:OBJECT,STRING,POINTER,UINT,POINTER (./client-marshal.list:2) */ +extern void _dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + +G_END_DECLS + +#endif /* ___dbusmenu_client_marshal_MARSHAL_H__ */ + diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/client-marshal.list libdbusmenu-0.3.12/libdbusmenu-glib/client-marshal.list --- libdbusmenu-0.3.6/libdbusmenu-glib/client-marshal.list 1970-01-01 01:00:00.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/client-marshal.list 2010-08-26 21:11:31.000000000 +0100 @@ -0,0 +1,2 @@ +VOID: OBJECT, UINT +VOID: OBJECT, STRING, POINTER, UINT, POINTER diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/dbusmenu-server.h libdbusmenu-0.3.12/libdbusmenu-glib/dbusmenu-server.h --- libdbusmenu-0.3.6/libdbusmenu-glib/dbusmenu-server.h 2010-06-10 18:05:13.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/dbusmenu-server.h 2010-08-26 17:15:40.000000000 +0100 @@ -27,6 +27,7 @@ #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the @@ -50,6 +51,7 @@ #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ @@ -374,12 +376,11 @@ { (GCallback) _dbusmenu_server_about_to_show, dbus_glib_marshal__dbusmenu_server_BOOLEAN__INT_POINTER_POINTER, 491 }, }; -const DBusGObjectInfo dbus_glib__dbusmenu_server_object_info = { - 0, +const DBusGObjectInfo dbus_glib__dbusmenu_server_object_info = { 1, dbus_glib__dbusmenu_server_methods, 7, "org.ayatana.dbusmenu\0GetLayout\0S\0parentId\0I\0i\0revision\0O\0F\0N\0u\0layout\0O\0F\0N\0s\0\0org.ayatana.dbusmenu\0GetGroupProperties\0S\0ids\0I\0ai\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetChildren\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetProperty\0S\0id\0I\0i\0name\0I\0s\0value\0O\0F\0N\0v\0\0org.ayatana.dbusmenu\0GetProperties\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a{sv}\0\0org.ayatana.dbusmenu\0Event\0S\0id\0I\0i\0eventId\0I\0s\0data\0I\0v\0timestamp\0I\0u\0\0org.ayatana.dbusmenu\0AboutToShow\0S\0id\0I\0i\0needUpdate\0O\0F\0N\0b\0\0\0", -"org.ayatana.dbusmenu\0ItemPropertyUpdated\0org.ayatana.dbusmenu\0ItemUpdated\0org.ayatana.dbusmenu\0LayoutUpdated\0\0", -"org.ayatana.dbusmenu\0version\0\0" +"org.ayatana.dbusmenu\0ItemPropertyUpdated\0org.ayatana.dbusmenu\0ItemUpdated\0org.ayatana.dbusmenu\0LayoutUpdated\0org.ayatana.dbusmenu\0ItemActivationRequested\0\0", +"org.ayatana.dbusmenu\0version\0version\0read\0\0" }; diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/dbus-menu.xml libdbusmenu-0.3.12/libdbusmenu-glib/dbus-menu.xml --- libdbusmenu-0.3.6/libdbusmenu-glib/dbus-menu.xml 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/dbus-menu.xml 2010-08-02 17:04:08.000000000 +0100 @@ -344,6 +344,20 @@ + + + The server is requesting that all clients displaying this + menu open it to the user. This would be for things like + hotkeys that when the user presses them the menu should + open and display itself to the user. + + + ID of the menu that should be activated + + + The time that the event occured + + diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/Makefile.am libdbusmenu-0.3.12/libdbusmenu-glib/Makefile.am --- libdbusmenu-0.3.6/libdbusmenu-glib/Makefile.am 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/Makefile.am 2010-08-25 19:18:20.000000000 +0100 @@ -4,6 +4,7 @@ EXTRA_DIST = \ dbusmenu-glib.pc.in \ dbus-menu.xml \ + client-marshal.list \ menuitem-marshal.list \ server-marshal.list @@ -32,6 +33,8 @@ server.c \ server-marshal.h \ server-marshal.c \ + client-marshal.h \ + client-marshal.c \ client-menuitem.h \ client-menuitem.c \ client.h \ @@ -54,6 +57,8 @@ BUILT_SOURCES = \ dbusmenu-client.h \ dbusmenu-server.h \ + client-marshal.h \ + client-marshal.c \ menuitem-marshal.h \ menuitem-marshal.c \ server-marshal.h \ @@ -73,6 +78,16 @@ --output=dbusmenu-client.h \ $(srcdir)/dbus-menu.xml +client-marshal.h: $(srcdir)/client-marshal.list + glib-genmarshal --header \ + --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \ + > client-marshal.h + +client-marshal.c: $(srcdir)/client-marshal.list + glib-genmarshal --body \ + --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \ + > client-marshal.c + server-marshal.h: $(srcdir)/server-marshal.list glib-genmarshal --header \ --prefix=_dbusmenu_server_marshal $(srcdir)/server-marshal.list \ diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/Makefile.in libdbusmenu-0.3.12/libdbusmenu-glib/Makefile.in --- libdbusmenu-0.3.6/libdbusmenu-glib/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -83,6 +83,7 @@ libdbusmenu_glib_la-menuitem-proxy.lo \ libdbusmenu_glib_la-server.lo \ libdbusmenu_glib_la-server-marshal.lo \ + libdbusmenu_glib_la-client-marshal.lo \ libdbusmenu_glib_la-client-menuitem.lo \ libdbusmenu_glib_la-client.lo libdbusmenu_glib_la_OBJECTS = $(am_libdbusmenu_glib_la_OBJECTS) @@ -144,6 +145,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -224,6 +227,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ @@ -293,6 +298,7 @@ EXTRA_DIST = \ dbusmenu-glib.pc.in \ dbus-menu.xml \ + client-marshal.list \ menuitem-marshal.list \ server-marshal.list @@ -320,6 +326,8 @@ server.c \ server-marshal.h \ server-marshal.c \ + client-marshal.h \ + client-marshal.c \ client-menuitem.h \ client-menuitem.c \ client.h \ @@ -341,6 +349,8 @@ BUILT_SOURCES = \ dbusmenu-client.h \ dbusmenu-server.h \ + client-marshal.h \ + client-marshal.c \ menuitem-marshal.h \ menuitem-marshal.c \ server-marshal.h \ @@ -448,6 +458,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client-marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_glib_la-menuitem-marshal.Plo@am__quote@ @@ -520,6 +531,14 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_glib_la-server-marshal.lo `test -f 'server-marshal.c' || echo '$(srcdir)/'`server-marshal.c +libdbusmenu_glib_la-client-marshal.lo: client-marshal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_glib_la-client-marshal.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_glib_la-client-marshal.Tpo -c -o libdbusmenu_glib_la-client-marshal.lo `test -f 'client-marshal.c' || echo '$(srcdir)/'`client-marshal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_glib_la-client-marshal.Tpo $(DEPDIR)/libdbusmenu_glib_la-client-marshal.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='client-marshal.c' object='libdbusmenu_glib_la-client-marshal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_glib_la-client-marshal.lo `test -f 'client-marshal.c' || echo '$(srcdir)/'`client-marshal.c + libdbusmenu_glib_la-client-menuitem.lo: client-menuitem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdbusmenu_glib_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_glib_la-client-menuitem.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Tpo -c -o libdbusmenu_glib_la-client-menuitem.lo `test -f 'client-menuitem.c' || echo '$(srcdir)/'`client-menuitem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Tpo $(DEPDIR)/libdbusmenu_glib_la-client-menuitem.Plo @@ -872,6 +891,16 @@ --output=dbusmenu-client.h \ $(srcdir)/dbus-menu.xml +client-marshal.h: $(srcdir)/client-marshal.list + glib-genmarshal --header \ + --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \ + > client-marshal.h + +client-marshal.c: $(srcdir)/client-marshal.list + glib-genmarshal --body \ + --prefix=_dbusmenu_client_marshal $(srcdir)/client-marshal.list \ + > client-marshal.c + server-marshal.h: $(srcdir)/server-marshal.list glib-genmarshal --header \ --prefix=_dbusmenu_server_marshal $(srcdir)/server-marshal.list \ diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/menuitem.c libdbusmenu-0.3.12/libdbusmenu-glib/menuitem.c --- libdbusmenu-0.3.6/libdbusmenu-glib/menuitem.c 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/menuitem.c 2010-08-25 19:18:20.000000000 +0100 @@ -70,6 +70,7 @@ CHILD_REMOVED, CHILD_MOVED, REALIZED, + SHOW_TO_USER, LAST_SIGNAL }; @@ -211,6 +212,22 @@ NULL, NULL, _dbusmenu_menuitem_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE); + /** + DbusmenuMenuitem::show-to-user: + @arg0: The #DbusmenuMenuitem which should be shown. + @arg1: Timestamp the event happened at + + Signaled when the application would like the visualization + of this menu item shown to the user. This usually requires + going over the bus to get it done. + */ + signals[SHOW_TO_USER] = g_signal_new(DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(DbusmenuMenuitemClass, show_to_user), + NULL, NULL, + g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, G_TYPE_UINT, G_TYPE_NONE); g_object_class_install_property (object_class, PROP_ID, g_param_spec_int(PROP_ID_S, "ID for the menu item", @@ -1349,3 +1366,22 @@ return; } + +/** + dbusmenu_menuitem_show_to_user: + @mi: #DbusmenuMenuitem to show + @timestamp: The time that the user requested it to be shown + + Signals that this menu item should be shown to the user. If this is + server side the server will then take it and send it over the + bus. +*/ +void +dbusmenu_menuitem_show_to_user (DbusmenuMenuitem * mi, guint timestamp) +{ + g_return_if_fail(DBUSMENU_IS_MENUITEM(mi)); + + g_signal_emit(G_OBJECT(mi), signals[SHOW_TO_USER], 0, timestamp, TRUE); + + return; +} diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/menuitem.h libdbusmenu-0.3.12/libdbusmenu-glib/menuitem.h --- libdbusmenu-0.3.6/libdbusmenu-glib/menuitem.h 2010-06-21 20:57:50.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/menuitem.h 2010-08-25 19:18:20.000000000 +0100 @@ -49,6 +49,7 @@ #define DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED "child-moved" #define DBUSMENU_MENUITEM_SIGNAL_REALIZED "realized" #define DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID (g_signal_lookup(DBUSMENU_MENUITEM_SIGNAL_REALIZED, DBUSMENU_TYPE_MENUITEM)) +#define DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER "show-to-user" #define DBUSMENU_MENUITEM_PROP_TYPE "type" #define DBUSMENU_MENUITEM_PROP_VISIBLE "visible" @@ -124,10 +125,7 @@ * @buildxml: Virtual function that appends the strings required to represent this menu item in the menu XML file. * @handle_event: This function is to override how events are handled by subclasses. Look at #dbusmenu_menuitem_handle_event for lots of good information. * @send_about_to_show: Virtual function that notifies server that the client is about to show a menu. - * @reserved1: Reserved for future use. - * @reserved2: Reserved for future use. - * @reserved3: Reserved for future use. - * @reserved4: Reserved for future use. + * @show_to_user: Slot for #DbusmenuMenuitem::show-to-user. */ typedef struct _DbusmenuMenuitemClass DbusmenuMenuitemClass; struct _DbusmenuMenuitemClass @@ -147,7 +145,8 @@ void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); void (*send_about_to_show) (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); - void (*reserved1) (void); + void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data); + /* void (*reserved1) (void); */ /* void (*reserved2) (void); */ /* void (*reserved3) (void); */ /* void (*reserved4) (void); -- realized, realloc when bumping lib version */ @@ -192,6 +191,8 @@ void dbusmenu_menuitem_handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); void dbusmenu_menuitem_send_about_to_show (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); +void dbusmenu_menuitem_show_to_user (DbusmenuMenuitem * mi, guint timestamp); + /** * SECTION:menuitem * @short_description: A lowlevel represenation of a menuitem diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/menuitem-marshal.c libdbusmenu-0.3.12/libdbusmenu-glib/menuitem-marshal.c --- libdbusmenu-0.3.6/libdbusmenu-glib/menuitem-marshal.c 2010-06-10 18:05:13.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/menuitem-marshal.c 2010-08-26 17:15:40.000000000 +0100 @@ -21,6 +21,7 @@ #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the @@ -44,6 +45,7 @@ #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/server.c libdbusmenu-0.3.12/libdbusmenu-glib/server.c --- libdbusmenu-0.3.6/libdbusmenu-glib/server.c 2010-07-02 15:49:06.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/server.c 2010-08-25 19:18:20.000000000 +0100 @@ -37,14 +37,19 @@ /* DBus Prototypes */ static gboolean _dbusmenu_server_get_layout (DbusmenuServer * server, gint parent, guint * revision, gchar ** layout, GError ** error); static gboolean _dbusmenu_server_get_property (DbusmenuServer * server, gint id, gchar * property, gchar ** value, GError ** error); -static gboolean _dbusmenu_server_get_properties (DbusmenuServer * server, gint id, GPtrArray * properties, GHashTable ** dict, GError ** error); -static gboolean _dbusmenu_server_get_group_properties (DbusmenuServer * server, GArray * ids, GArray * properties, GHashTable ** values, GError ** error); +static gboolean _dbusmenu_server_get_properties (DbusmenuServer * server, gint id, gchar ** properties, GHashTable ** dict, GError ** error); +static gboolean _dbusmenu_server_get_group_properties (DbusmenuServer * server, GArray * ids, gchar ** properties, GPtrArray ** values, GError ** error); static gboolean _dbusmenu_server_event (DbusmenuServer * server, gint id, gchar * eventid, GValue * data, guint timestamp, GError ** error); static gboolean _dbusmenu_server_get_children (DbusmenuServer * server, gint id, GPtrArray * properties, GPtrArray ** output, GError ** error); static gboolean _dbusmenu_server_about_to_show (DbusmenuServer * server, gint id, gboolean * need_update, GError ** error); +/* DBus Helpers */ +static void _gvalue_array_append_int(GValueArray *array, gint i); +static void _gvalue_array_append_hashtable(GValueArray *array, GHashTable * dict); #include "dbusmenu-server.h" +static void layout_update_signal (DbusmenuServer * server); + #define DBUSMENU_VERSION_NUMBER 2 /* Privates, I'll show you mine... */ @@ -55,6 +60,7 @@ DbusmenuMenuitem * root; gchar * dbusobject; gint layout_revision; + guint layout_idle; }; #define DBUSMENU_SERVER_GET_PRIVATE(o) \ @@ -65,6 +71,7 @@ ID_PROP_UPDATE, ID_UPDATE, LAYOUT_UPDATED, + ITEM_ACTIVATION, LAST_SIGNAL }; @@ -165,6 +172,22 @@ NULL, NULL, _dbusmenu_server_marshal_VOID__UINT_INT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_INT); + /** + DbusmenuServer::item-activation-requested: + @arg0: The #DbusmenuServer emitting the signal. + @arg1: The ID of the parent for this update. + @arg2: The timestamp of when the event happened + + This is signaled when a menuitem under this server + sends it's activate signal. + */ + signals[ITEM_ACTIVATION] = g_signal_new(DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION, + G_TYPE_FROM_CLASS(class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(DbusmenuServerClass, item_activation), + NULL, NULL, + _dbusmenu_server_marshal_VOID__INT_UINT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); g_object_class_install_property (object_class, PROP_DBUS_OBJECT, @@ -196,6 +219,7 @@ priv->root = NULL; priv->dbusobject = NULL; priv->layout_revision = 1; + priv->layout_idle = 0; return; } @@ -205,6 +229,10 @@ { DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(object); + if (priv->layout_idle != 0) { + g_source_remove(priv->layout_idle); + } + if (priv->root != NULL) { dbusmenu_menuitem_foreach(priv->root, menuitem_signals_remove, object); g_object_unref(priv->root); @@ -257,8 +285,7 @@ } else { g_debug("Setting root node to NULL"); } - priv->layout_revision++; - g_signal_emit(obj, signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE); + layout_update_signal(DBUSMENU_SERVER(obj)); break; default: g_return_if_reached(); @@ -302,6 +329,35 @@ return; } +/* Handle actually signalling in the idle loop. This way we collect all + the updates. */ +static gboolean +layout_update_idle (gpointer user_data) +{ + DbusmenuServer * server = DBUSMENU_SERVER(user_data); + DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server); + + g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE); + + priv->layout_idle = 0; + + return FALSE; +} + +/* Signals that the layout has been updated */ +static void +layout_update_signal (DbusmenuServer * server) +{ + DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server); + priv->layout_revision++; + + if (priv->layout_idle == 0) { + priv->layout_idle = g_idle_add(layout_update_idle, server); + } + + return; +} + static void menuitem_property_changed (DbusmenuMenuitem * mi, gchar * property, GValue * value, DbusmenuServer * server) { @@ -332,10 +388,7 @@ menuitem_signals_create(child, server); g_list_foreach(dbusmenu_menuitem_get_children(child), added_check_children, server); - /* TODO: We probably need to group the layout update signals to make the number more reasonble. */ - DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server); - priv->layout_revision++; - g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE); + layout_update_signal(server); return; } @@ -343,19 +396,23 @@ menuitem_child_removed (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, DbusmenuServer * server) { menuitem_signals_remove(child, server); - /* TODO: We probably need to group the layout update signals to make the number more reasonble. */ - DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server); - priv->layout_revision++; - g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE); + layout_update_signal(server); return; } static void menuitem_child_moved (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint newpos, guint oldpos, DbusmenuServer * server) { - DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server); - priv->layout_revision++; - g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATED], 0, priv->layout_revision, 0, TRUE); + layout_update_signal(server); + return; +} + +/* Called when a menu item emits its activated signal so it + gets passed across the bus. */ +static void +menuitem_shown (DbusmenuMenuitem * mi, guint timestamp, DbusmenuServer * server) +{ + g_signal_emit(G_OBJECT(server), signals[ITEM_ACTIVATION], 0, dbusmenu_menuitem_get_id(mi), timestamp, TRUE); return; } @@ -368,6 +425,7 @@ g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(menuitem_child_removed), data); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(menuitem_child_moved), data); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menuitem_property_changed), data); + g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER, G_CALLBACK(menuitem_shown), data); return; } @@ -480,7 +538,7 @@ } static gboolean -_dbusmenu_server_get_properties (DbusmenuServer * server, gint id, GPtrArray * properties, GHashTable ** dict, GError ** error) +_dbusmenu_server_get_properties (DbusmenuServer * server, gint id, gchar ** properties, GHashTable ** dict, GError ** error) { DbusmenuServerPrivate * priv = DBUSMENU_SERVER_GET_PRIVATE(server); DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id); @@ -501,18 +559,42 @@ return TRUE; } +/* Handles getting a bunch of properties from a variety of menu items + to make one mega dbus message */ static gboolean -_dbusmenu_server_get_group_properties (DbusmenuServer * server, GArray * ids, GArray * properties, GHashTable ** values, GError ** error) +_dbusmenu_server_get_group_properties (DbusmenuServer * server, GArray * ids, gchar ** properties, GPtrArray ** values, GError ** error) { - if (error != NULL) { - g_set_error(error, - error_quark(), - NOT_IMPLEMENTED, - "The GetGroupProperties function is not implemented, sorry."); + /* Build an initial pointer array */ + *values = g_ptr_array_new(); + + /* Go through each ID to get that ID's properties */ + int idcnt; + for (idcnt = 0; idcnt < ids->len; idcnt++) { + GHashTable * idprops = NULL; + GError * error = NULL; + gint id = g_array_index(ids, int, idcnt); + + /* Get the properties for this ID the old fashioned way. */ + if (!_dbusmenu_server_get_properties(server, id, properties, &idprops, &error)) { + g_warning("Error getting the properties from ID %d: %s", id, error->message); + g_error_free(error); + error = NULL; + continue; + } + + GValueArray * valarray = g_value_array_new(2); + + _gvalue_array_append_int(valarray, id); + _gvalue_array_append_hashtable(valarray, idprops); + + g_ptr_array_add(*values, valarray); } - return FALSE; + + return TRUE; } +/* Allocate a value on the stack for the int and append + it to the array. */ static void _gvalue_array_append_int(GValueArray *array, gint i) { @@ -524,6 +606,8 @@ g_value_unset(&value); } +/* Allocate a value on the stack for the hashtable and append + it to the array. */ static void _gvalue_array_append_hashtable(GValueArray *array, GHashTable * dict) { @@ -544,7 +628,7 @@ gint id = dbusmenu_menuitem_get_id(mi); GHashTable * dict = dbusmenu_menuitem_properties_copy(mi); - GValueArray * item = g_value_array_new(1); + GValueArray * item = g_value_array_new(2); _gvalue_array_append_int(item, id); _gvalue_array_append_hashtable(item, dict); diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/server.h libdbusmenu-0.3.12/libdbusmenu-glib/server.h --- libdbusmenu-0.3.6/libdbusmenu-glib/server.h 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/server.h 2010-08-02 17:04:08.000000000 +0100 @@ -46,6 +46,7 @@ #define DBUSMENU_SERVER_SIGNAL_ID_PROP_UPDATE "item-property-updated" #define DBUSMENU_SERVER_SIGNAL_ID_UPDATE "item-updated" #define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED "layout-updated" +#define DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION "item-activation-requested" #define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATE DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED #define DBUSMENU_SERVER_PROP_DBUS_OBJECT "dbus-object" @@ -58,10 +59,10 @@ @id_prop_update: Slot for #DbusmenuServer::id-prop-update. @id_update: Slot for #DbusmenuServer::id-update. @layout_updated: Slot for #DbusmenuServer::layout-update. + @item_activation_requested: Slot for #DbusmenuServer::item-activation-requested. @dbusmenu_server_reserved1: Reserved for future use. @dbusmenu_server_reserved2: Reserved for future use. @dbusmenu_server_reserved3: Reserved for future use. - @dbusmenu_server_reserved4: Reserved for future use. The class implementing the virtual functions for #DbusmenuServer. */ @@ -73,12 +74,12 @@ void (*id_prop_update)(gint id, gchar * property, gchar * value); void (*id_update)(gint id); void (*layout_updated)(gint revision); + void (*item_activation)(gint id, guint timestamp); /* Reserved */ void (*dbusmenu_server_reserved1)(void); void (*dbusmenu_server_reserved2)(void); void (*dbusmenu_server_reserved3)(void); - void (*dbusmenu_server_reserved4)(void); }; /** diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/server-marshal.c libdbusmenu-0.3.12/libdbusmenu-glib/server-marshal.c --- libdbusmenu-0.3.6/libdbusmenu-glib/server-marshal.c 2010-06-10 18:05:13.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/server-marshal.c 2010-08-26 17:15:40.000000000 +0100 @@ -21,6 +21,7 @@ #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the @@ -44,6 +45,7 @@ #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ @@ -123,3 +125,40 @@ data2); } +/* VOID:INT,UINT (./server-marshal.list:3) */ +void +_dbusmenu_server_marshal_VOID__INT_UINT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__INT_UINT) (gpointer data1, + gint arg_1, + guint arg_2, + gpointer data2); + register GMarshalFunc_VOID__INT_UINT callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__INT_UINT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_int (param_values + 1), + g_marshal_value_peek_uint (param_values + 2), + data2); +} + diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/server-marshal.h libdbusmenu-0.3.12/libdbusmenu-glib/server-marshal.h --- libdbusmenu-0.3.6/libdbusmenu-glib/server-marshal.h 2010-06-10 18:05:13.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/server-marshal.h 2010-08-03 02:20:10.000000000 +0100 @@ -22,6 +22,14 @@ gpointer invocation_hint, gpointer marshal_data); +/* VOID:INT,UINT (./server-marshal.list:3) */ +extern void _dbusmenu_server_marshal_VOID__INT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + G_END_DECLS #endif /* ___dbusmenu_server_marshal_MARSHAL_H__ */ diff -Nru libdbusmenu-0.3.6/libdbusmenu-glib/server-marshal.list libdbusmenu-0.3.12/libdbusmenu-glib/server-marshal.list --- libdbusmenu-0.3.6/libdbusmenu-glib/server-marshal.list 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-glib/server-marshal.list 2010-08-02 17:04:08.000000000 +0100 @@ -1,2 +1,3 @@ VOID: INT, STRING, POINTER VOID: UINT, INT +VOID: INT, UINT diff -Nru libdbusmenu-0.3.6/libdbusmenu-gtk/client.c libdbusmenu-0.3.12/libdbusmenu-gtk/client.c --- libdbusmenu-0.3.6/libdbusmenu-gtk/client.c 2010-07-02 20:06:15.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-gtk/client.c 2010-08-25 19:18:20.000000000 +0100 @@ -54,6 +54,7 @@ static void new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, DbusmenuGtkClient * gtkclient); static void delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient); static void move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient); +static void item_activate (DbusmenuClient * client, DbusmenuMenuitem * mi, guint timestamp, gpointer userdata); static gboolean new_item_normal (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client); static gboolean new_item_seperator (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client); @@ -91,7 +92,9 @@ dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(self), DBUSMENU_CLIENT_TYPES_DEFAULT, new_item_normal); dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(self), DBUSMENU_CLIENT_TYPES_SEPARATOR, new_item_seperator); + /* TODO: I think these can be handled in the class... */ g_signal_connect(G_OBJECT(self), DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM, G_CALLBACK(new_menuitem), NULL); + g_signal_connect(G_OBJECT(self), DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE, G_CALLBACK(item_activate), NULL); return; } @@ -431,6 +434,50 @@ return; } +/* Goes through the tree of items and ensure's that all the items + above us are also displayed. */ +static void +activate_helper (GtkMenuShell * shell) +{ + if (shell == NULL) { + return; + } + + if (GTK_IS_MENU(shell)) { + GtkWidget * attach = gtk_menu_get_attach_widget(GTK_MENU(shell)); + + if (attach != NULL) { + GtkWidget * parent = gtk_widget_get_parent(GTK_WIDGET(attach)); + + if (parent != NULL) { + if (GTK_IS_MENU(parent)) { + activate_helper(GTK_MENU_SHELL(parent)); + } + gtk_menu_shell_select_item(GTK_MENU_SHELL(parent), attach); + } + } + } + + return; +} + +/* Signaled when we should show a menuitem at request of the application + that it is in. */ +static void +item_activate (DbusmenuClient * client, DbusmenuMenuitem * mi, guint timestamp, gpointer userdata) +{ + gpointer pmenu = g_object_get_data(G_OBJECT(mi), data_menu); + if (pmenu == NULL) { + g_warning("Activated menu item doesn't have a menu? ID: %d", dbusmenu_menuitem_get_id(mi)); + return; + } + + activate_helper(GTK_MENU_SHELL(pmenu)); + gtk_menu_shell_select_first(GTK_MENU_SHELL(pmenu), FALSE); + + return; +} + #ifdef MASSIVEDEBUGGING static void destroy_gmi (GtkMenuItem * gmi, DbusmenuMenuitem * mi) @@ -491,7 +538,7 @@ /* Oh, we're a child, let's deal with that */ if (parent != NULL) { - new_child(parent, item, dbusmenu_menuitem_get_position_realized(item, parent), DBUSMENU_GTKCLIENT(client)); + new_child(parent, item, dbusmenu_menuitem_get_position(item, parent), DBUSMENU_GTKCLIENT(client)); } return; @@ -519,7 +566,7 @@ } GtkMenuItem * childmi = dbusmenu_gtkclient_menuitem_get(gtkclient, child); - gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), dbusmenu_menuitem_get_position_realized(child, mi)); + gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(childmi), position); gtk_widget_show(GTK_WIDGET(menu)); return; diff -Nru libdbusmenu-0.3.6/libdbusmenu-gtk/Makefile.in libdbusmenu-0.3.12/libdbusmenu-gtk/Makefile.in --- libdbusmenu-0.3.6/libdbusmenu-gtk/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/libdbusmenu-gtk/Makefile.in 2010-08-26 21:12:23.000000000 +0100 @@ -141,6 +141,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -221,6 +223,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/Makefile.in libdbusmenu-0.3.12/Makefile.in --- libdbusmenu-0.3.6/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/Makefile.in 2010-08-26 21:12:24.000000000 +0100 @@ -126,6 +126,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -206,6 +208,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ diff -Nru libdbusmenu-0.3.6/tests/Makefile.am libdbusmenu-0.3.12/tests/Makefile.am --- libdbusmenu-0.3.6/tests/Makefile.am 2010-06-30 17:27:37.000000000 +0100 +++ libdbusmenu-0.3.12/tests/Makefile.am 2010-08-05 22:29:16.000000000 +0100 @@ -14,7 +14,8 @@ test-gtk-objects-test \ test-gtk-label \ test-gtk-shortcut \ - test-gtk-reorder + test-gtk-reorder \ + test-gtk-submenu check_PROGRAMS = \ glib-server-nomenu \ @@ -36,7 +37,9 @@ test-glib-simple-items \ test-gtk-reorder-server \ test-json-client \ - test-json-server + test-json-server \ + test-gtk-submenu-server \ + test-gtk-submenu-client XVFB_RUN=". $(srcdir)/run-xvfb.sh" @@ -454,6 +457,46 @@ $(DBUSMENUTESTS_LIBS) ######################### +# Test GTK Submenu +######################### + +test-gtk-submenu: test-gtk-submenu-client test-gtk-submenu-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-submenu-client --task-name Client --task ./test-gtk-submenu-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +test_gtk_submenu_server_SOURCES = \ + test-gtk-submenu-server.c + +test_gtk_submenu_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +test_gtk_submenu_client_SOURCES = \ + test-gtk-submenu-client.c + +test_gtk_submenu_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +######################### # Test Mago ######################### diff -Nru libdbusmenu-0.3.6/tests/Makefile.in libdbusmenu-0.3.12/tests/Makefile.in --- libdbusmenu-0.3.6/tests/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/tests/Makefile.in 2010-08-26 21:12:24.000000000 +0100 @@ -39,7 +39,8 @@ TESTS = test-glib-objects-test test-glib-layout test-glib-properties \ test-glib-proxy test-glib-simple-items$(EXEEXT) \ test-glib-submenu test-json test-gtk-objects-test \ - test-gtk-label test-gtk-shortcut test-gtk-reorder + test-gtk-label test-gtk-shortcut test-gtk-reorder \ + test-gtk-submenu check_PROGRAMS = glib-server-nomenu$(EXEEXT) \ test-glib-objects$(EXEEXT) test-glib-layout-client$(EXEEXT) \ test-glib-layout-server$(EXEEXT) \ @@ -54,7 +55,8 @@ test-gtk-shortcut-server$(EXEEXT) \ test-glib-simple-items$(EXEEXT) \ test-gtk-reorder-server$(EXEEXT) test-json-client$(EXEEXT) \ - test-json-server$(EXEEXT) + test-json-server$(EXEEXT) test-gtk-submenu-server$(EXEEXT) \ + test-gtk-submenu-client$(EXEEXT) subdir = tests DIST_COMMON = $(libdbusmenu_jsonloaderinclude_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ @@ -289,6 +291,30 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_gtk_shortcut_server_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +am_test_gtk_submenu_client_OBJECTS = \ + test_gtk_submenu_client-test-gtk-submenu-client.$(OBJEXT) +test_gtk_submenu_client_OBJECTS = \ + $(am_test_gtk_submenu_client_OBJECTS) +test_gtk_submenu_client_DEPENDENCIES = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +test_gtk_submenu_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_gtk_submenu_client_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_test_gtk_submenu_server_OBJECTS = \ + test_gtk_submenu_server-test-gtk-submenu-server.$(OBJEXT) +test_gtk_submenu_server_OBJECTS = \ + $(am_test_gtk_submenu_server_OBJECTS) +test_gtk_submenu_server_DEPENDENCIES = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +test_gtk_submenu_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_gtk_submenu_server_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ am_test_json_client_OBJECTS = \ test_json_client-test-json-client.$(OBJEXT) test_json_client_OBJECTS = $(am_test_json_client_OBJECTS) @@ -354,7 +380,9 @@ $(test_gtk_reorder_server_SOURCES) \ $(test_gtk_shortcut_client_SOURCES) \ $(test_gtk_shortcut_server_SOURCES) \ - $(test_json_client_SOURCES) $(test_json_server_SOURCES) + $(test_gtk_submenu_client_SOURCES) \ + $(test_gtk_submenu_server_SOURCES) $(test_json_client_SOURCES) \ + $(test_json_server_SOURCES) DIST_SOURCES = $(libdbusmenu_jsonloader_la_SOURCES) \ $(glib_server_nomenu_SOURCES) \ $(test_glib_layout_client_SOURCES) \ @@ -373,7 +401,9 @@ $(test_gtk_reorder_server_SOURCES) \ $(test_gtk_shortcut_client_SOURCES) \ $(test_gtk_shortcut_server_SOURCES) \ - $(test_json_client_SOURCES) $(test_json_server_SOURCES) + $(test_gtk_submenu_client_SOURCES) \ + $(test_gtk_submenu_server_SOURCES) $(test_json_client_SOURCES) \ + $(test_json_server_SOURCES) DATA = $(examples_DATA) $(json_DATA) $(pkgconfig_DATA) HEADERS = $(libdbusmenu_jsonloaderinclude_HEADERS) ETAGS = etags @@ -399,6 +429,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -479,6 +511,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ @@ -861,6 +895,36 @@ $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) +test_gtk_submenu_server_SOURCES = \ + test-gtk-submenu-server.c + +test_gtk_submenu_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_server_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + +test_gtk_submenu_client_SOURCES = \ + test-gtk-submenu-client.c + +test_gtk_submenu_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(DBUSMENUGTK_CFLAGS) \ + $(DBUSMENUTESTS_CFLAGS) \ + $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + +test_gtk_submenu_client_LDADD = \ + ../libdbusmenu-glib/libdbusmenu-glib.la \ + ../libdbusmenu-gtk/libdbusmenu-gtk.la \ + $(DBUSMENUGTK_LIBS) \ + $(DBUSMENUTESTS_LIBS) + ######################### # Other @@ -1036,6 +1100,12 @@ test-gtk-shortcut-server$(EXEEXT): $(test_gtk_shortcut_server_OBJECTS) $(test_gtk_shortcut_server_DEPENDENCIES) @rm -f test-gtk-shortcut-server$(EXEEXT) $(AM_V_CCLD)$(test_gtk_shortcut_server_LINK) $(test_gtk_shortcut_server_OBJECTS) $(test_gtk_shortcut_server_LDADD) $(LIBS) +test-gtk-submenu-client$(EXEEXT): $(test_gtk_submenu_client_OBJECTS) $(test_gtk_submenu_client_DEPENDENCIES) + @rm -f test-gtk-submenu-client$(EXEEXT) + $(AM_V_CCLD)$(test_gtk_submenu_client_LINK) $(test_gtk_submenu_client_OBJECTS) $(test_gtk_submenu_client_LDADD) $(LIBS) +test-gtk-submenu-server$(EXEEXT): $(test_gtk_submenu_server_OBJECTS) $(test_gtk_submenu_server_DEPENDENCIES) + @rm -f test-gtk-submenu-server$(EXEEXT) + $(AM_V_CCLD)$(test_gtk_submenu_server_LINK) $(test_gtk_submenu_server_OBJECTS) $(test_gtk_submenu_server_LDADD) $(LIBS) test-json-client$(EXEEXT): $(test_json_client_OBJECTS) $(test_json_client_DEPENDENCIES) @rm -f test-json-client$(EXEEXT) $(AM_V_CCLD)$(test_json_client_LINK) $(test_json_client_OBJECTS) $(test_json_client_LDADD) $(LIBS) @@ -1068,6 +1138,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_reorder_server-test-gtk-reorder-server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_shortcut_client-test-gtk-shortcut-client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_shortcut_server-test-gtk-shortcut-server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_json_client-test-json-client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_json_server-test-json-server.Po@am__quote@ @@ -1391,6 +1463,38 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_shortcut_server_CFLAGS) $(CFLAGS) -c -o test_gtk_shortcut_server-test-gtk-shortcut-server.obj `if test -f 'test-gtk-shortcut-server.c'; then $(CYGPATH_W) 'test-gtk-shortcut-server.c'; else $(CYGPATH_W) '$(srcdir)/test-gtk-shortcut-server.c'; fi` +test_gtk_submenu_client-test-gtk-submenu-client.o: test-gtk-submenu-client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_client_CFLAGS) $(CFLAGS) -MT test_gtk_submenu_client-test-gtk-submenu-client.o -MD -MP -MF $(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Tpo -c -o test_gtk_submenu_client-test-gtk-submenu-client.o `test -f 'test-gtk-submenu-client.c' || echo '$(srcdir)/'`test-gtk-submenu-client.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Tpo $(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-gtk-submenu-client.c' object='test_gtk_submenu_client-test-gtk-submenu-client.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_client_CFLAGS) $(CFLAGS) -c -o test_gtk_submenu_client-test-gtk-submenu-client.o `test -f 'test-gtk-submenu-client.c' || echo '$(srcdir)/'`test-gtk-submenu-client.c + +test_gtk_submenu_client-test-gtk-submenu-client.obj: test-gtk-submenu-client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_client_CFLAGS) $(CFLAGS) -MT test_gtk_submenu_client-test-gtk-submenu-client.obj -MD -MP -MF $(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Tpo -c -o test_gtk_submenu_client-test-gtk-submenu-client.obj `if test -f 'test-gtk-submenu-client.c'; then $(CYGPATH_W) 'test-gtk-submenu-client.c'; else $(CYGPATH_W) '$(srcdir)/test-gtk-submenu-client.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Tpo $(DEPDIR)/test_gtk_submenu_client-test-gtk-submenu-client.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-gtk-submenu-client.c' object='test_gtk_submenu_client-test-gtk-submenu-client.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_client_CFLAGS) $(CFLAGS) -c -o test_gtk_submenu_client-test-gtk-submenu-client.obj `if test -f 'test-gtk-submenu-client.c'; then $(CYGPATH_W) 'test-gtk-submenu-client.c'; else $(CYGPATH_W) '$(srcdir)/test-gtk-submenu-client.c'; fi` + +test_gtk_submenu_server-test-gtk-submenu-server.o: test-gtk-submenu-server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_server_CFLAGS) $(CFLAGS) -MT test_gtk_submenu_server-test-gtk-submenu-server.o -MD -MP -MF $(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Tpo -c -o test_gtk_submenu_server-test-gtk-submenu-server.o `test -f 'test-gtk-submenu-server.c' || echo '$(srcdir)/'`test-gtk-submenu-server.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Tpo $(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-gtk-submenu-server.c' object='test_gtk_submenu_server-test-gtk-submenu-server.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_server_CFLAGS) $(CFLAGS) -c -o test_gtk_submenu_server-test-gtk-submenu-server.o `test -f 'test-gtk-submenu-server.c' || echo '$(srcdir)/'`test-gtk-submenu-server.c + +test_gtk_submenu_server-test-gtk-submenu-server.obj: test-gtk-submenu-server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_server_CFLAGS) $(CFLAGS) -MT test_gtk_submenu_server-test-gtk-submenu-server.obj -MD -MP -MF $(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Tpo -c -o test_gtk_submenu_server-test-gtk-submenu-server.obj `if test -f 'test-gtk-submenu-server.c'; then $(CYGPATH_W) 'test-gtk-submenu-server.c'; else $(CYGPATH_W) '$(srcdir)/test-gtk-submenu-server.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Tpo $(DEPDIR)/test_gtk_submenu_server-test-gtk-submenu-server.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-gtk-submenu-server.c' object='test_gtk_submenu_server-test-gtk-submenu-server.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gtk_submenu_server_CFLAGS) $(CFLAGS) -c -o test_gtk_submenu_server-test-gtk-submenu-server.obj `if test -f 'test-gtk-submenu-server.c'; then $(CYGPATH_W) 'test-gtk-submenu-server.c'; else $(CYGPATH_W) '$(srcdir)/test-gtk-submenu-server.c'; fi` + test_json_client-test-json-client.o: test-json-client.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_json_client_CFLAGS) $(CFLAGS) -MT test_json_client-test-json-client.o -MD -MP -MF $(DEPDIR)/test_json_client-test-json-client.Tpo -c -o test_json_client-test-json-client.o `test -f 'test-json-client.c' || echo '$(srcdir)/'`test-json-client.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_json_client-test-json-client.Tpo $(DEPDIR)/test_json_client-test-json-client.Po @@ -1912,6 +2016,16 @@ @chmod +x $@ ######################### +# Test GTK Submenu +######################### + +test-gtk-submenu: test-gtk-submenu-client test-gtk-submenu-server Makefile.am + @echo "#!/bin/bash" > $@ + @echo $(XVFB_RUN) >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-submenu-client --task-name Client --task ./test-gtk-submenu-server --task-name Server --ignore-return >> $@ + @chmod +x $@ + +######################### # Test Mago ######################### diff -Nru libdbusmenu-0.3.6/tests/test-glib-properties-client.c libdbusmenu-0.3.12/tests/test-glib-properties-client.c --- libdbusmenu-0.3.6/tests/test-glib-properties-client.c 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/tests/test-glib-properties-client.c 2010-08-12 22:25:24.000000000 +0100 @@ -121,7 +121,7 @@ layout_updated (DbusmenuClient * client, gpointer data) { g_debug("Layout Updated"); - g_timeout_add (250, layout_verify_timer, client); + g_timeout_add (500, layout_verify_timer, client); return; } diff -Nru libdbusmenu-0.3.6/tests/test-gtk-label-client.c libdbusmenu-0.3.12/tests/test-gtk-label-client.c --- libdbusmenu-0.3.6/tests/test-gtk-label-client.c 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/tests/test-gtk-label-client.c 2010-08-26 21:13:48.000000000 +0100 @@ -22,7 +22,6 @@ #include #include -static guint layouton = 0; static GMainLoop * mainloop = NULL; static gboolean passed = TRUE; static guint death_timer = 0; @@ -105,7 +104,6 @@ static gboolean timer_func (gpointer data) { - g_debug("Death timer. Oops. Got to: %d", layouton); passed = TRUE; g_main_loop_quit(mainloop); return FALSE; diff -Nru libdbusmenu-0.3.6/tests/test-gtk-submenu-client.c libdbusmenu-0.3.12/tests/test-gtk-submenu-client.c --- libdbusmenu-0.3.6/tests/test-gtk-submenu-client.c 1970-01-01 01:00:00.000000000 +0100 +++ libdbusmenu-0.3.12/tests/test-gtk-submenu-client.c 2010-08-25 19:18:20.000000000 +0100 @@ -0,0 +1,150 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +#include +#include + +static GMainLoop * mainloop = NULL; +static gboolean passed = TRUE; + +static gboolean check_menu_content(GtkMenu * menu, char ** content) +{ + GList * child = gtk_container_get_children(GTK_CONTAINER(menu)); + char ** expected = content; + for (; child != NULL; child = g_list_next(child), ++expected) { + if (*expected == NULL) { + g_warning("Too many gtk items"); + return FALSE; + } + const char * label = gtk_menu_item_get_label(GTK_MENU_ITEM(child->data)); + if (g_strcmp0(label, *expected) != 0) { + g_warning("Expected '%s', got '%s'", *expected, label); + return FALSE; + } + } + if (*expected != NULL) { + g_warning("Not enough gtk items"); + return FALSE; + } + return TRUE; +} + +static void +abort_test(const char * message) +{ + if (message) { + g_warning("%s", message); + } + passed = FALSE; + g_main_loop_quit(mainloop); +} + +static gboolean +timer_func (gpointer data) +{ + static char * root_content[] = { "Folder 1", "Folder 2", NULL }; + static char * folder1_content[] = { "1.1", "1.2", "1.3", NULL }; + static char * folder2_content[] = { "2.1", "2.2", "2.3", NULL }; + + GtkMenuItem * root_item = GTK_MENU_ITEM(data); + GtkMenu * menu = GTK_MENU(gtk_menu_item_get_submenu(root_item)); + + /* Root */ + if (!check_menu_content(menu, root_content)) { + abort_test("Checking root content failed"); + return FALSE; + } + + /* Folder 1 */ + GList * child = gtk_container_get_children(GTK_CONTAINER(menu)); + GtkMenuItem * item = GTK_MENU_ITEM(child->data); + GtkMenu * folder_menu = GTK_MENU(gtk_menu_item_get_submenu(item)); + if (!folder_menu) { + abort_test("Folder 1 has no menu"); + return FALSE; + } + + if (!check_menu_content(folder_menu, folder1_content)) { + abort_test("Checking folder1 content failed"); + return FALSE; + } + + /* Folder 2 */ + child = g_list_next(child); + item = GTK_MENU_ITEM(child->data); + folder_menu = GTK_MENU(gtk_menu_item_get_submenu(item)); + if (!folder_menu) { + abort_test("Folder 2 has no menu"); + return FALSE; + } + + if (!check_menu_content(folder_menu, folder2_content)) { + abort_test("Checking folder2 content failed"); + return FALSE; + } + + passed = TRUE; + return FALSE; +} + +gboolean +finished_func (gpointer user_data) +{ + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char ** argv) +{ + gtk_init(&argc, &argv); + + g_debug("Client Initialized. Waiting."); + /* Make sure the server starts up and all that */ + g_usleep(500000); + + g_debug("Building Window"); + GtkWidget * window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget * menubar = gtk_menu_bar_new(); + GtkWidget * menuitem = gtk_menu_item_new_with_label("Test"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(dbusmenu_gtkmenu_new ("glib.label.test", "/org/test"))); + gtk_widget_show(menuitem); + gtk_menu_bar_append(menubar, menuitem); + gtk_widget_show(menubar); + gtk_container_add(GTK_CONTAINER(window), menubar); + gtk_window_set_title(GTK_WINDOW(window), "libdbusmenu-gtk test"); + gtk_widget_show(window); + + g_timeout_add_seconds(2, timer_func, menuitem); + g_timeout_add_seconds(6, finished_func, menuitem); + + g_debug("Entering Mainloop"); + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + if (passed) { + g_debug("Quiting"); + return 0; + } else { + g_debug("Quiting as we're a failure"); + return 1; + } +} diff -Nru libdbusmenu-0.3.6/tests/test-gtk-submenu-server.c libdbusmenu-0.3.12/tests/test-gtk-submenu-server.c --- libdbusmenu-0.3.6/tests/test-gtk-submenu-server.c 1970-01-01 01:00:00.000000000 +0100 +++ libdbusmenu-0.3.12/tests/test-gtk-submenu-server.c 2010-08-25 19:18:20.000000000 +0100 @@ -0,0 +1,113 @@ +/* +A test for libdbusmenu to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +#include + +#include +#include +#include +#include + +#include +#include + +static GMainLoop *mainloop = NULL; + +static gboolean +timer_func (gpointer data) +{ + g_main_loop_quit (mainloop); + + return FALSE; +} + +static gboolean +show_item (gpointer pmi) +{ + DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(pmi); + g_debug("Showing item"); + + dbusmenu_menuitem_show_to_user(mi, 0); + + return FALSE; +} + +DbusmenuMenuitem * +add_item(DbusmenuMenuitem * parent, const char * label) +{ + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(item, "label", label); + dbusmenu_menuitem_child_append(parent, item); + return item; +} + +int +main (int argc, char ** argv) +{ + GError * error = NULL; + + g_type_init(); + + DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); + + DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); + guint nameret = 0; + + if (!org_freedesktop_DBus_request_name(bus_proxy, "glib.label.test", 0, &nameret, &error)) { + g_error("Unable to call to request name"); + return 1; + } + + if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + g_error("Unable to get name"); + return 1; + } + + DbusmenuServer * server = dbusmenu_server_new("/org/test"); + DbusmenuMenuitem * root = dbusmenu_menuitem_new(); + dbusmenu_server_set_root(server, root); + + DbusmenuMenuitem * item; + item = add_item(root, "Folder 1"); + add_item(item, "1.1"); + add_item(item, "1.2"); + add_item(item, "1.3"); + + g_timeout_add_seconds(2, show_item, item); + + item = add_item(root, "Folder 2"); + add_item(item, "2.1"); + add_item(item, "2.2"); + add_item(item, "2.3"); + + g_timeout_add_seconds(4, show_item, item); + + g_timeout_add_seconds(6, timer_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + g_debug("Quiting"); + + return 0; +} + diff -Nru libdbusmenu-0.3.6/tests/test-json-01.json libdbusmenu-0.3.12/tests/test-json-01.json --- libdbusmenu-0.3.6/tests/test-json-01.json 2010-06-30 17:27:37.000000000 +0100 +++ libdbusmenu-0.3.12/tests/test-json-01.json 2010-08-12 17:10:43.000000000 +0100 @@ -4,30 +4,30 @@ "submenu": [ { "id": 5, + "children-display": "submenu", "enabled": true, "label": "File", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 6, - "shortcut": [["Control", "q"]], "enabled": true, "label": "Quit", + "shortcut": [["Control", "q"]], "visible": true }, { "id": 7, - "shortcut": [["Control", "Shift", "w"]], "enabled": true, "label": "Close all", + "shortcut": [["Control", "Shift", "w"]], "visible": true }, { "id": 8, - "shortcut": [["Control", "w"]], "enabled": true, "label": "Close", + "shortcut": [["Control", "w"]], "visible": true }, { @@ -42,9 +42,9 @@ }, { "id": 11, - "shortcut": [["Control", "p"]], "enabled": true, "label": "Print...", + "shortcut": [["Control", "p"]], "visible": true }, { @@ -77,16 +77,16 @@ }, { "id": 17, - "shortcut": [["Control", "Shift", "s"]], "enabled": true, "label": "Save As...", + "shortcut": [["Control", "Shift", "s"]], "visible": true }, { "id": 18, - "shortcut": [["Control", "s"]], "enabled": true, "label": "Save", + "shortcut": [["Control", "s"]], "visible": true }, { @@ -95,9 +95,9 @@ }, { "id": 20, + "children-display": "submenu", "enabled": true, "label": "Open Recent", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -112,16 +112,16 @@ }, { "id": 23, - "shortcut": [["Control", "2"]], "enabled": true, "label": "giggity.jpg", + "shortcut": [["Control", "2"]], "visible": true }, { "id": 24, - "shortcut": [["Control", "1"]], "enabled": true, "label": "Icon Height.svg", + "shortcut": [["Control", "1"]], "visible": true } ] @@ -134,37 +134,37 @@ }, { "id": 26, - "shortcut": [["Control", "Alt", "o"]], "enabled": true, "label": "Open as Layers...", + "shortcut": [["Control", "Alt", "o"]], "visible": true }, { "id": 27, - "shortcut": [["Control", "o"]], "enabled": true, "label": "Open...", + "shortcut": [["Control", "o"]], "visible": true }, { "id": 28, + "children-display": "submenu", "enabled": true, "label": "Create", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 29, + "children-display": "submenu", "enabled": true, "label": "Web Page Themes", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 30, + "children-display": "submenu", "enabled": true, "label": "Classic.Gimp.Org", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -207,9 +207,9 @@ }, { "id": 37, + "children-display": "submenu", "enabled": true, "label": "Beveled Pattern", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -246,9 +246,9 @@ }, { "id": 43, + "children-display": "submenu", "enabled": true, "label": "Alien Glow", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -281,9 +281,9 @@ }, { "id": 48, + "children-display": "submenu", "enabled": true, "label": "Patterns", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -338,9 +338,9 @@ }, { "id": 57, + "children-display": "submenu", "enabled": true, "label": "Logos", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -515,9 +515,9 @@ }, { "id": 86, + "children-display": "submenu", "enabled": true, "label": "Buttons", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -540,9 +540,9 @@ }, { "id": 90, + "children-display": "submenu", "enabled": true, "label": "xscanimage", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -561,27 +561,27 @@ }, { "id": 93, - "shortcut": [["Control", "Shift", "v"]], "enabled": true, "label": "From Clipboard", + "shortcut": [["Control", "Shift", "v"]], "visible": true } ] }, { "id": 94, - "shortcut": [["Control", "n"]], "enabled": true, "label": "New...", + "shortcut": [["Control", "n"]], "visible": true } ] }, { "id": 95, + "children-display": "submenu", "enabled": true, "label": "Edit", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -626,30 +626,30 @@ }, { "id": 103, - "shortcut": [["Control", "semicolon"]], "enabled": true, "label": "Fill with Pattern", + "shortcut": [["Control", "semicolon"]], "visible": true }, { "id": 104, - "shortcut": [["Control", "period"]], "enabled": true, "label": "Fill with BG Color", + "shortcut": [["Control", "period"]], "visible": true }, { "id": 105, - "shortcut": [["Control", "comma"]], "enabled": true, "label": "Fill with FG Color", + "shortcut": [["Control", "comma"]], "visible": true }, { "id": 106, - "shortcut": [["Delete"]], "enabled": true, "label": "Clear", + "shortcut": [["Delete"]], "visible": true }, { @@ -658,9 +658,9 @@ }, { "id": 108, + "children-display": "submenu", "enabled": true, "label": "Buffer", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -691,9 +691,9 @@ }, { "id": 113, + "children-display": "submenu", "enabled": true, "label": "Paste as", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -716,9 +716,9 @@ }, { "id": 117, - "shortcut": [["Control", "Shift", "v"]], "enabled": true, "label": "New Image", + "shortcut": [["Control", "Shift", "v"]], "visible": true } ] @@ -731,30 +731,30 @@ }, { "id": 119, - "shortcut": [["Control", "v"]], "enabled": true, "label": "Paste", + "shortcut": [["Control", "v"]], "visible": true }, { "id": 120, - "shortcut": [["Control", "Shift", "c"]], "enabled": true, "label": "Copy Visible", + "shortcut": [["Control", "Shift", "c"]], "visible": true }, { "id": 121, - "shortcut": [["Control", "c"]], "enabled": true, "label": "Copy", + "shortcut": [["Control", "c"]], "visible": true }, { "id": 122, - "shortcut": [["Control", "x"]], "enabled": true, "label": "Cut", + "shortcut": [["Control", "x"]], "visible": true }, { @@ -775,25 +775,25 @@ }, { "id": 2, - "shortcut": [["Control", "y"]], "enabled": false, "label": "_Redo", + "shortcut": [["Control", "y"]], "visible": true }, { "id": 1, - "shortcut": [["Control", "z"]], "enabled": false, "label": "_Undo", + "shortcut": [["Control", "z"]], "visible": true } ] }, { "id": 125, + "children-display": "submenu", "enabled": true, "label": "Select", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -810,10 +810,10 @@ }, { "id": 128, - "shortcut": [["Shift", "q"]], "enabled": true, - "toggle-state": 0, "label": "Toggle Quick Mask", + "shortcut": [["Shift", "q"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -869,93 +869,93 @@ }, { "id": 138, - "shortcut": [["Shift", "v"]], "enabled": false, "label": "From Path", + "shortcut": [["Shift", "v"]], "visible": true }, { "id": 139, - "shortcut": [["Shift", "o"]], "enabled": true, "label": "By Color", + "shortcut": [["Shift", "o"]], "visible": true }, { "id": 140, - "shortcut": [["Control", "Shift", "l"]], "enabled": false, "label": "Float", + "shortcut": [["Control", "Shift", "l"]], "visible": true }, { "id": 141, - "shortcut": [["Control", "i"]], "enabled": true, "label": "Invert", + "shortcut": [["Control", "i"]], "visible": true }, { "id": 142, - "shortcut": [["Control", "Shift", "a"]], "enabled": false, "label": "None", + "shortcut": [["Control", "Shift", "a"]], "visible": true }, { "id": 143, - "shortcut": [["Control", "a"]], "enabled": true, "label": "All", + "shortcut": [["Control", "a"]], "visible": true } ] }, { "id": 144, + "children-display": "submenu", "enabled": true, "label": "View", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 145, "enabled": true, - "toggle-state": 1, "label": "Show Statusbar", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, { "id": 146, "enabled": true, - "toggle-state": 0, "label": "Show Scrollbars", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 147, - "shortcut": [["Control", "Shift", "r"]], "enabled": true, - "toggle-state": 0, "label": "Show Rulers", + "shortcut": [["Control", "Shift", "r"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 148, "enabled": true, - "toggle-state": 1, "label": "Show Menubar", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, { "id": 149, + "children-display": "submenu", "enabled": true, "label": "Padding Color", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1001,32 +1001,32 @@ { "id": 157, "enabled": true, - "toggle-state": 0, "label": "Snap to Active Path", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 158, "enabled": true, - "toggle-state": 0, "label": "Snap to Canvas Edges", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 159, "enabled": true, - "toggle-state": 0, "label": "Snap to Grid", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 160, "enabled": true, - "toggle-state": 1, "label": "Snap to Guides", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, @@ -1037,42 +1037,42 @@ { "id": 162, "enabled": true, - "toggle-state": 0, "label": "Show Sample Points", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 163, "enabled": true, - "toggle-state": 0, "label": "Show Grid", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 164, - "shortcut": [["Control", "Shift", "t"]], "enabled": true, - "toggle-state": 0, "label": "Show Guides", + "shortcut": [["Control", "Shift", "t"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 165, "enabled": true, - "toggle-state": 0, "label": "Show Layer Boundary", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 166, - "shortcut": [["Control", "t"]], "enabled": true, - "toggle-state": 0, "label": "Show Selection", + "shortcut": [["Control", "t"]], + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1098,12 +1098,12 @@ }, { "id": 171, + "children-display": "submenu", "enabled": true, + "label": "Fullscreen", "shortcut": [["F11"]], "toggle-state": 0, - "label": "Fullscreen", "toggle-type": "checkmark", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1116,9 +1116,9 @@ }, { "id": 173, - "shortcut": [["Control", "e"]], "enabled": true, "label": "Shrink Wrap", + "shortcut": [["Control", "e"]], "visible": true }, { @@ -1127,16 +1127,16 @@ }, { "id": 175, + "children-display": "submenu", "enabled": true, "label": "_Zoom (67%)", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 176, "enabled": true, - "toggle-state": 0, "label": "Othe_r (67%)...", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1147,73 +1147,73 @@ { "id": 178, "enabled": true, - "toggle-state": 0, "label": "1:16 (6.25%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 179, "enabled": true, - "toggle-state": 0, "label": "1:8 (12.5%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 180, "enabled": true, - "toggle-state": 0, "label": "1:4 (25%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 181, "enabled": true, - "toggle-state": 0, "label": "1:2 (50%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 182, - "shortcut": [["1"]], "enabled": true, - "toggle-state": 1, "label": "1:1 (100%)", + "shortcut": [["1"]], + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, { "id": 183, "enabled": true, - "toggle-state": 0, "label": "2:1 (200%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 184, "enabled": true, - "toggle-state": 0, "label": "4:1 (400%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 185, "enabled": true, - "toggle-state": 0, "label": "8:1 (800%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 186, "enabled": true, - "toggle-state": 0, "label": "16:1 (1600%)", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1229,30 +1229,30 @@ }, { "id": 189, - "shortcut": [["Control", "Shift", "e"]], "enabled": true, "label": "Fit Image in Window", + "shortcut": [["Control", "Shift", "e"]], "visible": true }, { "id": 190, - "shortcut": [["plus"]], "enabled": true, "label": "Zoom In", + "shortcut": [["plus"]], "visible": true }, { "id": 191, - "shortcut": [["minus"]], "enabled": true, "label": "Zoom Out", + "shortcut": [["minus"]], "visible": true }, { "id": 4, - "shortcut": [["grave"]], "enabled": true, "label": "Re_vert Zoom (67%)", + "shortcut": [["grave"]], "visible": true } ] @@ -1260,8 +1260,8 @@ { "id": 192, "enabled": true, - "toggle-state": 1, "label": "Dot for Dot", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true }, @@ -1275,16 +1275,16 @@ }, { "id": 194, + "children-display": "submenu", "enabled": true, "label": "Image", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 195, - "shortcut": [["Alt", "Return"]], "enabled": true, "label": "Image Properties", + "shortcut": [["Alt", "Return"]], "visible": true }, { @@ -1295,9 +1295,9 @@ }, { "id": 197, + "children-display": "submenu", "enabled": true, "label": "Guides", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1344,9 +1344,9 @@ }, { "id": 205, - "shortcut": [["Control", "m"]], "enabled": true, "label": "Merge Visible Layers...", + "shortcut": [["Control", "m"]], "visible": true }, { @@ -1411,9 +1411,9 @@ }, { "id": 217, + "children-display": "submenu", "enabled": true, "label": "Transform", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1464,9 +1464,9 @@ }, { "id": 226, + "children-display": "submenu", "enabled": true, "label": "Mode", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1488,24 +1488,24 @@ { "id": 230, "enabled": true, - "toggle-state": 0, "label": "Indexed...", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 231, "enabled": true, - "toggle-state": 0, "label": "Grayscale", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 232, "enabled": true, - "toggle-state": 1, "label": "RGB", + "toggle-state": 1, "toggle-type": "checkmark", "visible": true } @@ -1513,18 +1513,18 @@ }, { "id": 233, - "shortcut": [["Control", "d"]], "enabled": true, "label": "Duplicate", + "shortcut": [["Control", "d"]], "visible": true } ] }, { "id": 234, + "children-display": "submenu", "enabled": true, "label": "Layer", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1563,16 +1563,16 @@ }, { "id": 241, + "children-display": "submenu", "enabled": true, "label": "Transform", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 242, - "shortcut": [["Control", "Shift", "o"]], "enabled": true, "label": "Offset...", + "shortcut": [["Control", "Shift", "o"]], "visible": true }, { @@ -1623,9 +1623,9 @@ }, { "id": 251, + "children-display": "submenu", "enabled": true, "label": "Transparency", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1690,9 +1690,9 @@ }, { "id": 262, + "children-display": "submenu", "enabled": true, "label": "Mask", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1726,24 +1726,24 @@ { "id": 268, "enabled": false, - "toggle-state": 0, "label": "Disable Layer Mask", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 269, "enabled": false, - "toggle-state": 0, "label": "Edit Layer Mask", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, { "id": 270, "enabled": false, - "toggle-state": 0, "label": "Show Layer Mask", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -1773,9 +1773,9 @@ }, { "id": 275, + "children-display": "submenu", "enabled": true, "label": "Stack", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1818,38 +1818,38 @@ }, { "id": 283, - "shortcut": [["End"]], "enabled": false, "label": "Select Bottom Layer", + "shortcut": [["End"]], "visible": true }, { "id": 284, - "shortcut": [["Home"]], "enabled": false, "label": "Select Top Layer", + "shortcut": [["Home"]], "visible": true }, { "id": 285, - "shortcut": [["Page_Down"]], "enabled": false, "label": "Select Next Layer", + "shortcut": [["Page_Down"]], "visible": true }, { "id": 286, - "shortcut": [["Page_Up"]], "enabled": false, "label": "Select Previous Layer", + "shortcut": [["Page_Up"]], "visible": true } ] }, { "id": 287, - "type": "separator", "children-display": "submenu", + "type": "separator", "submenu": [ { "id": 288, @@ -1873,16 +1873,16 @@ }, { "id": 291, - "shortcut": [["Control", "h"]], "enabled": false, "label": "Anchor Layer", + "shortcut": [["Control", "h"]], "visible": true }, { "id": 292, - "shortcut": [["Control", "Shift", "d"]], "enabled": true, "label": "Duplicate Layer", + "shortcut": [["Control", "Shift", "d"]], "visible": true }, { @@ -1893,18 +1893,18 @@ }, { "id": 294, - "shortcut": [["Control", "Shift", "n"]], "enabled": true, "label": "New Layer...", + "shortcut": [["Control", "Shift", "n"]], "visible": true } ] }, { "id": 295, + "children-display": "submenu", "enabled": true, "label": "Colors", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1949,9 +1949,9 @@ }, { "id": 303, + "children-display": "submenu", "enabled": true, "label": "Info", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -1982,9 +1982,9 @@ }, { "id": 308, + "children-display": "submenu", "enabled": true, "label": "Map", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2043,9 +2043,9 @@ }, { "id": 318, + "children-display": "submenu", "enabled": true, "label": "Components", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2076,9 +2076,9 @@ }, { "id": 323, + "children-display": "submenu", "enabled": true, "label": "Auto", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2126,8 +2126,8 @@ { "id": 331, "enabled": true, - "toggle-state": 0, "label": "Use GEGL", + "toggle-state": 0, "toggle-type": "checkmark", "visible": true }, @@ -2209,30 +2209,30 @@ }, { "id": 345, + "children-display": "submenu", "enabled": true, "label": "Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 346, - "shortcut": [["x"]], "enabled": true, "label": "Swap Colors", + "shortcut": [["x"]], "visible": true }, { "id": 347, - "shortcut": [["d"]], "enabled": true, "label": "Default Colors", + "shortcut": [["d"]], "visible": true }, { "id": 348, - "shortcut": [["Control", "b"]], "enabled": true, "label": "Toolbox", + "shortcut": [["Control", "b"]], "visible": true }, { @@ -2247,44 +2247,44 @@ }, { "id": 351, - "shortcut": [["t"]], "enabled": true, "label": "Text", + "shortcut": [["t"]], "visible": true }, { "id": 352, - "shortcut": [["Shift", "m"]], "enabled": true, "label": "Measure", + "shortcut": [["Shift", "m"]], "visible": true }, { "id": 353, - "shortcut": [["z"]], "enabled": true, "label": "Zoom", + "shortcut": [["z"]], "visible": true }, { "id": 354, - "shortcut": [["o"]], "enabled": true, "label": "Color Picker", + "shortcut": [["o"]], "visible": true }, { "id": 355, - "shortcut": [["b"]], "enabled": true, "label": "Paths", + "shortcut": [["b"]], "visible": true }, { "id": 356, + "children-display": "submenu", "enabled": true, "label": "Color Tools", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2345,95 +2345,95 @@ }, { "id": 366, + "children-display": "submenu", "enabled": true, "label": "Transform Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 367, - "shortcut": [["Shift", "f"]], "enabled": true, "label": "Flip", + "shortcut": [["Shift", "f"]], "visible": true }, { "id": 368, - "shortcut": [["Shift", "p"]], "enabled": true, "label": "Perspective", + "shortcut": [["Shift", "p"]], "visible": true }, { "id": 369, - "shortcut": [["Shift", "s"]], "enabled": true, "label": "Shear", + "shortcut": [["Shift", "s"]], "visible": true }, { "id": 370, - "shortcut": [["Shift", "t"]], "enabled": true, "label": "Scale", + "shortcut": [["Shift", "t"]], "visible": true }, { "id": 371, - "shortcut": [["Shift", "r"]], "enabled": true, "label": "Rotate", + "shortcut": [["Shift", "r"]], "visible": true }, { "id": 372, - "shortcut": [["Shift", "c"]], "enabled": true, "label": "Crop", + "shortcut": [["Shift", "c"]], "visible": true }, { "id": 373, - "shortcut": [["m"]], "enabled": true, "label": "Move", + "shortcut": [["m"]], "visible": true }, { "id": 374, - "shortcut": [["q"]], "enabled": true, "label": "Align", + "shortcut": [["q"]], "visible": true } ] }, { "id": 375, + "children-display": "submenu", "enabled": true, "label": "Paint Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 376, - "shortcut": [["Shift", "d"]], "enabled": true, "label": "Dodge / Burn", + "shortcut": [["Shift", "d"]], "visible": true }, { "id": 377, - "shortcut": [["s"]], "enabled": true, "label": "Smudge", + "shortcut": [["s"]], "visible": true }, { "id": 378, - "shortcut": [["Shift", "u"]], "enabled": true, "label": "Blur / Sharpen", + "shortcut": [["Shift", "u"]], "visible": true }, { @@ -2444,95 +2444,95 @@ }, { "id": 380, - "shortcut": [["h"]], "enabled": true, "label": "Heal", + "shortcut": [["h"]], "visible": true }, { "id": 381, - "shortcut": [["c"]], "enabled": true, "label": "Clone", + "shortcut": [["c"]], "visible": true }, { "id": 382, - "shortcut": [["k"]], "enabled": true, "label": "Ink", + "shortcut": [["k"]], "visible": true }, { "id": 383, - "shortcut": [["a"]], "enabled": true, "label": "Airbrush", + "shortcut": [["a"]], "visible": true }, { "id": 384, - "shortcut": [["Shift", "e"]], "enabled": true, "label": "Eraser", + "shortcut": [["Shift", "e"]], "visible": true }, { "id": 385, - "shortcut": [["p"]], "enabled": true, "label": "Paintbrush", + "shortcut": [["p"]], "visible": true }, { "id": 386, - "shortcut": [["n"]], "enabled": true, "label": "Pencil", + "shortcut": [["n"]], "visible": true }, { "id": 387, - "shortcut": [["l"]], "enabled": true, "label": "Blend", + "shortcut": [["l"]], "visible": true }, { "id": 388, - "shortcut": [["Shift", "b"]], "enabled": true, "label": "Bucket Fill", + "shortcut": [["Shift", "b"]], "visible": true } ] }, { "id": 389, + "children-display": "submenu", "enabled": true, "label": "Selection Tools", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 390, - "shortcut": [["i"]], "enabled": true, "label": "Intelligent Scissors", + "shortcut": [["i"]], "visible": true }, { "id": 391, - "shortcut": [["Shift", "o"]], "enabled": true, "label": "By Color Select", + "shortcut": [["Shift", "o"]], "visible": true }, { "id": 392, - "shortcut": [["u"]], "enabled": true, "label": "Fuzzy Select", + "shortcut": [["u"]], "visible": true }, { @@ -2543,23 +2543,23 @@ }, { "id": 394, - "shortcut": [["f"]], "enabled": true, "label": "Free Select", + "shortcut": [["f"]], "visible": true }, { "id": 395, - "shortcut": [["e"]], "enabled": true, "label": "Ellipse Select", + "shortcut": [["e"]], "visible": true }, { "id": 396, - "shortcut": [["r"]], "enabled": true, "label": "Rectangle Select", + "shortcut": [["r"]], "visible": true } ] @@ -2568,16 +2568,16 @@ }, { "id": 397, + "children-display": "submenu", "enabled": true, "label": "Filters", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 398, + "children-display": "submenu", "enabled": true, "label": "Script-Fu", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2602,9 +2602,9 @@ }, { "id": 402, + "children-display": "submenu", "enabled": true, "label": "Python-Fu", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2621,9 +2621,9 @@ }, { "id": 405, + "children-display": "submenu", "enabled": true, "label": "Alpha to Logo", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2748,9 +2748,9 @@ }, { "id": 426, + "children-display": "submenu", "enabled": true, "label": "Animation", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2815,9 +2815,9 @@ }, { "id": 437, + "children-display": "submenu", "enabled": true, "label": "Web", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2842,9 +2842,9 @@ }, { "id": 441, + "children-display": "submenu", "enabled": true, "label": "Render", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2895,9 +2895,9 @@ }, { "id": 450, + "children-display": "submenu", "enabled": true, "label": "Pattern", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2952,9 +2952,9 @@ }, { "id": 459, + "children-display": "submenu", "enabled": true, "label": "Nature", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -2973,9 +2973,9 @@ }, { "id": 462, + "children-display": "submenu", "enabled": true, "label": "Clouds", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3008,9 +3008,9 @@ }, { "id": 467, + "children-display": "submenu", "enabled": true, "label": "Map", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3077,9 +3077,9 @@ }, { "id": 478, + "children-display": "submenu", "enabled": true, "label": "Decor", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3140,9 +3140,9 @@ }, { "id": 488, + "children-display": "submenu", "enabled": true, "label": "Artistic", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3215,9 +3215,9 @@ }, { "id": 500, + "children-display": "submenu", "enabled": true, "label": "Combine", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3236,9 +3236,9 @@ }, { "id": 503, + "children-display": "submenu", "enabled": true, "label": "Generic", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3263,9 +3263,9 @@ }, { "id": 507, + "children-display": "submenu", "enabled": true, "label": "Edge-Detect", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3302,9 +3302,9 @@ }, { "id": 513, + "children-display": "submenu", "enabled": true, "label": "Noise", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3347,9 +3347,9 @@ }, { "id": 520, + "children-display": "submenu", "enabled": true, "label": "Light and Shadow", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3424,9 +3424,9 @@ }, { "id": 533, + "children-display": "submenu", "enabled": true, "label": "Distorts", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3541,9 +3541,9 @@ }, { "id": 552, + "children-display": "submenu", "enabled": true, "label": "Enhance", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3598,9 +3598,9 @@ }, { "id": 561, + "children-display": "submenu", "enabled": true, "label": "Blur", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3653,10 +3653,10 @@ }, { "id": 570, - "shortcut": [["Control", "Shift", "f"]], + "children-display": "submenu", "enabled": false, "label": "Re-Show Last", - "children-display": "submenu", + "shortcut": [["Control", "Shift", "f"]], "visible": true, "submenu": [ { @@ -3669,25 +3669,25 @@ }, { "id": 572, - "shortcut": [["Control", "f"]], "enabled": false, "label": "Repeat Last", + "shortcut": [["Control", "f"]], "visible": true } ] }, { "id": 573, + "children-display": "submenu", "enabled": true, "label": "Windows", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 574, - "shortcut": [["Control", "b"]], "enabled": true, "label": "Toolbox", + "shortcut": [["Control", "b"]], "visible": true }, { @@ -3696,9 +3696,9 @@ }, { "id": 576, + "children-display": "submenu", "enabled": true, "label": "Dockable Dialogs", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3755,23 +3755,23 @@ }, { "id": 586, - "shortcut": [["Control", "g"]], "enabled": true, "label": "Gradients", + "shortcut": [["Control", "g"]], "visible": true }, { "id": 587, - "shortcut": [["Control", "Shift", "p"]], "enabled": true, "label": "Patterns", + "shortcut": [["Control", "Shift", "p"]], "visible": true }, { "id": 588, - "shortcut": [["Control", "Shift", "b"]], "enabled": true, "label": "Brushes", + "shortcut": [["Control", "Shift", "b"]], "visible": true }, { @@ -3840,9 +3840,9 @@ }, { "id": 600, - "shortcut": [["Control", "l"]], "enabled": true, "label": "Layers", + "shortcut": [["Control", "l"]], "visible": true }, { @@ -3865,9 +3865,9 @@ }, { "id": 604, + "children-display": "submenu", "enabled": true, "label": "Recently Closed Docks", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3882,16 +3882,16 @@ }, { "id": 606, + "children-display": "submenu", "enabled": true, "label": "Help", - "children-display": "submenu", "visible": true, "submenu": [ { "id": 607, + "children-display": "submenu", "enabled": true, "label": "User Manual", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -3940,9 +3940,9 @@ }, { "id": 615, + "children-display": "submenu", "enabled": true, "label": "GIMP Online", - "children-display": "submenu", "visible": true, "submenu": [ { @@ -4005,16 +4005,16 @@ }, { "id": 626, - "shortcut": [["Shift", "F1"]], "enabled": true, "label": "Context Help", + "shortcut": [["Shift", "F1"]], "visible": true }, { "id": 627, - "shortcut": [["F1"]], "enabled": true, "label": "Help", + "shortcut": [["F1"]], "visible": true } ] diff -Nru libdbusmenu-0.3.6/tools/dbusmenu-dumper.c libdbusmenu-0.3.12/tools/dbusmenu-dumper.c --- libdbusmenu-0.3.6/tools/dbusmenu-dumper.c 2010-06-30 17:27:37.000000000 +0100 +++ libdbusmenu-0.3.12/tools/dbusmenu-dumper.c 2010-08-12 17:09:09.000000000 +0100 @@ -21,11 +21,17 @@ */ #include +#include + +#include +#include +#include #include #include #include +#include static GMainLoop * mainloop = NULL; @@ -129,13 +135,20 @@ return str; } +static gint +list_str_cmp (gconstpointer a, gconstpointer b) +{ + return g_strcmp0((gchar *)a, (gchar *)b); +} + static void print_menuitem (DbusmenuMenuitem * item, int depth) { gchar * space = g_strnfill(depth, ' '); g_print("%s\"id\": %d", space, dbusmenu_menuitem_get_id(item)); - GList * properties = dbusmenu_menuitem_properties_list(item); + GList * properties_raw = dbusmenu_menuitem_properties_list(item); + GList * properties = g_list_sort(properties_raw, list_str_cmp); GList * property; for (property = properties; property != NULL; property = g_list_next(property)) { const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data); @@ -191,11 +204,191 @@ return; } +/* Window clicking ***************************************************/ +static GdkFilterReturn +click_filter (GdkXEvent *gdk_xevent, + GdkEvent *event, + gpointer data); + +static Window +find_real_window (Window w, int depth) +{ + if (depth > 5) { + return None; + } + /*static*/ Atom wm_state = XInternAtom(gdk_display, "WM_STATE", False); + Atom type; + int format; + unsigned long nitems, after; + unsigned char* prop; + if (XGetWindowProperty(gdk_display, w, wm_state, 0, 0, False, AnyPropertyType, + &type, &format, &nitems, &after, &prop) == Success) { + if (prop != NULL) { + XFree(prop); + } + if (type != None) { + return w; + } + } + Window root, parent; + Window* children; + unsigned int nchildren; + Window ret = None; + if (XQueryTree(gdk_display, w, &root, &parent, &children, &nchildren) != 0) { + unsigned int i; + for(i = 0; i < nchildren && ret == None; ++i) { + ret = find_real_window(children[ i ], depth + 1); + } + if (children != NULL) { + XFree(children); + } + } + return ret; +} + +static Window +get_window_under_cursor (void) +{ + Window root; + Window child; + uint mask; + int rootX, rootY, winX, winY; + XQueryPointer(gdk_display, gdk_x11_get_default_root_xwindow(), &root, &child, &rootX, &rootY, &winX, &winY, &mask); + if (child == None) { + return None; + } + return find_real_window(child, 0); +} + +static void +uninstall_click_filter (void) +{ + GdkWindow *root; + + root = gdk_get_default_root_window (); + gdk_window_remove_filter (root, (GdkFilterFunc) click_filter, NULL); + + gdk_pointer_ungrab (GDK_CURRENT_TIME); + gdk_keyboard_ungrab (GDK_CURRENT_TIME); + + gtk_main_quit (); +} + +static GdkFilterReturn +click_filter (GdkXEvent *gdk_xevent, + GdkEvent *event, + gpointer data) + +{ + XEvent *xevent = (XEvent *) gdk_xevent; + gboolean *success = (gboolean *)data; + + switch (xevent->type) { + case ButtonPress: + uninstall_click_filter(); + *success = TRUE; + return GDK_FILTER_REMOVE; + case KeyPress: + if (xevent->xkey.keycode == XKeysymToKeycode(gdk_display, XK_Escape)) { + uninstall_click_filter(); + *success = FALSE; + return GDK_FILTER_REMOVE; + } + break; + default: + break; + } + + return GDK_FILTER_CONTINUE; +} + +static gboolean +install_click_filter (gpointer data) +{ + GdkGrabStatus status; + GdkCursor *cross; + GdkWindow *root; + + root = gdk_get_default_root_window(); + + gdk_window_add_filter(root, (GdkFilterFunc) click_filter, data); + + cross = gdk_cursor_new(GDK_CROSS); + status = gdk_pointer_grab(root, FALSE, GDK_BUTTON_PRESS_MASK, + NULL, cross, GDK_CURRENT_TIME); + gdk_cursor_unref(cross); + + if (status != GDK_GRAB_SUCCESS) { + g_warning("Pointer grab failed.\n"); + uninstall_click_filter(); + return FALSE; + } + + status = gdk_keyboard_grab(root, FALSE, GDK_CURRENT_TIME); + if (status != GDK_GRAB_SUCCESS) { + g_warning("Keyboard grab failed.\n"); + uninstall_click_filter(); + return FALSE; + } + + gdk_flush(); + return FALSE; +} + +static gboolean +wait_for_click (void) +{ + gboolean success; + g_idle_add (install_click_filter, (gpointer)(&success)); + gtk_main (); + return success; +} static gchar * dbusname = NULL; static gchar * dbusobject = NULL; static gboolean +init_dbus_vars_from_window(Window window) +{ + DBusGConnection *connection; + GError *error; + DBusGProxy *proxy; + + error = NULL; + connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); + if (connection == NULL) { + g_printerr("Failed to open connection to bus: %s\n", error->message); + g_error_free(error); + return FALSE; + } + + proxy = dbus_g_proxy_new_for_name (connection, + "org.ayatana.AppMenu.Registrar", + "/org/ayatana/AppMenu/Registrar", + "org.ayatana.AppMenu.Registrar"); + + error = NULL; + if (!dbus_g_proxy_call (proxy, "GetMenuForWindow", &error, + G_TYPE_UINT, window, G_TYPE_INVALID, + G_TYPE_STRING, &dbusname, DBUS_TYPE_G_OBJECT_PATH, &dbusobject, G_TYPE_INVALID)) + { + g_printerr("ERROR: %s\n", error->message); + g_error_free(error); + g_object_unref(proxy); + return FALSE; + } + + if (!g_strcmp0(dbusobject, "/")) { + return FALSE; + } + + g_object_unref (proxy); + + return TRUE; +} + +/* Option parser *****************************************************/ +static gboolean option_dbusname (const gchar * arg, const gchar * value, gpointer data, GError ** error) { if (dbusname != NULL) { @@ -228,7 +421,8 @@ static GOptionEntry general_options[] = { {"dbus-name", 'd', 0, G_OPTION_ARG_CALLBACK, option_dbusname, "The name of the program to connect to (i.e. org.test.bob", "dbusname"}, - {"dbus-object", 'o', 0, G_OPTION_ARG_CALLBACK, option_dbusobject, "The path to the Dbus object (i.e /org/test/bob/alvin)", "dbusobject"} + {"dbus-object", 'o', 0, G_OPTION_ARG_CALLBACK, option_dbusobject, "The path to the Dbus object (i.e /org/test/bob/alvin)", "dbusobject"}, + {NULL} }; int @@ -248,16 +442,32 @@ return 1; } - if (dbusname == NULL) { - g_printerr("ERROR: dbus-name not specified\n"); - usage(); - return 1; - } + if (dbusname == NULL && dbusobject == NULL) { + gtk_init(&argc, &argv); + if (!wait_for_click()) { + return 1; + } + Window window = get_window_under_cursor(); + if (window == None) { + g_printerr("ERROR: could not get the id for the pointed window\n"); + return 1; + } + if (!init_dbus_vars_from_window(window)) { + g_printerr("ERROR: could not find a menu for the pointed window\n"); + return 1; + } + } else { + if (dbusname == NULL) { + g_printerr("ERROR: dbus-name not specified\n"); + usage(); + return 1; + } - if (dbusobject == NULL) { - g_printerr("ERROR: dbus-object not specified\n"); - usage(); - return 1; + if (dbusobject == NULL) { + g_printerr("ERROR: dbus-object not specified\n"); + usage(); + return 1; + } } DbusmenuClient * client = dbusmenu_client_new (dbusname, dbusobject); diff -Nru libdbusmenu-0.3.6/tools/Makefile.am libdbusmenu-0.3.12/tools/Makefile.am --- libdbusmenu-0.3.6/tools/Makefile.am 2010-06-10 17:01:59.000000000 +0100 +++ libdbusmenu-0.3.12/tools/Makefile.am 2010-07-20 22:35:41.000000000 +0100 @@ -10,11 +10,14 @@ dbusmenu_dumper_CFLAGS = \ -I $(srcdir)/.. \ - $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUDUMPER_CFLAGS) \ + -Wall -Werror dbusmenu_dumper_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ - $(DBUSMENUGLIB_LIBS) + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUDUMPER_LIBS) doc_DATA = README.dbusmenu-bench diff -Nru libdbusmenu-0.3.6/tools/Makefile.in libdbusmenu-0.3.12/tools/Makefile.in --- libdbusmenu-0.3.6/tools/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/tools/Makefile.in 2010-08-26 21:12:24.000000000 +0100 @@ -55,7 +55,8 @@ dbusmenu_dumper_OBJECTS = $(am_dbusmenu_dumper_OBJECTS) am__DEPENDENCIES_1 = dbusmenu_dumper_DEPENDENCIES = \ - ../libdbusmenu-glib/libdbusmenu-glib.la $(am__DEPENDENCIES_1) + ../libdbusmenu-glib/libdbusmenu-glib.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent @@ -173,6 +174,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -253,6 +256,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ @@ -325,11 +330,14 @@ dbusmenu_dumper_CFLAGS = \ -I $(srcdir)/.. \ - $(DBUSMENUGLIB_CFLAGS) -Wall -Werror + $(DBUSMENUGLIB_CFLAGS) \ + $(DBUSMENUDUMPER_CFLAGS) \ + -Wall -Werror dbusmenu_dumper_LDADD = \ ../libdbusmenu-glib/libdbusmenu-glib.la \ - $(DBUSMENUGLIB_LIBS) + $(DBUSMENUGLIB_LIBS) \ + $(DBUSMENUDUMPER_LIBS) doc_DATA = README.dbusmenu-bench EXTRA_DIST = \ diff -Nru libdbusmenu-0.3.6/tools/testapp/Makefile.in libdbusmenu-0.3.12/tools/testapp/Makefile.in --- libdbusmenu-0.3.6/tools/testapp/Makefile.in 2010-07-15 15:30:10.000000000 +0100 +++ libdbusmenu-0.3.12/tools/testapp/Makefile.in 2010-08-26 21:12:24.000000000 +0100 @@ -110,6 +110,8 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ +DBUSMENUDUMPER_CFLAGS = @DBUSMENUDUMPER_CFLAGS@ +DBUSMENUDUMPER_LIBS = @DBUSMENUDUMPER_LIBS@ DBUSMENUGLIB_CFLAGS = @DBUSMENUGLIB_CFLAGS@ DBUSMENUGLIB_LIBS = @DBUSMENUGLIB_LIBS@ DBUSMENUGTK_CFLAGS = @DBUSMENUGTK_CFLAGS@ @@ -190,6 +192,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@

Returns :

A pixbuf or NULL to signal error. + A pixbuf or NULL to signal error.