aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2013-01-08 16:46:00 +1300
committerRobert Ancell <robert.ancell@canonical.com>2013-01-08 16:46:00 +1300
commitbc4291546397e35815b05251579b8ff7821de16e (patch)
treeee0a0c6da2e1ab753930ae013009a728f6a0d7d8 /src
parent3cdfd9a3ad6989d42a1cc134f5d2e61e42654676 (diff)
downloadayatana-indicator-bluetooth-bc4291546397e35815b05251579b8ff7821de16e.tar.gz
ayatana-indicator-bluetooth-bc4291546397e35815b05251579b8ff7821de16e.tar.bz2
ayatana-indicator-bluetooth-bc4291546397e35815b05251579b8ff7821de16e.zip
Add start of accessible description
Diffstat (limited to 'src')
-rw-r--r--src/indicator-bluetooth-service.vala5
-rw-r--r--src/indicator-bluetooth.vala14
2 files changed, 16 insertions, 3 deletions
diff --git a/src/indicator-bluetooth-service.vala b/src/indicator-bluetooth-service.vala
index 227e5fb..a1015e4 100644
--- a/src/indicator-bluetooth-service.vala
+++ b/src/indicator-bluetooth-service.vala
@@ -381,4 +381,9 @@ private class BluetoothService : Object
{
get { return _icon_name; }
}
+ internal string _accessible_description = "Bluetooth";
+ public string accessible_description
+ {
+ get { return _accessible_description; }
+ }
}
diff --git a/src/indicator-bluetooth.vala b/src/indicator-bluetooth.vala
index 130f743..87a26af 100644
--- a/src/indicator-bluetooth.vala
+++ b/src/indicator-bluetooth.vala
@@ -15,6 +15,7 @@ public class BluetoothIndicator : Indicator.Object
private Gtk.Image image;
private DbusmenuGtk.Menu menu;
private BluetoothService proxy;
+ private string accessible_description = "Bluetooth";
construct
{
@@ -45,6 +46,11 @@ public class BluetoothIndicator : Indicator.Object
return menu;
}
+ public override unowned string get_accessible_desc ()
+ {
+ return accessible_description;
+ }
+
private void connection_change_cb (bool connected)
{
if (!connected)
@@ -62,8 +68,8 @@ public class BluetoothIndicator : Indicator.Object
try
{
proxy = Bus.get_proxy.end (result);
- proxy.g_properties_changed.connect (update_icon_cb);
- update_icon_cb ();
+ proxy.g_properties_changed.connect (server_properties_changed_cb);
+ server_properties_changed_cb ();
}
catch (IOError e)
{
@@ -73,9 +79,10 @@ public class BluetoothIndicator : Indicator.Object
}
}
- private void update_icon_cb ()
+ private void server_properties_changed_cb ()
{
Indicator.image_helper_update (image, proxy.icon_name);
+ accessible_description = proxy.accessible_description;
}
}
@@ -117,6 +124,7 @@ public class Switch : Ido.SwitchMenuItem
public interface BluetoothService : DBusProxy
{
public abstract string icon_name { owned get; }
+ public abstract string accessible_description { owned get; }
}
public static string get_version ()