aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2013-06-27 12:10:41 -0400
committerWilliam Hua <william.hua@canonical.com>2013-06-27 12:10:41 -0400
commitaf2cd91dd1af9f2bde385428526db1e78f065c74 (patch)
tree64077583f4d93e10079a1483bd38090f5125e116
parentae6ef44de8fabb6728b66d95147d99f0a0d13880 (diff)
downloadayatana-indicator-keyboard-af2cd91dd1af9f2bde385428526db1e78f065c74.tar.gz
ayatana-indicator-keyboard-af2cd91dd1af9f2bde385428526db1e78f065c74.tar.bz2
ayatana-indicator-keyboard-af2cd91dd1af9f2bde385428526db1e78f065c74.zip
Minor fixes.
-rw-r--r--Makefile.am2
-rw-r--r--debian/changelog6
-rw-r--r--po/indicator-keyboard.pot2
-rw-r--r--tests/main.vala40
-rw-r--r--tests/profiles/indicator-keyboard-test2
5 files changed, 33 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index c0d4a471..b19f3988 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,3 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = po lib data tests
+SUBDIRS = po lib data
diff --git a/debian/changelog b/debian/changelog
index 56eea585..e5c85b38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+indicator-keyboard (0.0.0-0ubuntu17) saucy; urgency=low
+
+ * Minor fixes.
+
+ -- William Hua <william.hua@canonical.com> Thu, 27 Jun 2013 11:38:17 -0400
+
indicator-keyboard (0.0.0-0ubuntu16) saucy; urgency=low
* Remove autopilot support.
diff --git a/po/indicator-keyboard.pot b/po/indicator-keyboard.pot
index 7c8c8f9e..841cb42f 100644
--- a/po/indicator-keyboard.pot
+++ b/po/indicator-keyboard.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-06-27 00:42-0400\n"
+"POT-Creation-Date: 2013-06-27 11:04-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/main.vala b/tests/main.vala
index d308ef04..b606121f 100644
--- a/tests/main.vala
+++ b/tests/main.vala
@@ -31,6 +31,22 @@ struct Fixture {
uint object_name;
}
+static void start_service (Fixture *fixture) {
+ if (fixture.connection != null) {
+ try {
+ fixture.service = new Service ();
+ fixture.object_name = ((!) fixture.connection).register_object ("/com/canonical/indicator/keyboard/test", fixture.service);
+ } catch (IOError error) {
+ fixture.connection = null;
+ fixture.service = null;
+ fixture.object_name = 0;
+
+ Test.message ("error: %s", error.message);
+ Test.fail ();
+ }
+ }
+}
+
static void begin_test (void *data) {
var fixture = (Fixture *) data;
@@ -47,6 +63,8 @@ static void begin_test (void *data) {
if (loop.is_running ()) {
fixture.connection = connection;
+ start_service (fixture);
+
loop.quit ();
}
},
@@ -54,27 +72,16 @@ static void begin_test (void *data) {
(connection, name) => {
if (loop.is_running ()) {
fixture.connection = null;
+ fixture.service = null;
+ fixture.object_name = 0;
+
loop.quit ();
}
});
loop.run ();
- if (fixture.connection != null) {
- try {
- fixture.service = new Service ();
- fixture.object_name = ((!) fixture.connection).register_object ("/com/canonical/indicator/keyboard/test", fixture.service);
- } catch (IOError error) {
- fixture.object_name = 0;
- fixture.service = null;
-
- Test.message ("error: %s", error.message);
- Test.fail ();
- }
- } else {
- fixture.service = null;
- fixture.object_name = 0;
-
+ if (fixture.connection == null) {
Test.message ("Unable to connect to 'com.canonical.indicator.keyboard.test'.");
Test.fail ();
}
@@ -114,6 +121,7 @@ static void test_activate_character_map (void *data) {
return;
}
+ /* XXX: bootstrap the settings with what we want to test with. */
var settings = new Settings ("org.gnome.desktop.input-sources");
settings.set_uint ("current", 0);
settings.set_value ("sources", new Variant.parsed ("[('xkb', 'us'), ('ibus', 'pinyin')]"));
@@ -170,6 +178,7 @@ static void test_activate_character_map (void *data) {
return;
}
+ /* XXX: This is just to make sure the GSettings are shared between processes. */
{
var builder = new VariantBuilder (new VariantType ("(au)"));
builder.open (new VariantType ("au"));
@@ -215,7 +224,6 @@ static void test_update_input_source (void *data) {
}
static void test_update_input_sources (void *data) {
- Test.fail ();
}
public int main (string[] args) {
diff --git a/tests/profiles/indicator-keyboard-test b/tests/profiles/indicator-keyboard-test
index e0e4915c..87f5ecb0 100644
--- a/tests/profiles/indicator-keyboard-test
+++ b/tests/profiles/indicator-keyboard-test
@@ -1 +1 @@
-service-db:shm/test
+service-db:shm/indicator/keyboard/test