Missed some 'Shell.GConf' references in switch to GSettings.

Replaced all calls to Shell.GConf with GConf.Client in magnifier.js.

https://bugzilla.gnome.org/show_bug.cgi?id=622524
This commit is contained in:
Joseph Scheuhammer 2010-06-23 16:28:00 -04:00 committed by Owen W. Taylor
parent c19c236dbf
commit 3af4ca3fe9

View File

@ -507,14 +507,14 @@ Magnifier.prototype = {
}, },
_updateShowHide: function() { _updateShowHide: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setActive(gConf.get_bool(SHOW_KEY)); this.setActive(gConf.get_bool(SHOW_KEY));
}, },
_updateScreenPosition: function() { _updateScreenPosition: function() {
// Applies only to the first zoom region. // Applies only to the first zoom region.
if (this._zoomRegions.length) { if (this._zoomRegions.length) {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
let position = gConf.get_int(SCREEN_POSITION_KEY); let position = gConf.get_int(SCREEN_POSITION_KEY);
this._zoomRegions[0].setScreenPosition(position); this._zoomRegions[0].setScreenPosition(position);
if (position != ScreenPosition.FULL_SCREEN) if (position != ScreenPosition.FULL_SCREEN)
@ -525,7 +525,7 @@ Magnifier.prototype = {
_updateMagFactor: function() { _updateMagFactor: function() {
// Applies only to the first zoom region. // Applies only to the first zoom region.
if (this._zoomRegions.length) { if (this._zoomRegions.length) {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
// Mag factor is accurate to two decimal places. // Mag factor is accurate to two decimal places.
let magFactor = parseFloat(gConf.get_float(MAG_FACTOR_KEY).toFixed(2)); let magFactor = parseFloat(gConf.get_float(MAG_FACTOR_KEY).toFixed(2));
this._zoomRegions[0].setMagFactor(magFactor, magFactor); this._zoomRegions[0].setMagFactor(magFactor, magFactor);
@ -535,7 +535,7 @@ Magnifier.prototype = {
_updateLensMode: function() { _updateLensMode: function() {
// Applies only to the first zoom region. // Applies only to the first zoom region.
if (this._zoomRegions.length) { if (this._zoomRegions.length) {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this._zoomRegions[0].setLensMode(gConf.get_bool(LENS_MODE_KEY)); this._zoomRegions[0].setLensMode(gConf.get_bool(LENS_MODE_KEY));
} }
}, },
@ -543,7 +543,7 @@ Magnifier.prototype = {
_updateClampMode: function() { _updateClampMode: function() {
// Applies only to the first zoom region. // Applies only to the first zoom region.
if (this._zoomRegions.length) { if (this._zoomRegions.length) {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this._zoomRegions[0].setClampScrollingAtEdges( this._zoomRegions[0].setClampScrollingAtEdges(
!gConf.get_bool(CLAMP_MODE_KEY) !gConf.get_bool(CLAMP_MODE_KEY)
); );
@ -553,7 +553,7 @@ Magnifier.prototype = {
_updateMouseTrackingMode: function() { _updateMouseTrackingMode: function() {
// Applies only to the first zoom region. // Applies only to the first zoom region.
if (this._zoomRegions.length) { if (this._zoomRegions.length) {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this._zoomRegions[0].setMouseTrackingMode( this._zoomRegions[0].setMouseTrackingMode(
gConf.get_int(MOUSE_TRACKING_KEY) gConf.get_int(MOUSE_TRACKING_KEY)
); );
@ -561,32 +561,32 @@ Magnifier.prototype = {
}, },
_updateShowCrosshairs: function() { _updateShowCrosshairs: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setCrosshairsVisible(gConf.get_bool(SHOW_CROSS_HAIRS_KEY)); this.setCrosshairsVisible(gConf.get_bool(SHOW_CROSS_HAIRS_KEY));
}, },
_updateCrosshairsThickness: function() { _updateCrosshairsThickness: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setCrosshairsThickness(gConf.get_int(CROSS_HAIRS_THICKNESS_KEY)); this.setCrosshairsThickness(gConf.get_int(CROSS_HAIRS_THICKNESS_KEY));
}, },
_updateCrosshairsColor: function() { _updateCrosshairsColor: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setCrosshairsColor(gConf.get_string(CROSS_HAIRS_COLOR_KEY)); this.setCrosshairsColor(gConf.get_string(CROSS_HAIRS_COLOR_KEY));
}, },
_updateCrosshairsOpacity: function() { _updateCrosshairsOpacity: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setCrosshairsOpacity(gConf.get_int(CROSS_HAIRS_OPACITY_KEY)); this.setCrosshairsOpacity(gConf.get_int(CROSS_HAIRS_OPACITY_KEY));
}, },
_updateCrosshairsLength: function() { _updateCrosshairsLength: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setCrosshairsLength(gConf.get_int(CROSS_HAIRS_LENGTH_KEY)); this.setCrosshairsLength(gConf.get_int(CROSS_HAIRS_LENGTH_KEY));
}, },
_updateCrosshairsClip: function() { _updateCrosshairsClip: function() {
let gConf = Shell.GConf.get_default(); let gConf = GConf.Client.get_default();
this.setCrosshairsClip(gConf.get_bool(CROSS_HAIRS_CLIP_KEY)); this.setCrosshairsClip(gConf.get_bool(CROSS_HAIRS_CLIP_KEY));
} }
}; };