diff options
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | bindings/vala/examples/indicator-example.vala | 6 | ||||
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | docs/reference/html/ch01.html | 2 | ||||
-rw-r--r-- | docs/reference/html/index.html | 2 | ||||
-rw-r--r-- | docs/reference/html/libappindicator-app-indicator.html | 32 | ||||
-rw-r--r-- | docs/reference/libappindicator-docs.sgml | 2 | ||||
-rw-r--r-- | docs/reference/version.xml | 2 | ||||
-rw-r--r-- | example/simple-client-vala.c | 158 | ||||
-rw-r--r-- | example/simple-client-vala.vala | 36 | ||||
-rw-r--r-- | src/app-indicator.c | 7 |
14 files changed, 167 insertions, 133 deletions
@@ -1,5 +1,25 @@ # Generated by Makefile. Do not edit. +2012-03-21 Charles Kerr <charles.kerr@canonical.com> + + 0.4.92 + +2012-03-21 Charles Kerr <charles.kerr@canonical.com> + + merge lp:~charlesk/libappindicator/fix-vala-examples to resolve ambiguity in the vala examples between glib.Menu and Gtk.Menu + +2012-03-21 Charles Kerr <charles.kerr@canonical.com> + + The vala examples were written before GMenu, so add explict namespace use here to avoid valac errors caused by namespace ambiguity between glib and gtk (ie, use 'new Gtk.Menu' instead of 'new Menu') + +2012-03-19 Charles Kerr <charles.kerr@canonical.com> + + merge lp:~charlesk/libappindicator/lp-957471 to fix a PW.BRANCH_PAST_INITIALIZATION error reported by Coverity in bug #957471 + +2012-03-16 Charles Kerr <charles.kerr@canonical.com> + + remove oddly-scoped variable to fix a CID 10737 - PW.BRANCH_PAST_INITIALIZATION warning reported by Coverity in Bug #957471 + 2012-03-09 Ted Gould <ted@gould.cx> 0.4.91 diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala index 8feb4ba..764009f 100644 --- a/bindings/vala/examples/indicator-example.vala +++ b/bindings/vala/examples/indicator-example.vala @@ -39,16 +39,16 @@ public class IndicatorExample { indicator.set_status(IndicatorStatus.ACTIVE); indicator.set_attention_icon("indicator-messages-new"); - var menu = new Menu(); + var menu = new Gtk.Menu(); - var item = new MenuItem.with_label("Foo"); + var item = new Gtk.MenuItem.with_label("Foo"); item.activate.connect(() => { indicator.set_status(IndicatorStatus.ATTENTION); }); item.show(); menu.append(item); - var bar = item = new MenuItem.with_label("Bar"); + var bar = item = new Gtk.MenuItem.with_label("Bar"); item.show(); item.activate.connect(() => { indicator.set_status(IndicatorStatus.ACTIVE); @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for libappindicator 0.4.91. +# Generated by GNU Autoconf 2.68 for libappindicator 0.4.92. # # Report bugs to <http://bugs.launchpad.net/libappindicator>. # @@ -632,8 +632,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libappindicator' PACKAGE_TARNAME='libappindicator' -PACKAGE_VERSION='0.4.91' -PACKAGE_STRING='libappindicator 0.4.91' +PACKAGE_VERSION='0.4.92' +PACKAGE_STRING='libappindicator 0.4.92' PACKAGE_BUGREPORT='http://bugs.launchpad.net/libappindicator' PACKAGE_URL='http://launchpad.net/libappindicator' @@ -1470,7 +1470,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 libappindicator 0.4.91 to adapt to many kinds of systems. +\`configure' configures libappindicator 0.4.92 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1540,7 +1540,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libappindicator 0.4.91:";; + short | recursive ) echo "Configuration of libappindicator 0.4.92:";; esac cat <<\_ACEOF @@ -1695,7 +1695,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libappindicator configure 0.4.91 +libappindicator configure 0.4.92 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1975,7 +1975,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 libappindicator $as_me 0.4.91, which was +It was created by libappindicator $as_me 0.4.92, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2798,7 +2798,7 @@ fi # Define the identity of the package. PACKAGE='libappindicator' - VERSION='0.4.91' + VERSION='0.4.92' cat >>confdefs.h <<_ACEOF @@ -14667,7 +14667,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 libappindicator $as_me 0.4.91, which was +This file was extended by libappindicator $as_me 0.4.92, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14734,7 +14734,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="\\ -libappindicator config.status 0.4.91 +libappindicator config.status 0.4.92 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 054c0a7..bc42585 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([libappindicator], - [0.4.91], + [0.4.92], [http://bugs.launchpad.net/libappindicator], [libappindicator], [http://launchpad.net/libappindicator]) diff --git a/debian/changelog b/debian/changelog index d39f5b9..bb66de2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +libappindicator (0.4.92-0ubuntu1) precise; urgency=low + + * New upstream release. + * Fix a Coverity PW.BRANCH_PAST_INITIALIZATION error (LP: #957471) + * Fix FTB bug from ambiguity between Glib.Menu and Gtk.Menu in the Vala code + * debian/control: Updating to valac-0.16 + + -- Charles Kerr <charles.kerr@canonical.com> Wed, 21 Mar 2012 16:35:56 -0500 + libappindicator (0.4.91-0ubuntu3) precise; urgency=low * debian/rules: build without make check until the builder environment diff --git a/debian/control b/debian/control index 2e65961..1bdaa4a 100644 --- a/debian/control +++ b/debian/control @@ -32,7 +32,7 @@ Build-Depends: debhelper (>= 7.0), gir1.2-gtk-2.0, gir1.2-gtk-3.0, dh-autoreconf, - valac-0.14, + valac-0.16, dbus-test-runner Standards-Version: 3.9.1 Homepage: https://launchpad.net/libappindicator diff --git a/docs/reference/html/ch01.html b/docs/reference/html/ch01.html index 50a2952..6fb57be 100644 --- a/docs/reference/html/ch01.html +++ b/docs/reference/html/ch01.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter"> <div class="titlepage"><div><div><h2 class="title"> -<a name="idp3818912"></a>Base Classes for Applications</h2></div></div></div> +<a name="idp2571432"></a>Base Classes for Applications</h2></div></div></div> <div class="toc"><dl><dt> <span class="refentrytitle"><a href="libappindicator-app-indicator.html">AppIndicator</a></span><span class="refpurpose"> — An object to put application information into the panel.</span> diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html index 6a2f820..f1816e1 100644 --- a/docs/reference/html/index.html +++ b/docs/reference/html/index.html @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libappindicator Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libappindicator 0.4.91 + for libappindicator 0.4.92 </p></div> </div> <hr> diff --git a/docs/reference/html/libappindicator-app-indicator.html b/docs/reference/html/libappindicator-app-indicator.html index d9f4fdc..8699417 100644 --- a/docs/reference/html/libappindicator-app-indicator.html +++ b/docs/reference/html/libappindicator-app-indicator.html @@ -86,7 +86,7 @@ struct <a class="link" href="libappindicator-app-indicator.html#App <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>, <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_desc</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-menu" title="app_indicator_set_menu ()">app_indicator_set_menu</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>); + <em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-icon" title="app_indicator_set_icon ()">app_indicator_set_icon</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-icon-full" title="app_indicator_set_icon_full ()">app_indicator_set_icon_full</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, @@ -101,7 +101,7 @@ struct <a class="link" href="libappindicator-app-indicator.html#App <em class="parameter"><code><span class="type">guint32</span> ordering_index</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-secondary-activate-target" title="app_indicator_set_secondary_activate_target ()">app_indicator_set_secondary_activate_target</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *menuitem</code></em>); + <em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *menuitem</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-title" title="app_indicator_set_title ()">app_indicator_set_title</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *title</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-id" title="app_indicator_get_id ()">app_indicator_get_id</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); @@ -113,11 +113,11 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.htm const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-attention-icon" title="app_indicator_get_attention_icon ()">app_indicator_get_attention_icon</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-attention-icon-desc" title="app_indicator_get_attention_icon_desc ()">app_indicator_get_attention_icon_desc</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); -<a href="http://library.gnome.org/devel/gtk/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-menu" title="app_indicator_get_menu ()">app_indicator_get_menu</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); +<a href="http://developer.gnome.org/devel/gtk/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-menu" title="app_indicator_get_menu ()">app_indicator_get_menu</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-label" title="app_indicator_get_label ()">app_indicator_get_label</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-label-guide" title="app_indicator_get_label_guide ()">app_indicator_get_label_guide</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); <span class="returnvalue">guint32</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-ordering-index" title="app_indicator_get_ordering_index ()">app_indicator_get_ordering_index</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); -<a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-secondary-activate-target" title="app_indicator_get_secondary_activate_target ()">app_indicator_get_secondary_activate_target</a> +<a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-secondary-activate-target" title="app_indicator_get_secondary_activate_target ()">app_indicator_get_secondary_activate_target</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-title" title="app_indicator_get_title ()">app_indicator_get_title</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-build-menu-from-desktop" title="app_indicator_build_menu_from_desktop ()">app_indicator_build_menu_from_desktop</a> @@ -140,7 +140,7 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.htm "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--attention-icon-name" title='The "attention-icon-name" property'>attention-icon-name</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--category" title='The "category" property'>category</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--connected" title='The "connected" property'>connected</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read - "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--dbus-menu-server" title='The "dbus-menu-server" property'>dbus-menu-server</a>" <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer"><span class="type">DbusmenuServer</span></a>* : Read / Write + "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--dbus-menu-server" title='The "dbus-menu-server" property'>dbus-menu-server</a>" <span class="type">DbusmenuServer</span>* : Read / Write "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--icon-desc" title='The "icon-desc" property'>icon-desc</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--icon-name" title='The "icon-name" property'>icon-name</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write "<a class="link" href="libappindicator-app-indicator.html#AppIndicator--icon-theme-path" title='The "icon-theme-path" property'>icon-theme-path</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct @@ -542,7 +542,7 @@ class object. </tr> <tr> <td><p><span class="term"><em class="structfield"><code><a name="AppIndicatorClass.fallback"></a>fallback</code></em> ()</span></p></td> -<td>Function that gets called to make a <a href="http://library.gnome.org/devel/gtk/GtkStatusIcon.html"><span class="type">GtkStatusIcon</span></a> when +<td>Function that gets called to make a <a href="http://developer.gnome.org/devel/gtk/GtkStatusIcon.html"><span class="type">GtkStatusIcon</span></a> when there is no Application Indicator area available.</td> </tr> <tr> @@ -745,7 +745,7 @@ Wrapper function for property <a class="link" href="libappindicator-app-indicato <div class="refsect2"> <a name="app-indicator-set-menu"></a><h3>app_indicator_set_menu ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> app_indicator_set_menu (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>);</pre> + <em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>);</pre> <p> Sets the menu that should be shown when the Application Indicator is clicked on in the panel. An application indicator will not @@ -764,7 +764,7 @@ Wrapper function for property <span class="type">"menu"</span>. </tr> <tr> <td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> to set. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +<td>A <a href="http://developer.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> to set. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> </td> </tr> </tbody> @@ -914,13 +914,13 @@ Wrapper function for property <a class="link" href="libappindicator-app-indicato <a name="app-indicator-set-secondary-activate-target"></a><h3>app_indicator_set_secondary_activate_target ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> app_indicator_set_secondary_activate_target (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *menuitem</code></em>);</pre> + <em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *menuitem</code></em>);</pre> <p> Set the <em class="parameter"><code>menuitem</code></em> to be activated when a secondary activation event (i.e. a middle-click) is emitted over the <a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> icon/label. </p> <p> -The <em class="parameter"><code>menuitem</code></em> can be also a complex <a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a>, but to get activated when +The <em class="parameter"><code>menuitem</code></em> can be also a complex <a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a>, but to get activated when a secondary activation occurs in the <span class="type">Appindicator</span>, it must be a visible and active child (or inner-child) of the <span class="type">"menu"</span>. </p> @@ -937,7 +937,7 @@ Setting <em class="parameter"><code>menuitem</code></em> to <a href="http://libr </tr> <tr> <td><p><span class="term"><em class="parameter"><code>menuitem</code></em> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> to be activated on secondary activation. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +<td>A <a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> to be activated on secondary activation. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> </td> </tr> </tbody> @@ -1150,7 +1150,7 @@ Wrapper function for property <a class="link" href="libappindicator-app-indicato <hr> <div class="refsect2"> <a name="app-indicator-get-menu"></a><h3>app_indicator_get_menu ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * app_indicator_get_menu (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>);</pre> +<pre class="programlisting"><a href="http://developer.gnome.org/devel/gtk/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * app_indicator_get_menu (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>);</pre> <p> Gets the menu being used for this application indicator. Wrapper function for property <span class="type">"menu"</span>. @@ -1164,7 +1164,7 @@ Wrapper function for property <span class="type">"menu"</span>. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if one hasn't been set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> +<td>A <a href="http://developer.gnome.org/devel/gtk/GtkMenu.html"><span class="type">GtkMenu</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if one hasn't been set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> </td> </tr> </tbody> @@ -1236,7 +1236,7 @@ Wrapper function for property <a class="link" href="libappindicator-app-indicato <hr> <div class="refsect2"> <a name="app-indicator-get-secondary-activate-target"></a><h3>app_indicator_get_secondary_activate_target ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * app_indicator_get_secondary_activate_target +<pre class="programlisting"><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> * app_indicator_get_secondary_activate_target (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>);</pre> <p> Gets the menuitem being called on secondary-activate event. @@ -1250,7 +1250,7 @@ Gets the menuitem being called on secondary-activate event. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none has been set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> +<td>A <a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none has been set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> </td> </tr> </tbody> @@ -1353,7 +1353,7 @@ displayed through this object. You should hide your TrayIcon if so. <hr> <div class="refsect2"> <a name="AppIndicator--dbus-menu-server"></a><h3>The <code class="literal">"dbus-menu-server"</code> property</h3> -<pre class="programlisting"> "dbus-menu-server" <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer"><span class="type">DbusmenuServer</span></a>* : Read / Write</pre> +<pre class="programlisting"> "dbus-menu-server" <span class="type">DbusmenuServer</span>* : Read / Write</pre> <p> A way to get the internal dbusmenu server if it is available. This should only be used for testing. diff --git a/docs/reference/libappindicator-docs.sgml b/docs/reference/libappindicator-docs.sgml index 684eabe..299c251 100644 --- a/docs/reference/libappindicator-docs.sgml +++ b/docs/reference/libappindicator-docs.sgml @@ -8,7 +8,7 @@ <bookinfo> <title>libappindicator Reference Manual</title> <releaseinfo> - for libappindicator 0.4.91 + for libappindicator 0.4.92 </releaseinfo> </bookinfo> diff --git a/docs/reference/version.xml b/docs/reference/version.xml index 30f1d8d..bad3afd 100644 --- a/docs/reference/version.xml +++ b/docs/reference/version.xml @@ -1 +1 @@ -0.4.91 +0.4.92 diff --git a/example/simple-client-vala.c b/example/simple-client-vala.c index afe5a1e..4307157 100644 --- a/example/simple-client-vala.c +++ b/example/simple-client-vala.c @@ -1,4 +1,4 @@ -/* simple-client-vala.c generated by valac 0.14.2, the Vala compiler +/* simple-client-vala.c generated by valac 0.15.2, the Vala compiler * generated from simple-client-vala.vala, do not modify */ /* @@ -110,31 +110,27 @@ enum { static void simple_client_toggle_sensitivity (SimpleClient* self, GtkWidget* widget); static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item); static Block1Data* block1_data_ref (Block1Data* _data1_); -static void block1_data_unref (Block1Data* _data1_); -static void __lambda0_ (SimpleClient* self); -static void ___lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda1_ (Block1Data* _data1_); -static void ___lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void block1_data_unref (void * _userdata_); static void __lambda2_ (SimpleClient* self); static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda3_ (SimpleClient* self); +static void __lambda3_ (Block1Data* _data1_); static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda4_ (SimpleClient* self); +static void ___lambda4__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda5_ (SimpleClient* self); +static void ___lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void simple_client_label_toggle (SimpleClient* self, GtkMenuItem* item); static Block2Data* block2_data_ref (Block2Data* _data2_); -static void block2_data_unref (Block2Data* _data2_); -static void __lambda4_ (SimpleClient* self, gint delta, guint direction); -static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self); -static gboolean __lambda5_ (SimpleClient* self); -static gboolean ___lambda5__gsource_func (gpointer self); -static void __lambda6_ (SimpleClient* self); -static void ___lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void block2_data_unref (void * _userdata_); +static void __lambda6_ (SimpleClient* self, gint delta, guint direction); +static void ___lambda6__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self); +static gboolean __lambda7_ (SimpleClient* self); +static gboolean ___lambda7__gsource_func (gpointer self); +static void __lambda8_ (SimpleClient* self); +static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void _g_object_unref0_ (gpointer var); static void _g_slist_free__g_object_unref0_ (GSList* self); -static void __lambda7_ (SimpleClient* self); -static void ___lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda8_ (Block2Data* _data2_); -static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda9_ (Block2Data* _data2_); +static void __lambda9_ (SimpleClient* self); static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void __lambda10_ (Block2Data* _data2_); static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); @@ -142,6 +138,10 @@ static void __lambda11_ (Block2Data* _data2_); static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void __lambda12_ (Block2Data* _data2_); static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda13_ (Block2Data* _data2_); +static void ___lambda13__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda14_ (Block2Data* _data2_); +static void ___lambda14__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void simple_client_finalize (SimpleClient* obj); @@ -218,22 +218,26 @@ static Block1Data* block1_data_ref (Block1Data* _data1_) { } -static void block1_data_unref (Block1Data* _data1_) { +static void block1_data_unref (void * _userdata_) { + Block1Data* _data1_; + _data1_ = (Block1Data*) _userdata_; if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { - _simple_client_unref0 (_data1_->self); + SimpleClient * self; + self = _data1_->self; _g_object_unref0 (_data1_->prev_mi); + _simple_client_unref0 (self); g_slice_free (Block1Data, _data1_); } } -static void __lambda0_ (SimpleClient* self) { +static void __lambda2_ (SimpleClient* self) { g_print ("Sub1\n"); } -static void ___lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda0_ (self); +static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda2_ (self); } @@ -242,29 +246,29 @@ static gpointer _g_object_ref0 (gpointer self) { } -static void __lambda1_ (Block1Data* _data1_) { +static void __lambda3_ (Block1Data* _data1_) { SimpleClient * self; self = _data1_->self; simple_client_toggle_sensitivity (self, (GtkWidget*) _data1_->prev_mi); } -static void ___lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda1_ (self); +static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda3_ (self); } -static void __lambda2_ (SimpleClient* self) { +static void __lambda4_ (SimpleClient* self) { g_print ("Sub3\n"); } -static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda2_ (self); +static void ___lambda4__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda4_ (self); } -static void __lambda3_ (SimpleClient* self) { +static void __lambda5_ (SimpleClient* self) { AppIndicator* _tmp0_; AppIndicatorStatus _tmp1_ = 0; _tmp0_ = self->priv->ci; @@ -281,8 +285,8 @@ static void __lambda3_ (SimpleClient* self) { } -static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda3_ (self); +static void ___lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda5_ (self); } @@ -328,7 +332,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp4_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp4_); _tmp5_ = mi; - g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda0__gtk_menu_item_activate, self); + g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda2__gtk_menu_item_activate, self); _tmp6_ = mi; _tmp7_ = _g_object_ref0 (_tmp6_); _data1_->prev_mi = _tmp7_; @@ -339,7 +343,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp10_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp10_); _tmp11_ = mi; - g_signal_connect_data (_tmp11_, "activate", (GCallback) ___lambda1__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); + g_signal_connect_data (_tmp11_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); _tmp12_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3"); _tmp13_ = g_object_ref_sink (_tmp12_); _g_object_unref0 (mi); @@ -347,7 +351,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp14_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp14_); _tmp15_ = mi; - g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda2__gtk_menu_item_activate, self); + g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda4__gtk_menu_item_activate, self); _tmp16_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle Attention"); _tmp17_ = g_object_ref_sink (_tmp16_); _g_object_unref0 (mi); @@ -355,7 +359,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp18_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp18_); _tmp19_ = mi; - g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, self); + g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda5__gtk_menu_item_activate, self); _tmp20_ = self->priv->ci; _tmp21_ = mi; app_indicator_set_secondary_activate_target (_tmp20_, (GtkWidget*) _tmp21_); @@ -395,20 +399,24 @@ static Block2Data* block2_data_ref (Block2Data* _data2_) { } -static void block2_data_unref (Block2Data* _data2_) { +static void block2_data_unref (void * _userdata_) { + Block2Data* _data2_; + _data2_ = (Block2Data*) _userdata_; if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { - _simple_client_unref0 (_data2_->self); + SimpleClient * self; + self = _data2_->self; _g_object_unref0 (_data2_->icon); _g_object_unref0 (_data2_->show); _g_object_unref0 (_data2_->att); _g_object_unref0 (_data2_->imgitem); _g_object_unref0 (_data2_->submenu); + _simple_client_unref0 (self); g_slice_free (Block2Data, _data2_); } } -static void __lambda4_ (SimpleClient* self, gint delta, guint direction) { +static void __lambda6_ (SimpleClient* self, gint delta, guint direction) { gint _tmp0_; gchar* _tmp1_ = NULL; gchar* _tmp2_; @@ -432,12 +440,12 @@ static void __lambda4_ (SimpleClient* self, gint delta, guint direction) { } -static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) { - __lambda4_ (self, delta, direction); +static void ___lambda6__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) { + __lambda6_ (self, delta, direction); } -static gboolean __lambda5_ (SimpleClient* self) { +static gboolean __lambda7_ (SimpleClient* self) { gboolean result = FALSE; gint _tmp0_; gboolean _tmp1_; @@ -470,20 +478,20 @@ static gboolean __lambda5_ (SimpleClient* self) { } -static gboolean ___lambda5__gsource_func (gpointer self) { +static gboolean ___lambda7__gsource_func (gpointer self) { gboolean result; - result = __lambda5_ (self); + result = __lambda7_ (self); return result; } -static void __lambda6_ (SimpleClient* self) { +static void __lambda8_ (SimpleClient* self) { g_print ("1\n"); } -static void ___lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda6_ (self); +static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda8_ (self); } @@ -498,29 +506,29 @@ static void _g_slist_free__g_object_unref0_ (GSList* self) { } -static void __lambda7_ (SimpleClient* self) { +static void __lambda9_ (SimpleClient* self) { g_print ("2\n"); } -static void ___lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda7_ (self); +static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda9_ (self); } -static void __lambda8_ (Block2Data* _data2_) { +static void __lambda10_ (Block2Data* _data2_) { SimpleClient * self; self = _data2_->self; simple_client_toggle_sensitivity (self, (GtkWidget*) _data2_->submenu); } -static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda8_ (self); +static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda10_ (self); } -static void __lambda9_ (Block2Data* _data2_) { +static void __lambda11_ (Block2Data* _data2_) { SimpleClient * self; GtkWidget* _tmp0_ = NULL; GtkImage* _tmp1_; @@ -534,12 +542,12 @@ static void __lambda9_ (Block2Data* _data2_) { } -static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda9_ (self); +static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda11_ (self); } -static void __lambda10_ (Block2Data* _data2_) { +static void __lambda12_ (Block2Data* _data2_) { SimpleClient * self; gboolean _tmp0_; self = _data2_->self; @@ -560,24 +568,24 @@ static void __lambda10_ (Block2Data* _data2_) { } -static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda10_ (self); +static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda12_ (self); } -static void __lambda11_ (Block2Data* _data2_) { +static void __lambda13_ (Block2Data* _data2_) { SimpleClient * self; self = _data2_->self; simple_client_label_toggle (self, _data2_->show); } -static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda11_ (self); +static void ___lambda13__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda13_ (self); } -static void __lambda12_ (Block2Data* _data2_) { +static void __lambda14_ (Block2Data* _data2_) { SimpleClient * self; gboolean _tmp0_ = FALSE; self = _data2_->self; @@ -594,8 +602,8 @@ static void __lambda12_ (Block2Data* _data2_) { } -static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda12_ (self); +static void ___lambda14__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda14_ (self); } @@ -640,8 +648,8 @@ void simple_client_run (SimpleClient* self) { _data2_->_ref_count_ = 1; _data2_->self = simple_client_ref (self); _tmp0_ = self->priv->ci; - g_signal_connect (_tmp0_, "scroll-event", (GCallback) ___lambda4__app_indicator_scroll_event, self); - g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda5__gsource_func, simple_client_ref (self), simple_client_unref); + g_signal_connect (_tmp0_, "scroll-event", (GCallback) ___lambda6__app_indicator_scroll_event, self); + g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda7__gsource_func, simple_client_ref (self), simple_client_unref); _tmp1_ = (GtkMenu*) gtk_menu_new (); _tmp2_ = g_object_ref_sink (_tmp1_); _g_object_unref0 (self->priv->menu); @@ -649,7 +657,7 @@ void simple_client_run (SimpleClient* self) { _tmp3_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1"); _tmp4_ = g_object_ref_sink (_tmp3_); chk = _tmp4_; - g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda6__gtk_menu_item_activate, self); + g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda8__gtk_menu_item_activate, self); _tmp5_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp5_, (GtkWidget*) ((GtkMenuItem*) chk)); gtk_widget_show ((GtkWidget*) chk); @@ -659,7 +667,7 @@ void simple_client_run (SimpleClient* self) { _tmp9_ = _tmp8_; __g_slist_free__g_object_unref0_0 (_tmp6_); radio = _tmp9_; - g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) ___lambda7__gtk_menu_item_activate, self); + g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) ___lambda9__gtk_menu_item_activate, self); _tmp10_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp10_, (GtkWidget*) ((GtkMenuItem*) radio)); gtk_widget_show ((GtkWidget*) radio); @@ -673,21 +681,21 @@ void simple_client_run (SimpleClient* self) { _tmp14_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle 3"); _tmp15_ = g_object_ref_sink (_tmp14_); toggle_item = _tmp15_; - g_signal_connect_data (toggle_item, "activate", (GCallback) ___lambda8__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data (toggle_item, "activate", (GCallback) ___lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp16_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp16_, (GtkWidget*) toggle_item); gtk_widget_show ((GtkWidget*) toggle_item); _tmp17_ = (GtkImageMenuItem*) gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL); _tmp18_ = g_object_ref_sink (_tmp17_); _data2_->imgitem = _tmp18_; - g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) ___lambda9__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) ___lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp19_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp19_, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem)); gtk_widget_show ((GtkWidget*) _data2_->imgitem); _tmp20_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Get Attention"); _tmp21_ = g_object_ref_sink (_tmp20_); _data2_->att = _tmp21_; - g_signal_connect_data (_data2_->att, "activate", (GCallback) ___lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data (_data2_->att, "activate", (GCallback) ___lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp22_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp22_, (GtkWidget*) _data2_->att); gtk_widget_show ((GtkWidget*) _data2_->att); @@ -695,14 +703,14 @@ void simple_client_run (SimpleClient* self) { _tmp24_ = g_object_ref_sink (_tmp23_); _data2_->show = _tmp24_; simple_client_label_toggle (self, _data2_->show); - g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda13__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp25_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp25_, (GtkWidget*) _data2_->show); gtk_widget_show ((GtkWidget*) _data2_->show); _tmp26_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Set Local Icon"); _tmp27_ = g_object_ref_sink (_tmp26_); _data2_->icon = _tmp27_; - g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) ___lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) ___lambda14__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp28_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp28_, (GtkWidget*) ((GtkMenuItem*) _data2_->icon)); gtk_widget_show ((GtkWidget*) _data2_->icon); diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala index 1b8bad9..f8cd874 100644 --- a/example/simple-client-vala.vala +++ b/example/simple-client-vala.vala @@ -30,7 +30,7 @@ static int main(string[] args) { } class SimpleClient { - Menu menu; + Gtk.Menu menu; Indicator ci; int percentage; bool active; @@ -56,24 +56,24 @@ class SimpleClient { widget.set_sensitive(!widget.is_sensitive()); } - private void append_submenu(MenuItem item) { - var menu = new Menu(); - MenuItem mi; + private void append_submenu(Gtk.MenuItem item) { + var menu = new Gtk.Menu(); + Gtk.MenuItem mi; - mi = new MenuItem.with_label("Sub 1"); + mi = new Gtk.MenuItem.with_label("Sub 1"); menu.append(mi); mi.activate.connect(() => { print("Sub1\n"); }); - MenuItem prev_mi = mi; - mi = new MenuItem.with_label("Sub 2"); + Gtk.MenuItem prev_mi = mi; + mi = new Gtk.MenuItem.with_label("Sub 2"); menu.append(mi); mi.activate.connect(() => { toggle_sensitivity(prev_mi); }); - mi = new MenuItem.with_label("Sub 3"); + mi = new Gtk.MenuItem.with_label("Sub 3"); menu.append(mi); mi.activate.connect(() => { print("Sub3\n"); }); - mi = new MenuItem.with_label("Toggle Attention"); + mi = new Gtk.MenuItem.with_label("Toggle Attention"); menu.append(mi); mi.activate.connect(() => { if (ci.get_status() == IndicatorStatus.ATTENTION) @@ -88,7 +88,7 @@ class SimpleClient { item.set_submenu(menu); } - private void label_toggle(MenuItem item) { + private void label_toggle(Gtk.MenuItem item) { can_haz_label = !can_haz_label; if (can_haz_label) { @@ -114,28 +114,28 @@ class SimpleClient { return true; }); - menu = new Menu(); + menu = new Gtk.Menu(); var chk = new CheckMenuItem.with_label("1"); chk.activate.connect(() => { print("1\n"); }); menu.append(chk); chk.show(); - var radio = new RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2"); + var radio = new Gtk.RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2"); radio.activate.connect(() => { print("2\n"); }); menu.append(radio); radio.show(); - var submenu = new MenuItem.with_label("3"); + var submenu = new Gtk.MenuItem.with_label("3"); menu.append(submenu); append_submenu(submenu); submenu.show(); - var toggle_item = new MenuItem.with_label("Toggle 3"); + var toggle_item = new Gtk.MenuItem.with_label("Toggle 3"); toggle_item.activate.connect(() => { toggle_sensitivity(submenu); }); menu.append(toggle_item); toggle_item.show(); - var imgitem = new ImageMenuItem.from_stock(Stock.NEW, null); + var imgitem = new Gtk.ImageMenuItem.from_stock(Stock.NEW, null); imgitem.activate.connect(() => { Image img = (Image) imgitem.get_image(); img.set_from_stock(Stock.OPEN, IconSize.MENU); @@ -143,7 +143,7 @@ class SimpleClient { menu.append(imgitem); imgitem.show(); - var att = new MenuItem.with_label("Get Attention"); + var att = new Gtk.MenuItem.with_label("Get Attention"); att.activate.connect(() => { if (active) { ci.set_status(IndicatorStatus.ATTENTION); @@ -158,13 +158,13 @@ class SimpleClient { menu.append(att); att.show(); - var show = new MenuItem.with_label("Show Label"); + var show = new Gtk.MenuItem.with_label("Show Label"); label_toggle(show); show.activate.connect(() => { label_toggle(show); }); menu.append(show); show.show(); - var icon = new CheckMenuItem.with_label("Set Local Icon"); + var icon = new Gtk.CheckMenuItem.with_label("Set Local Icon"); icon.activate.connect(() => { if (icon.get_active()) { ci.set_icon("simple-client-test-icon.png"); diff --git a/src/app-indicator.c b/src/app-indicator.c index d7b3d18..0d6450c 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -926,11 +926,8 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu break; case PROP_DBUS_MENU_SERVER: - if (priv->menuservice != NULL) { - g_object_unref (priv->menuservice); - } - gpointer val = g_value_dup_object(value); - priv->menuservice = DBUSMENU_SERVER(val); + g_clear_object (&priv->menuservice); + priv->menuservice = DBUSMENU_SERVER (g_value_dup_object(value)); break; default: |