summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2012-07-30 17:09:42 (GMT)
committerFlorian Müllner <fmuellner@gnome.org>2012-07-30 17:15:23 (GMT)
commita2465e0670bdf83b6d3931df6d1ef1e5bd89462c (patch)
tree29a52044a2d559c158e097078dc0491eada5d9a2
parent57044ea9a07522b7769dc516c250596f41ae55ee (diff)
downloadgnome-shell-a2465e0670bdf83b6d3931df6d1ef1e5bd89462c.zip
gnome-shell-a2465e0670bdf83b6d3931df6d1ef1e5bd89462c.tar.xz
bluetooth: Adapt to GnomeBluetooth API break
-rw-r--r--js/ui/status/bluetooth.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index b68b843..7df1006 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -5,6 +5,7 @@ const Gdk = imports.gi.Gdk;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const GnomeBluetoothApplet = imports.gi.GnomeBluetoothApplet;
+const GnomeBluetooth = imports.gi.GnomeBluetooth;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
@@ -36,11 +37,11 @@ const Indicator = new Lang.Class({
this._applet.connect('notify::killswitch-state', Lang.bind(this, this._updateKillswitch));
this._killswitch.connect('toggled', Lang.bind(this, function() {
let current_state = this._applet.killswitch_state;
- if (current_state != GnomeBluetoothApplet.KillswitchState.HARD_BLOCKED &&
- current_state != GnomeBluetoothApplet.KillswitchState.NO_ADAPTER) {
+ if (current_state != GnomeBluetooth.KillswitchState.HARD_BLOCKED &&
+ current_state != GnomeBluetooth.KillswitchState.NO_ADAPTER) {
this._applet.killswitch_state = this._killswitch.state ?
- GnomeBluetoothApplet.KillswitchState.UNBLOCKED:
- GnomeBluetoothApplet.KillswitchState.SOFT_BLOCKED;
+ GnomeBluetooth.KillswitchState.UNBLOCKED:
+ GnomeBluetooth.KillswitchState.SOFT_BLOCKED;
} else
this._killswitch.setToggleState(false);
}));
@@ -99,10 +100,10 @@ const Indicator = new Lang.Class({
_updateKillswitch: function() {
let current_state = this._applet.killswitch_state;
- let on = current_state == GnomeBluetoothApplet.KillswitchState.UNBLOCKED;
- let has_adapter = current_state != GnomeBluetoothApplet.KillswitchState.NO_ADAPTER;
- let can_toggle = current_state != GnomeBluetoothApplet.KillswitchState.NO_ADAPTER &&
- current_state != GnomeBluetoothApplet.KillswitchState.HARD_BLOCKED;
+ let on = current_state == GnomeBluetooth.KillswitchState.UNBLOCKED;
+ let has_adapter = current_state != GnomeBluetooth.KillswitchState.NO_ADAPTER;
+ let can_toggle = current_state != GnomeBluetooth.KillswitchState.NO_ADAPTER &&
+ current_state != GnomeBluetooth.KillswitchState.HARD_BLOCKED;
this._killswitch.setToggleState(on);
if (can_toggle)