aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-31 23:04:40 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-31 23:04:40 -0500
commit761a9fff03812af3c0beb26da1094c69fc3a0a72 (patch)
tree1ef4a2ed2927e62d8449aff72f87942dd4b9320f
parent143845e62636b2bbc1316e794be40c37e3505c71 (diff)
downloadayatana-indicator-bluetooth-761a9fff03812af3c0beb26da1094c69fc3a0a72.tar.gz
ayatana-indicator-bluetooth-761a9fff03812af3c0beb26da1094c69fc3a0a72.tar.bz2
ayatana-indicator-bluetooth-761a9fff03812af3c0beb26da1094c69fc3a0a72.zip
add a vapi/ directory off the top package directory
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am9
-rw-r--r--src/config.vapi3
-rw-r--r--src/indicator-bluetooth-service.vala6
-rw-r--r--vapi/config.vapi8
5 files changed, 19 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index f9303de..3179a1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
AC_INIT(indicator-bluetooth, 0.0.6)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign])
+AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
diff --git a/src/Makefile.am b/src/Makefile.am
index 8f8d7eb..5fcfc5c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,12 +3,15 @@ indicatordir = ${libdir}/indicators3/7
indicator_LTLIBRARIES = libbluetooth.la
indicator_bluetooth_service_SOURCES = \
- config.vapi \
indicator3-0.4.vapi \
gnome-bluetooth-1.0.vapi \
indicator-bluetooth-service.vala
indicator_bluetooth_service_VALAFLAGS = \
+ --ccode \
+ --vapidir=$(top_srcdir)/vapi/ \
+ --vapidir=./ \
+ --pkg config \
--pkg posix \
--pkg glib-2.0 \
--pkg gtk+-3.0 \
@@ -23,12 +26,14 @@ indicator_bluetooth_service_LDADD = \
$(INDICATOR_BLUETOOTH_SERVICE_LIBS)
libbluetooth_la_SOURCES = \
- config.vapi \
indicator3-0.4.vapi \
indicator-bluetooth.vala \
libido3-0.1.vapi
libbluetooth_la_VALAFLAGS = \
+ --ccode \
+ --vapidir=$(top_srcdir)/vapi/ \
+ --vapidir=./ \
--pkg posix \
--pkg glib-2.0 \
--pkg gtk+-3.0 \
diff --git a/src/config.vapi b/src/config.vapi
deleted file mode 100644
index a1bb094..0000000
--- a/src/config.vapi
+++ /dev/null
@@ -1,3 +0,0 @@
-public const string VERSION;
-public const string GETTEXT_PACKAGE;
-public const string LOCALE_DIR;
diff --git a/src/indicator-bluetooth-service.vala b/src/indicator-bluetooth-service.vala
index ac84f33..e9d8e76 100644
--- a/src/indicator-bluetooth-service.vala
+++ b/src/indicator-bluetooth-service.vala
@@ -397,9 +397,9 @@ private void show_control_center (string panel)
public static int main (string[] args)
{
Intl.setlocale (LocaleCategory.ALL, "");
- Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
- Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- Intl.textdomain (GETTEXT_PACKAGE);
+ Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR);
+ Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
+ Intl.textdomain (Config.GETTEXT_PACKAGE);
var loop = new MainLoop ();
diff --git a/vapi/config.vapi b/vapi/config.vapi
new file mode 100644
index 0000000..15c4c88
--- /dev/null
+++ b/vapi/config.vapi
@@ -0,0 +1,8 @@
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")]
+namespace Config {
+ public const string GETTEXT_PACKAGE;
+ public const string GNOMELOCALEDIR;
+ public const string PKGDATADIR;
+ public const string PACKAGE_NAME;
+ public const string PACKAGE_VERSION;
+}