aboutsummaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-23 19:56:18 -0500
committerTed Gould <ted@gould.cx>2011-09-23 19:56:18 -0500
commitaa96c7500dcf1be6b86e493a9035544b4eb26559 (patch)
tree8375d62f7e900aeb212b77898ca23d39ab35885d /bindings
parent1bfe91a779b5d71cf3e6bf066182af38995fa4bf (diff)
parentc0b476c33f2d59641090d1ba741f4cd038bc320c (diff)
downloadlibayatana-appindicator-aa96c7500dcf1be6b86e493a9035544b4eb26559.tar.gz
libayatana-appindicator-aa96c7500dcf1be6b86e493a9035544b4eb26559.tar.bz2
libayatana-appindicator-aa96c7500dcf1be6b86e493a9035544b4eb26559.zip
Fixing Vala bindings
Diffstat (limited to 'bindings')
-rw-r--r--bindings/vala/Makefile.am3
-rw-r--r--bindings/vala/appindicator-0.1-custom.vala31
-rw-r--r--bindings/vala/examples/indicator-example.vala1
3 files changed, 34 insertions, 1 deletions
diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am
index f80b48c..3a6dd3e 100644
--- a/bindings/vala/Makefile.am
+++ b/bindings/vala/Makefile.am
@@ -25,9 +25,10 @@ $(vapiprefix).deps:
$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \
$(top_builddir)/src/AppIndicator$(VER)-0.1.metadata \
+ $(vapiprefix)-custom.vala \
$(vapiprefix).deps
$(VALA_API_GEN) --library=$(vapiprefix) --girdir=$(srcdir)/src \
- $<
+ $< $(vapiprefix)-custom.vala
CLEANFILES = $(vapi_DATA)
diff --git a/bindings/vala/appindicator-0.1-custom.vala b/bindings/vala/appindicator-0.1-custom.vala
new file mode 100644
index 0000000..96152a2
--- /dev/null
+++ b/bindings/vala/appindicator-0.1-custom.vala
@@ -0,0 +1,31 @@
+/*
+ Copyright (C) 2011 Canonical, Ltd.
+
+ 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/>
+
+ Authored by Michal Hruby <michal.hruby@canonical.com>
+*/
+
+namespace AppIndicator {
+ [CCode (type_check_function = "IS_APP_INDICATOR")]
+ public class Indicator : GLib.Object {
+ }
+}
+
+// vim:et:ai:cindent:ts=2 sts=2 sw=2:
diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala
index 7bb1d7d..8feb4ba 100644
--- a/bindings/vala/examples/indicator-example.vala
+++ b/bindings/vala/examples/indicator-example.vala
@@ -34,6 +34,7 @@ public class IndicatorExample {
var indicator = new Indicator(win.title, "indicator-messages",
IndicatorCategory.APPLICATION_STATUS);
+ if (!(indicator is Indicator)) return -1;
indicator.set_status(IndicatorStatus.ACTIVE);
indicator.set_attention_icon("indicator-messages-new");