aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/main.vala59
-rw-r--r--po/indicator-keyboard.pot10
2 files changed, 36 insertions, 33 deletions
diff --git a/lib/main.vala b/lib/main.vala
index 4367e9ae..9e74ee84 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -577,34 +577,37 @@ public class Indicator.Keyboard.Service : Object {
}
if (ibus_panel == null && sources[i].is_ibus) {
- var connection = get_ibus ().get_connection ();
- var name = "org.freedesktop.IBus.Panel";
- var path = "/org/freedesktop/IBus/Panel";
-
- try {
- ibus_panel = connection.get_proxy_sync (name, path);
-
- ((!) ibus_panel).properties_registered.connect ((variant) => {
- var properties = new IBus.PropList ();
- properties.deserialize (variant);
-
- if (properties is IBus.PropList) {
- handle_properties_registered ((!) (properties as IBus.PropList));
- }
- });
- ((!) ibus_panel).property_updated.connect ((variant) => {
- var type = IBus.PropType.NORMAL;
- var state = IBus.PropState.INCONSISTENT;
- var text = new IBus.Text.from_static_string ("");
- var property = new IBus.Property ("", type, text, null, text, false, false, state, null);
- property.deserialize (variant);
-
- if (property is IBus.Property) {
- handle_property_updated ((!) (property as IBus.Property));
- }
- });
- } catch (IOError error) {
- warning ("error: %s", error.message);
+ DBusConnection? connection = get_ibus ().get_connection ();
+
+ if (connection != null) {
+ var name = "org.freedesktop.IBus.Panel";
+ var path = "/org/freedesktop/IBus/Panel";
+
+ try {
+ ibus_panel = ((!) connection).get_proxy_sync (name, path);
+
+ ((!) ibus_panel).properties_registered.connect ((variant) => {
+ var properties = new IBus.PropList ();
+ properties.deserialize (variant);
+
+ if (properties is IBus.PropList) {
+ handle_properties_registered ((!) (properties as IBus.PropList));
+ }
+ });
+ ((!) ibus_panel).property_updated.connect ((variant) => {
+ var type = IBus.PropType.NORMAL;
+ var state = IBus.PropState.INCONSISTENT;
+ var text = new IBus.Text.from_static_string ("");
+ var property = new IBus.Property ("", type, text, null, text, false, false, state, null);
+ property.deserialize (variant);
+
+ if (property is IBus.Property) {
+ handle_property_updated ((!) (property as IBus.Property));
+ }
+ });
+ } catch (IOError error) {
+ warning ("error: %s", error.message);
+ }
}
}
}
diff --git a/po/indicator-keyboard.pot b/po/indicator-keyboard.pot
index 34931572..090c84a3 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-09-27 16:28+0200\n"
+"POT-Creation-Date: 2014-03-19 18:04+1300\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"
@@ -17,19 +17,19 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../lib/main.vala:427
+#: ../lib/main.vala:655
#, c-format
msgid "%s input source"
msgstr ""
-#: ../lib/main.vala:525
+#: ../lib/main.vala:801
msgid "Character Map"
msgstr ""
-#: ../lib/main.vala:526
+#: ../lib/main.vala:802
msgid "Keyboard Layout Chart"
msgstr ""
-#: ../lib/main.vala:527
+#: ../lib/main.vala:803
msgid "Text Entry Settings..."
msgstr ""