diff options
author | Ted Gould <ted@gould.cx> | 2011-08-24 15:56:22 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-08-24 15:56:22 -0500 |
commit | 7fa57530eacea8ffe878782a7d01fd03f4f061bd (patch) | |
tree | 6d3726a4272558cd02dd82c066843b4e062f89e0 | |
parent | 97d93f51f464eb88bdf46c902d5be61a0cae41bb (diff) | |
parent | f680665fb387e01302d6abcf3a5b4ad90001afd7 (diff) | |
download | libdbusmenu-7fa57530eacea8ffe878782a7d01fd03f4f061bd.tar.gz libdbusmenu-7fa57530eacea8ffe878782a7d01fd03f4f061bd.tar.bz2 libdbusmenu-7fa57530eacea8ffe878782a7d01fd03f4f061bd.zip |
* New upstream release.
* Add in a property for setting the menuitem disposition
40 files changed, 1259 insertions, 209 deletions
@@ -1,5 +1,89 @@ # Generated by Makefile. Do not edit. +2011-08-24 Ted Gould <ted@gould.cx> + + 0.4.91 + +2011-08-24 Ted Gould <ted@gould.cx> + + Adding discriptive text to the enums + +2011-08-24 Ted Gould <ted@gould.cx> + + Ignoring the enum types as well + +2011-08-24 Ted Gould <ted@gould.cx> + + Adding disposition entries to the docs + +2011-08-23 Ted Gould <ted@gould.cx> + + Add in a disposition for menuitems + +2011-08-23 Ted Gould <ted@gould.cx> + + Fixing the color names + +2011-08-22 Ted Gould <ted@gould.cx> + + Fixing the comparision so that we don't block updates + +2011-08-22 Ted Gould <ted@gould.cx> + + Adding in a mnemonic test + +2011-08-22 Ted Gould <ted@gould.cx> + + Adding disposition tests + +2011-08-22 Ted Gould <ted@gould.cx> + + Create a local string with a color if the disposition is non-normal + +2011-08-22 Ted Gould <ted@gould.cx> + + Implement the setter and getter for disposition + +2011-08-22 Ted Gould <ted@gould.cx> + + Add in a disposition and set it at init + +2011-08-22 Ted Gould <ted@gould.cx> + + Set the disposition from the value given and from the enum. + +2011-08-22 Ted Gould <ted@gould.cx> + + Make sure that we get rid of the enum stuff as well + +2011-08-22 Ted Gould <ted@gould.cx> + + Adding in a disposition type and get proper enum generation + +2011-08-22 Ted Gould <ted@gould.cx> + + Adding an enum for the the disposition and functions to set and get it + +2011-08-22 Ted Gould <ted@gould.cx> + + Adding infrastructure to watch for the disposition property. + +2011-08-22 Ted Gould <ted@gould.cx> + + Putting in some headers to make this file easier to read + +2011-08-22 Ted Gould <ted@gould.cx> + + Updating the protocol spec + +2011-08-22 Ted Gould <ted@gould.cx> + + Adding a disposition property in to the header and defaults + +2011-08-23 Ted Gould <ted@gould.cx> + + Fix docs on which GTK is default + 2011-06-20 Ted Gould <ted@gould.cx> 0.4.90 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for libdbusmenu 0.4.90. +# Generated by GNU Autoconf 2.68 for libdbusmenu 0.4.91. # # Report bugs to <ted@canonical.com>. # @@ -572,8 +572,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libdbusmenu' PACKAGE_TARNAME='libdbusmenu' -PACKAGE_VERSION='0.4.90' -PACKAGE_STRING='libdbusmenu 0.4.90' +PACKAGE_VERSION='0.4.91' +PACKAGE_STRING='libdbusmenu 0.4.91' PACKAGE_BUGREPORT='ted@canonical.com' PACKAGE_URL='' @@ -1413,7 +1413,7 @@ if test "$ac_init_help" = "long"; then # 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.4.90 to adapt to many kinds of systems. +\`configure' configures libdbusmenu 0.4.91 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1483,7 +1483,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdbusmenu 0.4.90:";; + short | recursive ) echo "Configuration of libdbusmenu 0.4.91:";; esac cat <<\_ACEOF @@ -1526,7 +1526,7 @@ Optional Packages: --with-omf-dir=DIR path to OMF files --with-help-formats=FORMATS list of formats - --with-gtk Which version of gtk to use [default=2] + --with-gtk Which version of gtk to use [default=3] Some influential environment variables: CC C compiler command @@ -1625,7 +1625,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdbusmenu configure 0.4.90 +libdbusmenu configure 0.4.91 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1996,7 +1996,7 @@ cat >config.log <<_ACEOF 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.4.90, which was +It was created by libdbusmenu $as_me 0.4.91, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2817,7 +2817,7 @@ fi # Define the identity of the package. PACKAGE=libdbusmenu - VERSION=0.4.90 + VERSION=0.4.91 # Some tools Automake needs. @@ -14101,7 +14101,7 @@ fi ########################### LIBDBUSMENU_CURRENT=4 -LIBDBUSMENU_REVISION=0 +LIBDBUSMENU_REVISION=1 LIBDBUSMENU_AGE=0 @@ -15435,7 +15435,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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.4.90, which was +This file was extended by libdbusmenu $as_me 0.4.91, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15501,7 +15501,7 @@ _ACEOF 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.4.90 +libdbusmenu config.status 0.4.91 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 465d8bf..e0e9fc9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.4.90, ted@canonical.com) +AC_INIT(libdbusmenu, 0.4.91, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.4.90, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.4.91, [-Wno-portability]) AM_MAINTAINER_MODE @@ -60,7 +60,7 @@ GTK3_REQUIRED_VERSION=2.91 AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk], - [Which version of gtk to use @<:@default=2@:>@])], + [Which version of gtk to use @<:@default=3@:>@])], [], [with_gtk=3]) AS_IF([test "x$with_gtk" = x3], @@ -134,7 +134,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc]) ########################### LIBDBUSMENU_CURRENT=4 -LIBDBUSMENU_REVISION=0 +LIBDBUSMENU_REVISION=1 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) diff --git a/debian/changelog b/debian/changelog index 7e3e034..7730e13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libdbusmenu (0.4.91-0ubuntu1~ppa1) UNRELEASED; urgency=low + + * New upstream release. + * Add in a property for setting the menuitem disposition + + -- Ted Gould <ted@ubuntu.com> Wed, 24 Aug 2011 15:55:27 -0500 + libdbusmenu (0.4.90-0ubuntu4) oneiric; urgency=low * debian/rules: diff --git a/docs/libdbusmenu-glib/reference/html/api-index-full.html b/docs/libdbusmenu-glib/reference/html/api-index-full.html index 8d3abdb..bc8d9d4 100644 --- a/docs/libdbusmenu-glib/reference/html/api-index-full.html +++ b/docs/libdbusmenu-glib/reference/html/api-index-full.html @@ -180,6 +180,22 @@ </dt> <dd></dd> <dt> +<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_ALERT">DBUSMENU_MENUITEM_DISPOSITION_ALERT</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> +</dt> +<dd></dd> +<dt> +<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE">DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> +</dt> +<dd></dd> +<dt> +<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_NORMAL">DBUSMENU_MENUITEM_DISPOSITION_NORMAL</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> +</dt> +<dd></dd> +<dt> +<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_WARNING">DBUSMENU_MENUITEM_DISPOSITION_WARNING</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" title="DBUSMENU_MENUITEM_EVENT_ACTIVATED">DBUSMENU_MENUITEM_EVENT_ACTIVATED</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> </dt> <dd></dd> @@ -292,6 +308,10 @@ </dt> <dd></dd> <dt> +<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" title="DBUSMENU_MENUITEM_PROP_DISPOSITION">DBUSMENU_MENUITEM_PROP_DISPOSITION</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-ENABLED:CAPS" title="DBUSMENU_MENUITEM_PROP_ENABLED">DBUSMENU_MENUITEM_PROP_ENABLED</a>, macro in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">DbusmenuMenuitem</a> </dt> <dd></dd> diff --git a/docs/libdbusmenu-glib/reference/html/index.sgml b/docs/libdbusmenu-glib/reference/html/index.sgml index 5446760..bdd8312 100644 --- a/docs/libdbusmenu-glib/reference/html/index.sgml +++ b/docs/libdbusmenu-glib/reference/html/index.sgml @@ -55,6 +55,7 @@ <ANCHOR id="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"> +<ANCHOR id="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS"> @@ -66,6 +67,10 @@ <ANCHOR id="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS"> +<ANCHOR id="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS"> +<ANCHOR id="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS"> +<ANCHOR id="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS"> +<ANCHOR id="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"> <ANCHOR id="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS" href="libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"> diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html index 27b0611..4d73133 100644 --- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html +++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html @@ -64,6 +64,7 @@ Unstable, unless otherwise indicated #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS" title="DBUSMENU_MENUITEM_PROP_TOGGLE_STATE">DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS" title="DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY">DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS" title="DBUSMENU_MENUITEM_PROP_SHORTCUT">DBUSMENU_MENUITEM_PROP_SHORTCUT</a> +#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" title="DBUSMENU_MENUITEM_PROP_DISPOSITION">DBUSMENU_MENUITEM_PROP_DISPOSITION</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS" title="DBUSMENU_MENUITEM_TOGGLE_CHECK">DBUSMENU_MENUITEM_TOGGLE_CHECK</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS" title="DBUSMENU_MENUITEM_TOGGLE_RADIO">DBUSMENU_MENUITEM_TOGGLE_RADIO</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS" title="DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED">DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</a> @@ -75,6 +76,10 @@ Unstable, unless otherwise indicated #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS" title="DBUSMENU_MENUITEM_SHORTCUT_CONTROL">DBUSMENU_MENUITEM_SHORTCUT_CONTROL</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS" title="DBUSMENU_MENUITEM_SHORTCUT_SHIFT">DBUSMENU_MENUITEM_SHORTCUT_SHIFT</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS" title="DBUSMENU_MENUITEM_SHORTCUT_SUPER">DBUSMENU_MENUITEM_SHORTCUT_SUPER</a> +#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_NORMAL">DBUSMENU_MENUITEM_DISPOSITION_NORMAL</a> +#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE">DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</a> +#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_WARNING">DBUSMENU_MENUITEM_DISPOSITION_WARNING</a> +#define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS" title="DBUSMENU_MENUITEM_DISPOSITION_ALERT">DBUSMENU_MENUITEM_DISPOSITION_ALERT</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" title="DBUSMENU_MENUITEM_EVENT_ACTIVATED">DBUSMENU_MENUITEM_EVENT_ACTIVATED</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS" title="DBUSMENU_MENUITEM_EVENT_CLOSED">DBUSMENU_MENUITEM_EVENT_CLOSED</a> #define <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS" title="DBUSMENU_MENUITEM_EVENT_OPENED">DBUSMENU_MENUITEM_EVENT_OPENED</a> @@ -386,6 +391,16 @@ libdbusmenu-gtk library is used with the function <a href="/usr/share/gtk-doc/ht </div> <hr> <div class="refsect2"> +<a name="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"></a><h3>DBUSMENU_MENUITEM_PROP_DISPOSITION</h3> +<pre class="programlisting">#define DBUSMENU_MENUITEM_PROP_DISPOSITION "disposition" +</pre> +<p> +<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="struct DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> property to tell what type of information that the +menu item is displaying to the user. Type: <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS"><span class="type">G_VARIANT_TYPE_STRING</span></a> +</p> +</div> +<hr> +<div class="refsect2"> <a name="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"></a><h3>DBUSMENU_MENUITEM_TOGGLE_CHECK</h3> <pre class="programlisting">#define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark" </pre> @@ -496,6 +511,49 @@ super key. </div> <hr> <div class="refsect2"> +<a name="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS"></a><h3>DBUSMENU_MENUITEM_DISPOSITION_NORMAL</h3> +<pre class="programlisting">#define DBUSMENU_MENUITEM_DISPOSITION_NORMAL "normal" +</pre> +<p> +Used in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" title="DBUSMENU_MENUITEM_PROP_DISPOSITION"><span class="type">DBUSMENU_MENUITEM_PROP_DISPOSITION</span></a> to have a menu +item displayed in the normal manner. Default value. +</p> +</div> +<hr> +<div class="refsect2"> +<a name="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS"></a><h3>DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</h3> +<pre class="programlisting">#define DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE "informative" +</pre> +<p> +Used in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" title="DBUSMENU_MENUITEM_PROP_DISPOSITION"><span class="type">DBUSMENU_MENUITEM_PROP_DISPOSITION</span></a> to have a menu +item displayed in a way that conveys it's giving additional +information to the user. +</p> +</div> +<hr> +<div class="refsect2"> +<a name="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS"></a><h3>DBUSMENU_MENUITEM_DISPOSITION_WARNING</h3> +<pre class="programlisting">#define DBUSMENU_MENUITEM_DISPOSITION_WARNING "warning" +</pre> +<p> +Used in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" title="DBUSMENU_MENUITEM_PROP_DISPOSITION"><span class="type">DBUSMENU_MENUITEM_PROP_DISPOSITION</span></a> to have a menu +item displayed in a way that conveys it's giving a warning +to the user. +</p> +</div> +<hr> +<div class="refsect2"> +<a name="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS"></a><h3>DBUSMENU_MENUITEM_DISPOSITION_ALERT</h3> +<pre class="programlisting">#define DBUSMENU_MENUITEM_DISPOSITION_ALERT "alert" +</pre> +<p> +Used in <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" title="DBUSMENU_MENUITEM_PROP_DISPOSITION"><span class="type">DBUSMENU_MENUITEM_PROP_DISPOSITION</span></a> to have a menu +item displayed in a way that conveys it's giving an alert +to the user. +</p> +</div> +<hr> +<div class="refsect2"> <a name="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"></a><h3>DBUSMENU_MENUITEM_EVENT_ACTIVATED</h3> <pre class="programlisting">#define DBUSMENU_MENUITEM_EVENT_ACTIVATED "clicked" </pre> diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp index 7abce72..00d9219 100644 --- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp +++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp @@ -57,6 +57,7 @@ <function name="DBUSMENU_MENUITEM_PROP_TOGGLE_STATE" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"/> <function name="DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"/> <function name="DBUSMENU_MENUITEM_PROP_SHORTCUT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"/> + <function name="DBUSMENU_MENUITEM_PROP_DISPOSITION" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"/> <function name="DBUSMENU_MENUITEM_TOGGLE_CHECK" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"/> <function name="DBUSMENU_MENUITEM_TOGGLE_RADIO" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS"/> <function name="DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS"/> @@ -68,6 +69,10 @@ <function name="DBUSMENU_MENUITEM_SHORTCUT_CONTROL" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS"/> <function name="DBUSMENU_MENUITEM_SHORTCUT_SHIFT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS"/> <function name="DBUSMENU_MENUITEM_SHORTCUT_SUPER" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS"/> + <function name="DBUSMENU_MENUITEM_DISPOSITION_NORMAL" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS"/> + <function name="DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS"/> + <function name="DBUSMENU_MENUITEM_DISPOSITION_WARNING" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS"/> + <function name="DBUSMENU_MENUITEM_DISPOSITION_ALERT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS"/> <function name="DBUSMENU_MENUITEM_EVENT_ACTIVATED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"/> <function name="DBUSMENU_MENUITEM_EVENT_CLOSED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"/> <function name="DBUSMENU_MENUITEM_EVENT_OPENED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"/> diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2 b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2 index cb644ad..375b3ac 100644 --- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2 +++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2 @@ -57,6 +57,7 @@ <keyword type="macro" name="DBUSMENU_MENUITEM_PROP_TOGGLE_STATE" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_PROP_SHORTCUT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"/> + <keyword type="macro" name="DBUSMENU_MENUITEM_PROP_DISPOSITION" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_TOGGLE_CHECK" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_TOGGLE_RADIO" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS"/> @@ -68,6 +69,10 @@ <keyword type="macro" name="DBUSMENU_MENUITEM_SHORTCUT_CONTROL" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_SHORTCUT_SHIFT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_SHORTCUT_SUPER" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS"/> + <keyword type="macro" name="DBUSMENU_MENUITEM_DISPOSITION_NORMAL" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS"/> + <keyword type="macro" name="DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS"/> + <keyword type="macro" name="DBUSMENU_MENUITEM_DISPOSITION_WARNING" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS"/> + <keyword type="macro" name="DBUSMENU_MENUITEM_DISPOSITION_ALERT" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_EVENT_ACTIVATED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_EVENT_CLOSED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"/> <keyword type="macro" name="DBUSMENU_MENUITEM_EVENT_OPENED" link="libdbusmenu-glib-DbusmenuMenuitem.html#DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"/> diff --git a/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt b/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt index 4d1e50a..d95ec4c 100644 --- a/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt +++ b/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt @@ -59,6 +59,7 @@ DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE DBUSMENU_MENUITEM_PROP_TOGGLE_STATE DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY DBUSMENU_MENUITEM_PROP_SHORTCUT +DBUSMENU_MENUITEM_PROP_DISPOSITION DBUSMENU_MENUITEM_TOGGLE_CHECK DBUSMENU_MENUITEM_TOGGLE_RADIO DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED @@ -70,6 +71,10 @@ DBUSMENU_MENUITEM_SHORTCUT_ALT DBUSMENU_MENUITEM_SHORTCUT_CONTROL DBUSMENU_MENUITEM_SHORTCUT_SHIFT DBUSMENU_MENUITEM_SHORTCUT_SUPER +DBUSMENU_MENUITEM_DISPOSITION_NORMAL +DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE +DBUSMENU_MENUITEM_DISPOSITION_WARNING +DBUSMENU_MENUITEM_DISPOSITION_ALERT DBUSMENU_MENUITEM_EVENT_ACTIVATED DBUSMENU_MENUITEM_EVENT_CLOSED DBUSMENU_MENUITEM_EVENT_OPENED diff --git a/docs/libdbusmenu-glib/reference/tmpl/client.sgml b/docs/libdbusmenu-glib/reference/tmpl/client.sgml index d685c48..76c0d19 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/client.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/client.sgml @@ -9,11 +9,13 @@ DbusmenuClient </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml index cbea574..503c293 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml @@ -9,11 +9,13 @@ DbusmenuMenuitemProxy </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml index d012503..afeeb6c 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml @@ -9,11 +9,13 @@ DbusmenuMenuitem </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> @@ -160,6 +162,13 @@ DbusmenuMenuitem +<!-- ##### MACRO DBUSMENU_MENUITEM_PROP_DISPOSITION ##### --> +<para> + +</para> + + + <!-- ##### MACRO DBUSMENU_MENUITEM_TOGGLE_CHECK ##### --> <para> @@ -237,6 +246,34 @@ DbusmenuMenuitem +<!-- ##### MACRO DBUSMENU_MENUITEM_DISPOSITION_NORMAL ##### --> +<para> + +</para> + + + +<!-- ##### MACRO DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE ##### --> +<para> + +</para> + + + +<!-- ##### MACRO DBUSMENU_MENUITEM_DISPOSITION_WARNING ##### --> +<para> + +</para> + + + +<!-- ##### MACRO DBUSMENU_MENUITEM_DISPOSITION_ALERT ##### --> +<para> + +</para> + + + <!-- ##### MACRO DBUSMENU_MENUITEM_EVENT_ACTIVATED ##### --> <para> diff --git a/docs/libdbusmenu-glib/reference/tmpl/server.sgml b/docs/libdbusmenu-glib/reference/tmpl/server.sgml index f9134af..ca9c51e 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/server.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/server.sgml @@ -9,11 +9,13 @@ DbusmenuServer </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-glib/reference/tmpl/types.sgml b/docs/libdbusmenu-glib/reference/tmpl/types.sgml index 0089955..8a5e419 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/types.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/types.sgml @@ -9,11 +9,13 @@ Types </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-glib/reference/version.xml b/docs/libdbusmenu-glib/reference/version.xml index d881a03..30f1d8d 100644 --- a/docs/libdbusmenu-glib/reference/version.xml +++ b/docs/libdbusmenu-glib/reference/version.xml @@ -1 +1 @@ -0.4.90 +0.4.91 diff --git a/docs/libdbusmenu-glib/reference/xml/api-index-full.xml b/docs/libdbusmenu-glib/reference/xml/api-index-full.xml index 23e8734..39ee0e4 100644 --- a/docs/libdbusmenu-glib/reference/xml/api-index-full.xml +++ b/docs/libdbusmenu-glib/reference/xml/api-index-full.xml @@ -44,6 +44,10 @@ <indexentry><primaryie linkends="dbusmenu-menuitem-child-find"><link linkend="dbusmenu-menuitem-child-find">dbusmenu_menuitem_child_find</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="dbusmenu-menuitem-child-prepend"><link linkend="dbusmenu-menuitem-child-prepend">dbusmenu_menuitem_child_prepend</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="dbusmenu-menuitem-child-reorder"><link linkend="dbusmenu-menuitem-child-reorder">dbusmenu_menuitem_child_reorder</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS"><link linkend="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS">DBUSMENU_MENUITEM_DISPOSITION_ALERT</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS"><link linkend="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS">DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS"><link linkend="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS">DBUSMENU_MENUITEM_DISPOSITION_NORMAL</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS"><link linkend="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS">DBUSMENU_MENUITEM_DISPOSITION_WARNING</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"><link linkend="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS">DBUSMENU_MENUITEM_EVENT_ACTIVATED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS"><link linkend="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS">DBUSMENU_MENUITEM_EVENT_CLOSED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS"><link linkend="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS">DBUSMENU_MENUITEM_EVENT_OPENED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> @@ -72,6 +76,7 @@ <indexentry><primaryie linkends="dbusmenu-menuitem-property-set-int"><link linkend="dbusmenu-menuitem-property-set-int">dbusmenu_menuitem_property_set_int</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="dbusmenu-menuitem-property-set-variant"><link linkend="dbusmenu-menuitem-property-set-variant">dbusmenu_menuitem_property_set_variant</link>, function in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"><link linkend="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS">DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"><link linkend="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS">DBUSMENU_MENUITEM_PROP_DISPOSITION</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS"><link linkend="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS">DBUSMENU_MENUITEM_PROP_ENABLED</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS"><link linkend="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS">DBUSMENU_MENUITEM_PROP_ICON_DATA</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> <indexentry><primaryie linkends="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS"><link linkend="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS">DBUSMENU_MENUITEM_PROP_ICON_NAME</link>, macro in <link linkend="libdbusmenu-glib-DbusmenuMenuitem">DbusmenuMenuitem</link></primaryie></indexentry> diff --git a/docs/libdbusmenu-glib/reference/xml/menuitem.xml b/docs/libdbusmenu-glib/reference/xml/menuitem.xml index fefad35..a45a5e4 100644 --- a/docs/libdbusmenu-glib/reference/xml/menuitem.xml +++ b/docs/libdbusmenu-glib/reference/xml/menuitem.xml @@ -47,6 +47,7 @@ Unstable, unless otherwise indicated #define <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS">DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</link> #define <link linkend="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS">DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</link> #define <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS">DBUSMENU_MENUITEM_PROP_SHORTCUT</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS">DBUSMENU_MENUITEM_PROP_DISPOSITION</link> #define <link linkend="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS">DBUSMENU_MENUITEM_TOGGLE_CHECK</link> #define <link linkend="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS">DBUSMENU_MENUITEM_TOGGLE_RADIO</link> #define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</link> @@ -58,6 +59,10 @@ Unstable, unless otherwise indicated #define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS">DBUSMENU_MENUITEM_SHORTCUT_CONTROL</link> #define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS">DBUSMENU_MENUITEM_SHORTCUT_SHIFT</link> #define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS">DBUSMENU_MENUITEM_SHORTCUT_SUPER</link> +#define <link linkend="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS">DBUSMENU_MENUITEM_DISPOSITION_NORMAL</link> +#define <link linkend="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS">DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</link> +#define <link linkend="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS">DBUSMENU_MENUITEM_DISPOSITION_WARNING</link> +#define <link linkend="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS">DBUSMENU_MENUITEM_DISPOSITION_ALERT</link> #define <link linkend="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS">DBUSMENU_MENUITEM_EVENT_ACTIVATED</link> #define <link linkend="DBUSMENU-MENUITEM-EVENT-CLOSED:CAPS">DBUSMENU_MENUITEM_EVENT_CLOSED</link> #define <link linkend="DBUSMENU-MENUITEM-EVENT-OPENED:CAPS">DBUSMENU_MENUITEM_EVENT_OPENED</link> @@ -349,6 +354,15 @@ Type: <link linkend="G-VARIANT-TYPE-ARRAY:CAPS"><type>G_VARIANT_TYPE_ARRAY</type It is recommended that this is not set directly but instead the libdbusmenu-gtk library is used with the function <link linkend="dbusmenu-menuitem-property-set-shortcut"><function>dbusmenu_menuitem_property_set_shortcut()</function></link> </para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_DISPOSITION</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"><primary>DBUSMENU_MENUITEM_PROP_DISPOSITION</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_DISPOSITION "disposition" +</programlisting> +<para> +<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property to tell what type of information that the +menu item is displaying to the user. Type: <link linkend="G-VARIANT-TYPE-STRING:CAPS"><type>G_VARIANT_TYPE_STRING</type></link> +</para></refsect2> <refsect2 id="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS" role="macro"> <title>DBUSMENU_MENUITEM_TOGGLE_CHECK</title> <indexterm zone="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_CHECK</primary></indexterm> @@ -448,6 +462,45 @@ shift key. Used in <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><type>DBUSMENU_MENUITEM_PROP_SHORTCUT</type></link> to represent the super key. </para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_DISPOSITION_NORMAL</title> +<indexterm zone="DBUSMENU-MENUITEM-DISPOSITION-NORMAL:CAPS"><primary>DBUSMENU_MENUITEM_DISPOSITION_NORMAL</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_DISPOSITION_NORMAL "normal" +</programlisting> +<para> +Used in <link linkend="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"><type>DBUSMENU_MENUITEM_PROP_DISPOSITION</type></link> to have a menu +item displayed in the normal manner. Default value. +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</title> +<indexterm zone="DBUSMENU-MENUITEM-DISPOSITION-INFORMATIVE:CAPS"><primary>DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE "informative" +</programlisting> +<para> +Used in <link linkend="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"><type>DBUSMENU_MENUITEM_PROP_DISPOSITION</type></link> to have a menu +item displayed in a way that conveys it's giving additional +information to the user. +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_DISPOSITION_WARNING</title> +<indexterm zone="DBUSMENU-MENUITEM-DISPOSITION-WARNING:CAPS"><primary>DBUSMENU_MENUITEM_DISPOSITION_WARNING</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_DISPOSITION_WARNING "warning" +</programlisting> +<para> +Used in <link linkend="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"><type>DBUSMENU_MENUITEM_PROP_DISPOSITION</type></link> to have a menu +item displayed in a way that conveys it's giving a warning +to the user. +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_DISPOSITION_ALERT</title> +<indexterm zone="DBUSMENU-MENUITEM-DISPOSITION-ALERT:CAPS"><primary>DBUSMENU_MENUITEM_DISPOSITION_ALERT</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_DISPOSITION_ALERT "alert" +</programlisting> +<para> +Used in <link linkend="DBUSMENU-MENUITEM-PROP-DISPOSITION:CAPS"><type>DBUSMENU_MENUITEM_PROP_DISPOSITION</type></link> to have a menu +item displayed in a way that conveys it's giving an alert +to the user. +</para></refsect2> <refsect2 id="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS" role="macro"> <title>DBUSMENU_MENUITEM_EVENT_ACTIVATED</title> <indexterm zone="DBUSMENU-MENUITEM-EVENT-ACTIVATED:CAPS"><primary>DBUSMENU_MENUITEM_EVENT_ACTIVATED</primary></indexterm> diff --git a/docs/libdbusmenu-gtk/reference/Makefile.am b/docs/libdbusmenu-gtk/reference/Makefile.am index 06d0009..62f80ba 100644 --- a/docs/libdbusmenu-gtk/reference/Makefile.am +++ b/docs/libdbusmenu-gtk/reference/Makefile.am @@ -54,7 +54,7 @@ CFILE_GLOB=$(top_srcdir)/libdbusmenu-gtk/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES=genericmenuitem.h +IGNORE_HFILES=genericmenuitem.h genericmenuitem-enum-types.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png diff --git a/docs/libdbusmenu-gtk/reference/Makefile.in b/docs/libdbusmenu-gtk/reference/Makefile.in index 3df5ca3..ac27d08 100644 --- a/docs/libdbusmenu-gtk/reference/Makefile.in +++ b/docs/libdbusmenu-gtk/reference/Makefile.in @@ -287,7 +287,7 @@ CFILE_GLOB = $(top_srcdir)/libdbusmenu-gtk/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES = genericmenuitem.h +IGNORE_HFILES = genericmenuitem.h genericmenuitem-enum-types.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png diff --git a/docs/libdbusmenu-gtk/reference/tmpl/client.sgml b/docs/libdbusmenu-gtk/reference/tmpl/client.sgml index df48e31..e4b3efb 100644 --- a/docs/libdbusmenu-gtk/reference/tmpl/client.sgml +++ b/docs/libdbusmenu-gtk/reference/tmpl/client.sgml @@ -9,11 +9,13 @@ DbusmenuGtkClient </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-gtk/reference/tmpl/libdbusmenu-gtk-unused.sgml b/docs/libdbusmenu-gtk/reference/tmpl/libdbusmenu-gtk-unused.sgml index 46b44fe..e69de29 100644 --- a/docs/libdbusmenu-gtk/reference/tmpl/libdbusmenu-gtk-unused.sgml +++ b/docs/libdbusmenu-gtk/reference/tmpl/libdbusmenu-gtk-unused.sgml @@ -1,74 +0,0 @@ -<!-- ##### SECTION ./tmpl/serializablemenuitem.sgml:Image ##### --> - - - -<!-- ##### SECTION ./tmpl/serializablemenuitem.sgml:Long_Description ##### --> -<para> - -</para> - - -<!-- ##### SECTION ./tmpl/serializablemenuitem.sgml:See_Also ##### --> -<para> - -</para> - - -<!-- ##### SECTION ./tmpl/serializablemenuitem.sgml:Short_Description ##### --> - - - -<!-- ##### SECTION ./tmpl/serializablemenuitem.sgml:Stability_Level ##### --> - - - -<!-- ##### SECTION ./tmpl/serializablemenuitem.sgml:Title ##### --> -DbusmenuGtkSerializableMenuItem - - -<!-- ##### MACRO DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM ##### --> -<para> - -</para> - - -<!-- ##### STRUCT DbusmenuGtkSerializableMenuItemClass ##### --> -<para> - -</para> - -@parent_class: -@get_type_string: -@get_default_properties: -@build_dbusmenu_menuitem: -@_dbusmenu_gtk_serializable_menu_item_reserved1: -@_dbusmenu_gtk_serializable_menu_item_reserved2: -@_dbusmenu_gtk_serializable_menu_item_reserved3: -@_dbusmenu_gtk_serializable_menu_item_reserved4: -@_dbusmenu_gtk_serializable_menu_item_reserved5: -@_dbusmenu_gtk_serializable_menu_item_reserved6: - -<!-- ##### FUNCTION dbusmenu_gtk_serializable_menu_item_build_menuitem ##### --> -<para> - -</para> - -@smi: -@Returns: - -<!-- ##### FUNCTION dbusmenu_gtk_serializable_menu_item_register_to_client ##### --> -<para> - -</para> - -@client: -@item_type: - -<!-- ##### FUNCTION dbusmenu_gtk_serializable_menu_item_set_menuitem ##### --> -<para> - -</para> - -@smi: -@mi: - diff --git a/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml b/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml index f79c35e..4e2d89d 100644 --- a/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml +++ b/docs/libdbusmenu-gtk/reference/tmpl/menu.sgml @@ -9,11 +9,13 @@ DbusmenuGtkMenu </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml b/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml index 536e38c..eb30964 100644 --- a/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml +++ b/docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml @@ -9,11 +9,13 @@ menuitem </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-gtk/reference/tmpl/parser.sgml b/docs/libdbusmenu-gtk/reference/tmpl/parser.sgml index e3a4579..f4ef7bb 100644 --- a/docs/libdbusmenu-gtk/reference/tmpl/parser.sgml +++ b/docs/libdbusmenu-gtk/reference/tmpl/parser.sgml @@ -9,11 +9,13 @@ parser </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-gtk/reference/tmpl/serializablemenuitem.sgml b/docs/libdbusmenu-gtk/reference/tmpl/serializablemenuitem.sgml deleted file mode 100644 index 54e3588..0000000 --- a/docs/libdbusmenu-gtk/reference/tmpl/serializablemenuitem.sgml +++ /dev/null @@ -1,72 +0,0 @@ -<!-- ##### SECTION Title ##### --> -DbusmenuGtkSerializableMenuItem - -<!-- ##### SECTION Short_Description ##### --> - - -<!-- ##### SECTION Long_Description ##### --> -<para> - -</para> - -<!-- ##### SECTION See_Also ##### --> -<para> - -</para> - -<!-- ##### SECTION Stability_Level ##### --> - - -<!-- ##### SECTION Image ##### --> - - -<!-- ##### MACRO DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM ##### --> -<para> - -</para> - - - -<!-- ##### STRUCT DbusmenuGtkSerializableMenuItemClass ##### --> -<para> - -</para> - -@parent_class: -@get_type_string: -@get_default_properties: -@build_dbusmenu_menuitem: -@_dbusmenu_gtk_serializable_menu_item_reserved1: -@_dbusmenu_gtk_serializable_menu_item_reserved2: -@_dbusmenu_gtk_serializable_menu_item_reserved3: -@_dbusmenu_gtk_serializable_menu_item_reserved4: -@_dbusmenu_gtk_serializable_menu_item_reserved5: -@_dbusmenu_gtk_serializable_menu_item_reserved6: - -<!-- ##### FUNCTION dbusmenu_gtk_serializable_menu_item_build_menuitem ##### --> -<para> - -</para> - -@smi: -@Returns: - - -<!-- ##### FUNCTION dbusmenu_gtk_serializable_menu_item_register_to_client ##### --> -<para> - -</para> - -@client: -@item_type: - - -<!-- ##### FUNCTION dbusmenu_gtk_serializable_menu_item_set_menuitem ##### --> -<para> - -</para> - -@smi: -@mi: - - diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml index d881a03..30f1d8d 100644 --- a/docs/libdbusmenu-gtk/reference/version.xml +++ b/docs/libdbusmenu-gtk/reference/version.xml @@ -1 +1 @@ -0.4.90 +0.4.91 diff --git a/libdbusmenu-glib/dbus-menu.xml b/libdbusmenu-glib/dbus-menu.xml index a36c148..4b5a5d8 100644 --- a/libdbusmenu-glib/dbus-menu.xml +++ b/libdbusmenu-glib/dbus-menu.xml @@ -157,6 +157,19 @@ License version 3 and version 2.1 along with this program. If not, see </td> <td>""</td> </tr> + <tr> + <td>disposition</td> + <td>string</td> + <td> + How the menuitem feels the information it's displaying to the + user should be presented. + - "normal" a standard menu item + - "informative" providing additional information to the user + - "warning" looking at potentially harmful results + - "alert" something bad could potentially happen + </td> + <td>"normal"</td> + </tr> </table> Vendor specific properties can be added by prefixing them with diff --git a/libdbusmenu-glib/defaults.c b/libdbusmenu-glib/defaults.c index aa479b1..a5caf0b 100644 --- a/libdbusmenu-glib/defaults.c +++ b/libdbusmenu-glib/defaults.c @@ -87,6 +87,7 @@ dbusmenu_defaults_init (DbusmenuDefaults *self) dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, G_VARIANT_TYPE_INT32, NULL); dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_SHORTCUT, G_VARIANT_TYPE("aas"), NULL); dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY, G_VARIANT_TYPE_STRING, NULL); + dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_DISPOSITION, G_VARIANT_TYPE_STRING, g_variant_new_string(DBUSMENU_MENUITEM_DISPOSITION_NORMAL)); /* Separator defaults */ dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_SEPARATOR, DBUSMENU_MENUITEM_PROP_VISIBLE, G_VARIANT_TYPE_BOOLEAN, g_variant_new_boolean(TRUE)); diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h index afd1d4e..985e1a3 100644 --- a/libdbusmenu-glib/menuitem.h +++ b/libdbusmenu-glib/menuitem.h @@ -41,7 +41,9 @@ G_BEGIN_DECLS #define DBUSMENU_IS_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_MENUITEM)) #define DBUSMENU_MENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_MENUITEM, DbusmenuMenuitemClass)) - +/* ***************************************** */ +/* ********* GLib Object Signals ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED: * @@ -103,6 +105,9 @@ G_BEGIN_DECLS */ #define DBUSMENU_MENUITEM_SIGNAL_EVENT "event" +/* ***************************************** */ +/* ********* Menuitem Properties ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_PROP_TYPE: * @@ -184,7 +189,17 @@ G_BEGIN_DECLS * #DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU. Type: #G_VARIANT_TYPE_STRING */ #define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display" +/** + * DBUSMENU_MENUITEM_PROP_DISPOSITION: + * + * #DbusmenuMenuitem property to tell what type of information that the + * menu item is displaying to the user. Type: #G_VARIANT_TYPE_STRING + */ +#define DBUSMENU_MENUITEM_PROP_DISPOSITION "disposition" +/* ***************************************** */ +/* ********* Toggle Values ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_TOGGLE_CHECK: * @@ -200,6 +215,9 @@ G_BEGIN_DECLS */ #define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio" +/* ***************************************** */ +/* ********* Toggle States ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED: * @@ -222,6 +240,9 @@ G_BEGIN_DECLS */ #define DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN -1 +/* ***************************************** */ +/* ********* Icon specials ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_ICON_NAME_BLANK: * @@ -230,6 +251,9 @@ G_BEGIN_DECLS */ #define DBUSMENU_MENUITEM_ICON_NAME_BLANK "blank-icon" +/* ***************************************** */ +/* ********* Shortcut Modifiers ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_SHORTCUT_CONTROL: * @@ -259,6 +283,9 @@ G_BEGIN_DECLS */ #define DBUSMENU_MENUITEM_SHORTCUT_SUPER "Super" +/* ***************************************** */ +/* ********* Child Display Types ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU: * @@ -267,6 +294,44 @@ G_BEGIN_DECLS */ #define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu" +/* ***************************************** */ +/* ********* Menuitem Dispositions ********* */ +/* ***************************************** */ +/** + * DBUSMENU_MENUITEM_DISPOSITION_NORMAL: + * + * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu + * item displayed in the normal manner. Default value. + */ +#define DBUSMENU_MENUITEM_DISPOSITION_NORMAL "normal" +/** + * DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE: + * + * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu + * item displayed in a way that conveys it's giving additional + * information to the user. + */ +#define DBUSMENU_MENUITEM_DISPOSITION_INFORMATIVE "informative" +/** + * DBUSMENU_MENUITEM_DISPOSITION_WARNING: + * + * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu + * item displayed in a way that conveys it's giving a warning + * to the user. + */ +#define DBUSMENU_MENUITEM_DISPOSITION_WARNING "warning" +/** + * DBUSMENU_MENUITEM_DISPOSITION_ALERT: + * + * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu + * item displayed in a way that conveys it's giving an alert + * to the user. + */ +#define DBUSMENU_MENUITEM_DISPOSITION_ALERT "alert" + +/* ***************************************** */ +/* ********* Dbusmenu Events ********* */ +/* ***************************************** */ /** * DBUSMENU_MENUITEM_EVENT_ACTIVATED: * diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am index 9a979d7..4ec464b 100644 --- a/libdbusmenu-gtk/Makefile.am +++ b/libdbusmenu-gtk/Makefile.am @@ -1,6 +1,4 @@ -CLEANFILES = - if USE_GTK3 VER=3 GTKGIR=Gtk-3.0 @@ -13,10 +11,28 @@ GTKVALA=gtk+-2.0 lib_LTLIBRARIES = libdbusmenu-gtk.la endif +BUILT_SOURCES = +CLEANFILES = +DISTCLEANFILES = EXTRA_DIST = \ dbusmenu-gtk-0.4.pc.in \ dbusmenu-gtk3-0.4.pc.in +############## +# Enum Stuff +############## + +include $(top_srcdir)/Makefile.am.enum + +glib_enum_h = genericmenuitem-enum-types.h +glib_enum_c = genericmenuitem-enum-types.c +glib_enum_headers = $(srcdir)/genericmenuitem.h + + +##################### +# Include Directory +##################### + libdbusmenu_gtkincludedir=$(includedir)/libdbusmenu-0.4/libdbusmenu-gtk$(VER)/ libdbusmenu_gtkinclude_HEADERS = \ @@ -31,6 +47,8 @@ libdbusmenu_gtk_la_SOURCES = \ client.c \ genericmenuitem.h \ genericmenuitem.c \ + genericmenuitem-enum-types.h \ + genericmenuitem-enum-types.c \ menu.h \ menu.c \ menuitem.h \ @@ -89,7 +107,7 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) --includedir=$(top_buildd if HAVE_INTROSPECTION -introspection_sources = $(filter-out genericmenuitem.%, $(libdbusmenu_gtkinclude_HEADERS) $(libdbusmenu_gtk_la_SOURCES)) +introspection_sources = $(filter-out genericmenuitem%, $(libdbusmenu_gtkinclude_HEADERS) $(libdbusmenu_gtk_la_SOURCES)) DbusmenuGtk$(VER)-0.4.gir: libdbusmenu-gtk$(VER).la DbusmenuGtk_0_4_gir_INCLUDES = \ diff --git a/libdbusmenu-gtk/Makefile.in b/libdbusmenu-gtk/Makefile.in index b294dd3..147e8fb 100644 --- a/libdbusmenu-gtk/Makefile.in +++ b/libdbusmenu-gtk/Makefile.in @@ -15,6 +15,23 @@ @SET_MAKE@ +# Rules for generating enumeration types using glib-mkenums +# +# Define: +# glib_enum_h = header template file +# glib_enum_c = source template file +# glib_enum_headers = list of headers to parse +# +# before including Makefile.am.enums. You will also need to have +# the following targets already defined: +# +# CLEANFILES +# DISTCLEANFILES +# BUILT_SOURCES +# EXTRA_DIST +# +# Author: Emmanuele Bassi <ebassi@linux.intel.com> + VPATH = @srcdir@ @@ -36,15 +53,16 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(libdbusmenu_gtk3include_HEADERS) \ + $(libdbusmenu_gtkinclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/dbusmenu-gtk-0.4.pc.in \ + $(srcdir)/dbusmenu-gtk3-0.4.pc.in \ + $(top_srcdir)/Makefile.am.enum @HAVE_INTROSPECTION_TRUE@am__append_1 = DbusmenuGtk$(VER)-0.4.gir @HAVE_INTROSPECTION_TRUE@am__append_2 = $(gir_DATA) $(typelib_DATA) \ @HAVE_INTROSPECTION_TRUE@ $(vapi_DATA) \ @HAVE_INTROSPECTION_TRUE@ DbusmenuGtk$(VER)-0.4.tmp.gir subdir = libdbusmenu-gtk -DIST_COMMON = $(libdbusmenu_gtk3include_HEADERS) \ - $(libdbusmenu_gtkinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/dbusmenu-gtk-0.4.pc.in \ - $(srcdir)/dbusmenu-gtk3-0.4.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ @@ -90,6 +108,7 @@ libdbusmenu_gtk_la_DEPENDENCIES = \ ../libdbusmenu-glib/libdbusmenu-glib.la $(am__DEPENDENCIES_1) am_libdbusmenu_gtk_la_OBJECTS = libdbusmenu_gtk_la-client.lo \ libdbusmenu_gtk_la-genericmenuitem.lo \ + libdbusmenu_gtk_la-genericmenuitem-enum-types.lo \ libdbusmenu_gtk_la-menu.lo libdbusmenu_gtk_la-menuitem.lo \ libdbusmenu_gtk_la-parser.lo libdbusmenu_gtk_la_OBJECTS = $(am_libdbusmenu_gtk_la_OBJECTS) @@ -106,6 +125,7 @@ am__DEPENDENCIES_2 = ../libdbusmenu-glib/libdbusmenu-glib.la \ libdbusmenu_gtk3_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am__objects_1 = libdbusmenu_gtk3_la-client.lo \ libdbusmenu_gtk3_la-genericmenuitem.lo \ + libdbusmenu_gtk3_la-genericmenuitem-enum-types.lo \ libdbusmenu_gtk3_la-menu.lo libdbusmenu_gtk3_la-menuitem.lo \ libdbusmenu_gtk3_la-parser.lo am_libdbusmenu_gtk3_la_OBJECTS = $(am__objects_1) @@ -321,7 +341,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -CLEANFILES = $(am__append_2) @USE_GTK3_FALSE@VER = @USE_GTK3_TRUE@VER = 3 @USE_GTK3_FALSE@GTKGIR = Gtk-2.0 @@ -330,10 +349,24 @@ CLEANFILES = $(am__append_2) @USE_GTK3_TRUE@GTKVALA = gtk+-3.0 @USE_GTK3_FALSE@lib_LTLIBRARIES = libdbusmenu-gtk.la @USE_GTK3_TRUE@lib_LTLIBRARIES = libdbusmenu-gtk3.la -EXTRA_DIST = \ - dbusmenu-gtk-0.4.pc.in \ - dbusmenu-gtk3-0.4.pc.in - +BUILT_SOURCES = $(glib_enum_h) $(glib_enum_c) +CLEANFILES = stamp-enum-types $(am__append_2) +DISTCLEANFILES = $(glib_enum_h) $(glib_enum_c) +EXTRA_DIST = dbusmenu-gtk-0.4.pc.in dbusmenu-gtk3-0.4.pc.in \ + $(enum_tmpl_h) $(enum_tmpl_c) +enum_tmpl_h = $(glib_enum_h:.h=.h.in) +enum_tmpl_c = $(glib_enum_c:.c=.c.in) + +############## +# Enum Stuff +############## +glib_enum_h = genericmenuitem-enum-types.h +glib_enum_c = genericmenuitem-enum-types.c +glib_enum_headers = $(srcdir)/genericmenuitem.h + +##################### +# Include Directory +##################### libdbusmenu_gtkincludedir = $(includedir)/libdbusmenu-0.4/libdbusmenu-gtk$(VER)/ libdbusmenu_gtkinclude_HEADERS = \ dbusmenu-gtk.h \ @@ -347,6 +380,8 @@ libdbusmenu_gtk_la_SOURCES = \ client.c \ genericmenuitem.h \ genericmenuitem.c \ + genericmenuitem-enum-types.h \ + genericmenuitem-enum-types.c \ menu.h \ menu.c \ menuitem.h \ @@ -393,7 +428,7 @@ INTROSPECTION_GIRS = $(am__append_1) @INTROSPECTION_TEN_TRUE@ --identifier-prefix=DbusmenuGtk INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) --includedir=$(top_builddir)/libdbusmenu-glib -@HAVE_INTROSPECTION_TRUE@introspection_sources = $(filter-out genericmenuitem.%, $(libdbusmenu_gtkinclude_HEADERS) $(libdbusmenu_gtk_la_SOURCES)) +@HAVE_INTROSPECTION_TRUE@introspection_sources = $(filter-out genericmenuitem%, $(libdbusmenu_gtkinclude_HEADERS) $(libdbusmenu_gtk_la_SOURCES)) @HAVE_INTROSPECTION_TRUE@DbusmenuGtk_0_4_gir_INCLUDES = \ @HAVE_INTROSPECTION_TRUE@ GObject-2.0 \ @HAVE_INTROSPECTION_TRUE@ $(GTKGIR) \ @@ -422,11 +457,12 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) --includedir=$(top_buildd ######################### @HAVE_INTROSPECTION_TRUE@vapidir = $(datadir)/vala/vapi @HAVE_INTROSPECTION_TRUE@vapi_DATA = DbusmenuGtk$(VER)-0.4.vapi -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.enum $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -503,11 +539,13 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk3_la-client.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk3_la-genericmenuitem-enum-types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk3_la-genericmenuitem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk3_la-menu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk3_la-menuitem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk3_la-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk_la-client.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk_la-genericmenuitem-enum-types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk_la-genericmenuitem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk_la-menu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbusmenu_gtk_la-menuitem.Plo@am__quote@ @@ -553,6 +591,14 @@ libdbusmenu_gtk_la-genericmenuitem.lo: genericmenuitem.c @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_gtk_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_gtk_la-genericmenuitem.lo `test -f 'genericmenuitem.c' || echo '$(srcdir)/'`genericmenuitem.c +libdbusmenu_gtk_la-genericmenuitem-enum-types.lo: genericmenuitem-enum-types.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_gtk_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_gtk_la-genericmenuitem-enum-types.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_gtk_la-genericmenuitem-enum-types.Tpo -c -o libdbusmenu_gtk_la-genericmenuitem-enum-types.lo `test -f 'genericmenuitem-enum-types.c' || echo '$(srcdir)/'`genericmenuitem-enum-types.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_gtk_la-genericmenuitem-enum-types.Tpo $(DEPDIR)/libdbusmenu_gtk_la-genericmenuitem-enum-types.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='genericmenuitem-enum-types.c' object='libdbusmenu_gtk_la-genericmenuitem-enum-types.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_gtk_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_gtk_la-genericmenuitem-enum-types.lo `test -f 'genericmenuitem-enum-types.c' || echo '$(srcdir)/'`genericmenuitem-enum-types.c + libdbusmenu_gtk_la-menu.lo: menu.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_gtk_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_gtk_la-menu.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_gtk_la-menu.Tpo -c -o libdbusmenu_gtk_la-menu.lo `test -f 'menu.c' || echo '$(srcdir)/'`menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_gtk_la-menu.Tpo $(DEPDIR)/libdbusmenu_gtk_la-menu.Plo @@ -593,6 +639,14 @@ libdbusmenu_gtk3_la-genericmenuitem.lo: genericmenuitem.c @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_gtk3_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_gtk3_la-genericmenuitem.lo `test -f 'genericmenuitem.c' || echo '$(srcdir)/'`genericmenuitem.c +libdbusmenu_gtk3_la-genericmenuitem-enum-types.lo: genericmenuitem-enum-types.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_gtk3_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_gtk3_la-genericmenuitem-enum-types.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_gtk3_la-genericmenuitem-enum-types.Tpo -c -o libdbusmenu_gtk3_la-genericmenuitem-enum-types.lo `test -f 'genericmenuitem-enum-types.c' || echo '$(srcdir)/'`genericmenuitem-enum-types.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_gtk3_la-genericmenuitem-enum-types.Tpo $(DEPDIR)/libdbusmenu_gtk3_la-genericmenuitem-enum-types.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='genericmenuitem-enum-types.c' object='libdbusmenu_gtk3_la-genericmenuitem-enum-types.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_gtk3_la_CFLAGS) $(CFLAGS) -c -o libdbusmenu_gtk3_la-genericmenuitem-enum-types.lo `test -f 'genericmenuitem-enum-types.c' || echo '$(srcdir)/'`genericmenuitem-enum-types.c + libdbusmenu_gtk3_la-menu.lo: menu.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_gtk3_la_CFLAGS) $(CFLAGS) -MT libdbusmenu_gtk3_la-menu.lo -MD -MP -MF $(DEPDIR)/libdbusmenu_gtk3_la-menu.Tpo -c -o libdbusmenu_gtk3_la-menu.lo `test -f 'menu.c' || echo '$(srcdir)/'`menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbusmenu_gtk3_la-menu.Tpo $(DEPDIR)/libdbusmenu_gtk3_la-menu.Plo @@ -826,13 +880,15 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(vapidir)" "$(DESTDIR)$(libdbusmenu_gtk3includedir)" "$(DESTDIR)$(libdbusmenu_gtkincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -854,10 +910,12 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ @@ -936,7 +994,7 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA uninstall-typelibDATA \ uninstall-vapiDATA -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ @@ -960,6 +1018,26 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-vapiDATA +stamp-enum-types: $(glib_enum_headers) + $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_h)` + $(QUIET_GEN)$(GLIB_MKENUMS) \ + --template $(srcdir)/$(enum_tmpl_h) \ + $(glib_enum_headers) > xgen-eh \ + && (cmp -s xgen-eh $(builddir)/$(glib_enum_h) || cp -f xgen-eh $(builddir)/$(glib_enum_h)) \ + && rm -f xgen-eh \ + && echo timestamp > $(@F) + +$(glib_enum_h): stamp-enum-types + @true + +$(glib_enum_c): $(glib_enum_h) + $(QUIET_GEN)mkdir -p `dirname $(builddir)/$(glib_enum_c)` + $(QUIET_GEN)$(GLIB_MKENUMS) \ + --template $(srcdir)/$(enum_tmpl_c) \ + $(glib_enum_headers) > xgen-ec \ + && cp -f xgen-ec $(builddir)/$(glib_enum_c) \ + && rm -f xgen-ec + ######################### # GObject Introsepction ######################### diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 5e59f8e..1051f20 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -31,10 +31,12 @@ License version 3 and version 2.1 along with this program. If not, see #endif #include <gtk/gtk.h> +#include <glib.h> #include "client.h" #include "menuitem.h" #include "genericmenuitem.h" +#include "genericmenuitem-enum-types.h" /* Private */ struct _DbusmenuGtkClientPrivate { @@ -701,6 +703,20 @@ process_submenu (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, D return; } +/* Process the disposition changing */ +static void +process_disposition (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, DbusmenuGtkClient * gtkclient) +{ + /* We can only handle generic menu items here. Perhaps someone else + will find the value useful. Not us. */ + if (!IS_GENERICMENUITEM(gmi)) { + return; + } + + genericmenuitem_set_disposition(GENERICMENUITEM(gmi), genericmenuitem_disposition_get_value_from_nick(g_variant_get_string(variant, NULL))); + return; +} + /* Whenever we have a property change on a DbusmenuMenuitem we need to be responsive to that. */ static void @@ -720,6 +736,8 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, Db process_toggle_state(mi, gmi, variant); } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY)) { process_submenu(mi, gmi, variant, gtkclient); + } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_DISPOSITION)) { + process_disposition(mi, gmi, variant, gtkclient); } return; @@ -856,6 +874,7 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * process_toggle_type(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE)); process_toggle_state(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE)); process_submenu(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY), client); + process_disposition(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_DISPOSITION), client); refresh_shortcut(client, item); /* Oh, we're a child, let's deal with that */ diff --git a/libdbusmenu-gtk/genericmenuitem-enum-types.c b/libdbusmenu-gtk/genericmenuitem-enum-types.c new file mode 100644 index 0000000..7105ba0 --- /dev/null +++ b/libdbusmenu-gtk/genericmenuitem-enum-types.c @@ -0,0 +1,259 @@ + +/* Generated data (by glib-mkenums) */ + +/* +Enums from the dbusmenu headers + +Copyright 2011 Canonical Ltd. + +Authors: + Ted Gould <ted@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, 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 applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see +<http://www.gnu.org/licenses/> +*/ + +#include "genericmenuitem-enum-types.h" + +#include "genericmenuitem.h" +/** + genericmenuitem_check_type_get_type: + + Builds a GLib type for the #GenericmenuitemCheckType enumeration. + + Return value: A unique #GType for the #GenericmenuitemCheckType enum. +*/ +GType +genericmenuitem_check_type_get_type (void) +{ + static GType etype = 0; + if (G_UNLIKELY(etype == 0)) { + static const GEnumValue values[] = { + { GENERICMENUITEM_CHECK_TYPE_NONE, "GENERICMENUITEM_CHECK_TYPE_NONE", "none" }, + { GENERICMENUITEM_CHECK_TYPE_CHECKBOX, "GENERICMENUITEM_CHECK_TYPE_CHECKBOX", "checkbox" }, + { GENERICMENUITEM_CHECK_TYPE_RADIO, "GENERICMENUITEM_CHECK_TYPE_RADIO", "radio" }, + { 0, NULL, NULL} + }; + + etype = g_enum_register_static (g_intern_static_string("GenericmenuitemCheckType"), values); + } + + return etype; +} + +/** + genericmenuitem_check_type_get_nick: + @value: The value of GenericmenuitemCheckType to get the nick of + + Looks up in the enum table for the nick of @value. + + Return value: The nick for the given value or #NULL on error +*/ +const gchar * +genericmenuitem_check_type_get_nick (GenericmenuitemCheckType value) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(genericmenuitem_check_type_get_type())); + g_return_val_if_fail(class != NULL, NULL); + + const gchar * ret = NULL; + GEnumValue * val = g_enum_get_value(class, value); + if (val != NULL) { + ret = val->value_nick; + } + + g_type_class_unref(class); + return ret; +} + +/** + genericmenuitem_check_type_get_value_from_nick: + @nick: The enum nick to lookup + + Looks up in the enum table for the value of @nick. + + Return value: The value for the given @nick +*/ +GenericmenuitemCheckType +genericmenuitem_check_type_get_value_from_nick (const gchar * nick) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(genericmenuitem_check_type_get_type())); + g_return_val_if_fail(class != NULL, 0); + + GenericmenuitemCheckType ret = 0; + GEnumValue * val = g_enum_get_value_by_nick(class, nick); + if (val != NULL) { + ret = val->value; + } + + g_type_class_unref(class); + return ret; +} + + +/** + genericmenuitem_state_get_type: + + Builds a GLib type for the #GenericmenuitemState enumeration. + + Return value: A unique #GType for the #GenericmenuitemState enum. +*/ +GType +genericmenuitem_state_get_type (void) +{ + static GType etype = 0; + if (G_UNLIKELY(etype == 0)) { + static const GEnumValue values[] = { + { GENERICMENUITEM_STATE_UNCHECKED, "GENERICMENUITEM_STATE_UNCHECKED", "unchecked" }, + { GENERICMENUITEM_STATE_CHECKED, "GENERICMENUITEM_STATE_CHECKED", "checked" }, + { GENERICMENUITEM_STATE_INDETERMINATE, "GENERICMENUITEM_STATE_INDETERMINATE", "indeterminate" }, + { 0, NULL, NULL} + }; + + etype = g_enum_register_static (g_intern_static_string("GenericmenuitemState"), values); + } + + return etype; +} + +/** + genericmenuitem_state_get_nick: + @value: The value of GenericmenuitemState to get the nick of + + Looks up in the enum table for the nick of @value. + + Return value: The nick for the given value or #NULL on error +*/ +const gchar * +genericmenuitem_state_get_nick (GenericmenuitemState value) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(genericmenuitem_state_get_type())); + g_return_val_if_fail(class != NULL, NULL); + + const gchar * ret = NULL; + GEnumValue * val = g_enum_get_value(class, value); + if (val != NULL) { + ret = val->value_nick; + } + + g_type_class_unref(class); + return ret; +} + +/** + genericmenuitem_state_get_value_from_nick: + @nick: The enum nick to lookup + + Looks up in the enum table for the value of @nick. + + Return value: The value for the given @nick +*/ +GenericmenuitemState +genericmenuitem_state_get_value_from_nick (const gchar * nick) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(genericmenuitem_state_get_type())); + g_return_val_if_fail(class != NULL, 0); + + GenericmenuitemState ret = 0; + GEnumValue * val = g_enum_get_value_by_nick(class, nick); + if (val != NULL) { + ret = val->value; + } + + g_type_class_unref(class); + return ret; +} + + +/** + genericmenuitem_disposition_get_type: + + Builds a GLib type for the #GenericmenuitemDisposition enumeration. + + Return value: A unique #GType for the #GenericmenuitemDisposition enum. +*/ +GType +genericmenuitem_disposition_get_type (void) +{ + static GType etype = 0; + if (G_UNLIKELY(etype == 0)) { + static const GEnumValue values[] = { + { GENERICMENUITEM_DISPOSITION_NORMAL, "GENERICMENUITEM_DISPOSITION_NORMAL", "normal" }, + { GENERICMENUITEM_DISPOSITION_INFORMATIONAL, "GENERICMENUITEM_DISPOSITION_INFORMATIONAL", "informational" }, + { GENERICMENUITEM_DISPOSITION_WARNING, "GENERICMENUITEM_DISPOSITION_WARNING", "warning" }, + { GENERICMENUITEM_DISPOSITION_ALERT, "GENERICMENUITEM_DISPOSITION_ALERT", "alert" }, + { 0, NULL, NULL} + }; + + etype = g_enum_register_static (g_intern_static_string("GenericmenuitemDisposition"), values); + } + + return etype; +} + +/** + genericmenuitem_disposition_get_nick: + @value: The value of GenericmenuitemDisposition to get the nick of + + Looks up in the enum table for the nick of @value. + + Return value: The nick for the given value or #NULL on error +*/ +const gchar * +genericmenuitem_disposition_get_nick (GenericmenuitemDisposition value) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(genericmenuitem_disposition_get_type())); + g_return_val_if_fail(class != NULL, NULL); + + const gchar * ret = NULL; + GEnumValue * val = g_enum_get_value(class, value); + if (val != NULL) { + ret = val->value_nick; + } + + g_type_class_unref(class); + return ret; +} + +/** + genericmenuitem_disposition_get_value_from_nick: + @nick: The enum nick to lookup + + Looks up in the enum table for the value of @nick. + + Return value: The value for the given @nick +*/ +GenericmenuitemDisposition +genericmenuitem_disposition_get_value_from_nick (const gchar * nick) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(genericmenuitem_disposition_get_type())); + g_return_val_if_fail(class != NULL, 0); + + GenericmenuitemDisposition ret = 0; + GEnumValue * val = g_enum_get_value_by_nick(class, nick); + if (val != NULL) { + ret = val->value; + } + + g_type_class_unref(class); + return ret; +} + + + +/* Generated data ends here */ + diff --git a/libdbusmenu-gtk/genericmenuitem-enum-types.c.in b/libdbusmenu-gtk/genericmenuitem-enum-types.c.in new file mode 100644 index 0000000..8b2c046 --- /dev/null +++ b/libdbusmenu-gtk/genericmenuitem-enum-types.c.in @@ -0,0 +1,116 @@ +/*** BEGIN file-header ***/ +/* +Enums from the dbusmenu headers + +Copyright 2011 Canonical Ltd. + +Authors: + Ted Gould <ted@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, 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 applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see +<http://www.gnu.org/licenses/> +*/ + +#include "genericmenuitem-enum-types.h" + +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +#include "@basename@" +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +/** + @enum_name@_get_type: + + Builds a GLib type for the #@EnumName@ enumeration. + + Return value: A unique #GType for the #@EnumName@ enum. +*/ +GType +@enum_name@_get_type (void) +{ + static GType etype = 0; + if (G_UNLIKELY(etype == 0)) { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL} + }; + + etype = g_@type@_register_static (g_intern_static_string("@EnumName@"), values); + } + + return etype; +} + +/** + @enum_name@_get_nick: + @value: The value of @EnumName@ to get the nick of + + Looks up in the enum table for the nick of @value. + + Return value: The nick for the given value or #NULL on error +*/ +const gchar * +@enum_name@_get_nick (@EnumName@ value) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type())); + g_return_val_if_fail(class != NULL, NULL); + + const gchar * ret = NULL; + GEnumValue * val = g_enum_get_value(class, value); + if (val != NULL) { + ret = val->value_nick; + } + + g_type_class_unref(class); + return ret; +} + +/** + @enum_name@_get_value_from_nick: + @nick: The enum nick to lookup + + Looks up in the enum table for the value of @nick. + + Return value: The value for the given @nick +*/ +@EnumName@ +@enum_name@_get_value_from_nick (const gchar * nick) +{ + GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type())); + g_return_val_if_fail(class != NULL, 0); + + @EnumName@ ret = 0; + GEnumValue * val = g_enum_get_value_by_nick(class, nick); + if (val != NULL) { + ret = val->value; + } + + g_type_class_unref(class); + return ret; +} + + +/*** END value-tail ***/ diff --git a/libdbusmenu-gtk/genericmenuitem-enum-types.h b/libdbusmenu-gtk/genericmenuitem-enum-types.h new file mode 100644 index 0000000..3a8c50c --- /dev/null +++ b/libdbusmenu-gtk/genericmenuitem-enum-types.h @@ -0,0 +1,86 @@ + +/* Generated data (by glib-mkenums) */ + +/* +Enums from the dbusmenu headers + +Copyright 2011 Canonical Ltd. + +Authors: + Ted Gould <ted@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, 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 applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see +<http://www.gnu.org/licenses/> +*/ + +#ifndef __DBUSMENU_ENUM_TYPES_H__ +#define __DBUSMENU_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* Enumerations from file: "./genericmenuitem.h" */ +#include "genericmenuitem.h" + + +GType genericmenuitem_check_type_get_type (void) G_GNUC_CONST; +const gchar * genericmenuitem_check_type_get_nick (GenericmenuitemCheckType value) G_GNUC_CONST; +GenericmenuitemCheckType genericmenuitem_check_type_get_value_from_nick (const gchar * nick) G_GNUC_CONST; + +/** + DBUSMENU_TYPE_CHECK_TYPE: + + Gets the #GType value for the type associated with the + #GenericmenuitemCheckType enumerated type. +*/ +#define DBUSMENU_TYPE_CHECK_TYPE (genericmenuitem_check_type_get_type()) + + +GType genericmenuitem_state_get_type (void) G_GNUC_CONST; +const gchar * genericmenuitem_state_get_nick (GenericmenuitemState value) G_GNUC_CONST; +GenericmenuitemState genericmenuitem_state_get_value_from_nick (const gchar * nick) G_GNUC_CONST; + +/** + DBUSMENU_TYPE_STATE: + + Gets the #GType value for the type associated with the + #GenericmenuitemState enumerated type. +*/ +#define DBUSMENU_TYPE_STATE (genericmenuitem_state_get_type()) + + +GType genericmenuitem_disposition_get_type (void) G_GNUC_CONST; +const gchar * genericmenuitem_disposition_get_nick (GenericmenuitemDisposition value) G_GNUC_CONST; +GenericmenuitemDisposition genericmenuitem_disposition_get_value_from_nick (const gchar * nick) G_GNUC_CONST; + +/** + DBUSMENU_TYPE_DISPOSITION: + + Gets the #GType value for the type associated with the + #GenericmenuitemDisposition enumerated type. +*/ +#define DBUSMENU_TYPE_DISPOSITION (genericmenuitem_disposition_get_type()) + + +G_END_DECLS + +#endif /* __DBUSMENU_ENUM_TYPES_H__ */ + +/* Generated data ends here */ + diff --git a/libdbusmenu-gtk/genericmenuitem-enum-types.h.in b/libdbusmenu-gtk/genericmenuitem-enum-types.h.in new file mode 100644 index 0000000..5758438 --- /dev/null +++ b/libdbusmenu-gtk/genericmenuitem-enum-types.h.in @@ -0,0 +1,65 @@ +/*** BEGIN file-header ***/ +/* +Enums from the dbusmenu headers + +Copyright 2011 Canonical Ltd. + +Authors: + Ted Gould <ted@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the + Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, 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 applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see +<http://www.gnu.org/licenses/> +*/ + +#ifndef __DBUSMENU_ENUM_TYPES_H__ +#define __DBUSMENU_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/*** END file-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +#endif /* __DBUSMENU_ENUM_TYPES_H__ */ +/*** END file-tail ***/ + +/*** BEGIN file-production ***/ +/* Enumerations from file: "@filename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ + +GType @enum_name@_get_type (void) G_GNUC_CONST; +const gchar * @enum_name@_get_nick (@EnumName@ value) G_GNUC_CONST; +@EnumName@ @enum_name@_get_value_from_nick (const gchar * nick) G_GNUC_CONST; + +/** + DBUSMENU_TYPE_@ENUMSHORT@: + + Gets the #GType value for the type associated with the + #@EnumName@ enumerated type. +*/ +#define DBUSMENU_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) + +/*** END value-header ***/ diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c index 3652ceb..1d2f958 100644 --- a/libdbusmenu-gtk/genericmenuitem.c +++ b/libdbusmenu-gtk/genericmenuitem.c @@ -30,6 +30,8 @@ License version 3 and version 2.1 along with this program. If not, see #include "config.h" #endif +#include <gdk/gdk.h> + #include "genericmenuitem.h" /* @@ -40,6 +42,7 @@ License version 3 and version 2.1 along with this program. If not, see struct _GenericmenuitemPrivate { GenericmenuitemCheckType check_type; GenericmenuitemState state; + GenericmenuitemDisposition disposition; }; /* Private macro */ @@ -102,6 +105,7 @@ genericmenuitem_init (Genericmenuitem *self) self->priv->check_type = GENERICMENUITEM_CHECK_TYPE_NONE; self->priv->state = GENERICMENUITEM_STATE_UNCHECKED; + self->priv->disposition = GENERICMENUITEM_DISPOSITION_NORMAL; return; } @@ -172,11 +176,51 @@ get_hpadding (GtkWidget * widget) return padding; } +/* Get the value to put in the span for the disposition */ +static gchar * +get_text_color (GenericmenuitemDisposition disposition, GtkStyleContext * context) +{ + struct {const gchar * color_name; const gchar * default_color;} values[] = { + /* NORMAL */ { NULL, NULL}, + /* INFO */ { "informational-color", "blue"}, + /* WARN */ { "warning-color", "orange"}, + /* ALERT */ { "error-color", "red"} + }; + + GdkRGBA color; + + if (gtk_style_context_lookup_color(context, values[disposition].color_name, &color)) { + return g_strdup_printf("rgb(%d, %d, %d)", (gint)(color.red * 255), (gint)(color.green * 255), (gint)(color.blue * 255)); + } + + return g_strdup(values[disposition].default_color); +} + /* Set the label on the item */ static void -set_label (GtkMenuItem * menu_item, const gchar * label) +set_label (GtkMenuItem * menu_item, const gchar * in_label) { - if (label == NULL) return; + if (in_label == NULL) return; + + /* Build a label that might include the colors of the disposition + so that it gets rendered in the menuitem. */ + gchar * local_label = NULL; + switch (GENERICMENUITEM(menu_item)->priv->disposition) { + case GENERICMENUITEM_DISPOSITION_NORMAL: + local_label = g_strdup(in_label); + break; + case GENERICMENUITEM_DISPOSITION_INFORMATIONAL: + case GENERICMENUITEM_DISPOSITION_WARNING: + case GENERICMENUITEM_DISPOSITION_ALERT: { + gchar * color = get_text_color(GENERICMENUITEM(menu_item)->priv->disposition, gtk_widget_get_style_context(GTK_WIDGET(menu_item))); + local_label = g_markup_printf_escaped("<span fgcolor=\"%s\">%s</span>", color, in_label); + g_free(color); + break; + } + default: + g_warn_if_reached(); + break; + } GtkWidget * child = gtk_bin_get_child(GTK_BIN(menu_item)); GtkLabel * labelw = NULL; @@ -211,10 +255,12 @@ set_label (GtkMenuItem * menu_item, const gchar * label) update the one that we already have. */ if (labelw == NULL) { /* Build it */ - labelw = GTK_LABEL(gtk_accel_label_new(label)); + labelw = GTK_LABEL(gtk_accel_label_new(local_label)); gtk_label_set_use_underline(GTK_LABEL(labelw), TRUE); + gtk_label_set_use_markup(GTK_LABEL(labelw), TRUE); gtk_misc_set_alignment(GTK_MISC(labelw), 0.0, 0.5); gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(labelw), GTK_WIDGET(menu_item)); + gtk_label_set_markup_with_mnemonic(labelw, local_label); gtk_widget_show(GTK_WIDGET(labelw)); /* Check to see if it needs to be in the bin for this @@ -226,13 +272,13 @@ set_label (GtkMenuItem * menu_item, const gchar * label) } } else { /* Oh, just an update. No biggie. */ - if (!g_strcmp0(label, gtk_label_get_label(labelw))) { + if (!g_strcmp0(local_label, gtk_label_get_label(labelw))) { /* The only reason to suppress the update is if we had a label and the value was the same as the one we're getting in. */ suppress_update = TRUE; } else { - gtk_label_set_label(labelw, label); + gtk_label_set_markup_with_mnemonic(labelw, local_label); } } @@ -241,6 +287,12 @@ set_label (GtkMenuItem * menu_item, const gchar * label) g_object_notify(G_OBJECT(menu_item), "label"); } + /* Clean up this */ + if (local_label != NULL) { + g_free(local_label); + local_label = NULL; + } + return; } @@ -466,3 +518,41 @@ genericmenuitem_get_image (Genericmenuitem * menu_item) return imagew; } + +/** + * genericmenuitem_set_disposition: + * @item: A #Genericmenuitem + * @disposition: The disposition of the item + * + * Sets the disposition of the menuitem. + */ +void +genericmenuitem_set_disposition (Genericmenuitem * item, GenericmenuitemDisposition disposition) +{ + g_return_if_fail(IS_GENERICMENUITEM(item)); + + if (item->priv->disposition == disposition) + return; + + item->priv->disposition = disposition; + + set_label(GTK_MENU_ITEM(item), get_label(GTK_MENU_ITEM(item))); + + return; +} + +/** + * genericmenuitem_get_disposition: + * @item: A #Genericmenuitem + * + * Gets the disposition of the menuitem. + * + * Return value: The disposition of the menuitem. + */ +GenericmenuitemDisposition +genericmenuitem_get_disposition (Genericmenuitem * item) +{ + g_return_val_if_fail(IS_GENERICMENUITEM(item), GENERICMENUITEM_DISPOSITION_NORMAL); + + return item->priv->disposition; +} diff --git a/libdbusmenu-gtk/genericmenuitem.h b/libdbusmenu-gtk/genericmenuitem.h index 5e3c640..0b7df55 100644 --- a/libdbusmenu-gtk/genericmenuitem.h +++ b/libdbusmenu-gtk/genericmenuitem.h @@ -42,11 +42,9 @@ G_BEGIN_DECLS #define IS_GENERICMENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GENERICMENUITEM_TYPE)) #define GENERICMENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GENERICMENUITEM_TYPE, GenericmenuitemClass)) -typedef struct _Genericmenuitem Genericmenuitem; -typedef struct _GenericmenuitemClass GenericmenuitemClass; -typedef struct _GenericmenuitemPrivate GenericmenuitemPrivate; -typedef enum _GenericmenuitemCheckType GenericmenuitemCheckType; -typedef enum _GenericmenuitemState GenericmenuitemState; +typedef struct _Genericmenuitem Genericmenuitem; +typedef struct _GenericmenuitemClass GenericmenuitemClass; +typedef struct _GenericmenuitemPrivate GenericmenuitemPrivate; /* GenericmenuitemClass: @@ -65,26 +63,61 @@ struct _Genericmenuitem { GenericmenuitemPrivate * priv; }; -enum _GenericmenuitemCheckType { +/** + * GenericmenuitemCheckType: + * @GENERICMENUITEM_CHECK_TYPE_NONE: No check + * @GENERICMENUITEM_CHECK_TYPE_CHECKBOX: Nice little check + * @GENERICMENUITEM_CHECK_TYPE_RADIO: Radio button + * + * Tracks what type of checkmark should be shown on the item + */ +typedef enum { /*< prefix=GENERICMENUITEM_CHECK_TYPE >*/ GENERICMENUITEM_CHECK_TYPE_NONE, GENERICMENUITEM_CHECK_TYPE_CHECKBOX, GENERICMENUITEM_CHECK_TYPE_RADIO -}; - -enum _GenericmenuitemState { +} GenericmenuitemCheckType; + +/** + * GenericmenuitemState: + * @GENERICMENUITEM_STATE_UNCHECKED: No check visisble + * @GENERICMENUITEM_STATE_CHECKED: Check visible + * @GENERICMENUITEM_STATE_INDETERMINATE: We have no clue + * + * What the state of the check mark on the item is + */ +typedef enum { /*< prefix=GENERICMENUITEM_STATE >*/ GENERICMENUITEM_STATE_UNCHECKED, GENERICMENUITEM_STATE_CHECKED, GENERICMENUITEM_STATE_INDETERMINATE -}; - -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); +} GenericmenuitemState; + +/** + * GenericmenuitemDisposition: + * @GENERICMENUITEM_DISPOSITION_NORMAL: Normal state + * @GENERICMENUITEM_DISPOSITION_INFORMATIONAL: Item is informational + * @GENERICMENUITEM_DISPOSITION_WARNING: Oh, you should watch out for this one + * @GENERICMENUITEM_DISPOSITION_ALERT: Boom! + * + * What the disposition of the menu item is + */ +typedef enum { /*< prefix=GENERICMENUITEM_DISPOSITION >*/ + GENERICMENUITEM_DISPOSITION_NORMAL, + GENERICMENUITEM_DISPOSITION_INFORMATIONAL, + GENERICMENUITEM_DISPOSITION_WARNING, + GENERICMENUITEM_DISPOSITION_ALERT +} GenericmenuitemDisposition; + +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); +void genericmenuitem_set_disposition (Genericmenuitem * item, + GenericmenuitemDisposition disposition); +GenericmenuitemDisposition genericmenuitem_get_disposition (Genericmenuitem * item); G_END_DECLS diff --git a/tests/test-gtk-label.json b/tests/test-gtk-label.json index 0189fbe..86d18e8 100644 --- a/tests/test-gtk-label.json +++ b/tests/test-gtk-label.json @@ -367,5 +367,58 @@ QmCC", "toggle-state": -1 } ] + }, + {"id": 1, "type": "standard", + "label": "value1", + "submenu": [ + {"id": 60, + "label": "Disposition Normal", + "disposition": "normal" + }, + {"id": 61, + "label": "Disposition Info", + "disposition": "informational" + }, + {"id": 62, + "label": "Disposition Warning", + "disposition": "warning" + }, + {"id": 63, + "label": "Disposition Alert", + "disposition": "alert" + } + ] + }, + {"id": 1, "type": "standard", + "label": "value1", + "submenu": [ + {"id": 70, + "label": "_Mnemonic" + }, + {"id": 71, + "label": "M_nemonic" + }, + {"id": 72, + "label": "Mn_emonic" + }, + {"id": 73, + "label": "Mne_monic" + }, + {"id": 74, + "label": "Mnem_onic" + }, + {"id": 75, + "label": "Mnemo_nic" + }, + {"id": 76, + "label": "Mnemon_ic" + }, + {"id": 77, + "label": "Mnemoni_c" + }, + {"id": 78, + "label": "__Underline__" + } + ] } ] |