minor js cleanups

add missing semicolons pointed out by js2-mode, add missing emacs
modelines, fix a few tabs that crept in via cut+paste
This commit is contained in:
Dan Winship 2010-05-19 13:26:41 -04:00
parent 9b3e16595b
commit 8b242dd4bd
11 changed files with 32 additions and 29 deletions

View File

@ -148,6 +148,6 @@ DocManager.prototype = {
}
return multipleMatches.concat(prefixMatches.concat(substringMatches));
}
}
};
Signals.addSignalMethods(DocManager.prototype);

View File

@ -1,3 +1,5 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const GConf = imports.gi.GConf;

View File

@ -16,9 +16,9 @@ dist_jsui_DATA = \
lightbox.js \
link.js \
lookingGlass.js \
main.js \
magnifier.js \
magnifierDBus.js \
main.js \
messageTray.js \
notificationDaemon.js \
overview.js \

View File

@ -1,7 +1,8 @@
const Lang = imports.lang;
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Cairo = imports.cairo;
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
@ -77,7 +78,7 @@ BoxPointer.prototype = {
let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1;
childBox.x1 = 0
childBox.x1 = 0;
childBox.y1 = 0;
childBox.x2 = availWidth;
childBox.y2 = availHeight;
@ -160,4 +161,4 @@ BoxPointer.prototype = {
this._border.queue_repaint();
}
}
}
};

View File

@ -1,4 +1,4 @@
/* -*- mode: js2; js2-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- */
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Clutter = imports.gi.Clutter;
const Gtk = imports.gi.Gtk;

View File

@ -173,7 +173,7 @@ ObjLink.prototype = {
_onClicked: function (link) {
Main.lookingGlass.inspectObject(this._obj, this.actor);
}
}
};
function Result(command, o, index) {
this._init(command, o, index);

View File

@ -588,7 +588,7 @@ Magnifier.prototype = {
let gConf = Shell.GConf.get_default();
this.setCrosshairsClip(gConf.get_boolean(CROSS_HAIRS_CLIP_KEY));
}
}
};
function ZoomRegion(magnifier, mouseRoot) {
this._init(magnifier, mouseRoot);
@ -1200,7 +1200,7 @@ ZoomRegion.prototype = {
this._crosshairsActor.set_position(x - groupWidth / 2, y - groupHeight / 2);
}
}
}
};
function Crosshairs() {
this._init();
@ -1476,4 +1476,4 @@ Crosshairs.prototype = {
this._vertTopHair.set_position((groupWidth - thickness) / 2, top);
this._vertBottomHair.set_position((groupWidth - thickness) / 2, bottom);
}
}
};

View File

@ -280,7 +280,7 @@ ShellMagnifier.prototype = {
// Drop the leading '#'.
return parseInt(colorString.slice(1), 16);
}
}
};
/**
* ShellMagnifierZoomRegion:
@ -369,7 +369,7 @@ ShellMagnifierZoomRegion.prototype = {
let viewRect = { x: viewPort[0], y: viewPort[1], width: viewPort[2], height: viewPort[3] };
this._zoomRegion.setViewPort(viewRect);
}
}
};
DBus.conformExport(ShellMagnifier.prototype, MagnifierIface);
DBus.conformExport(ShellMagnifierZoomRegion.prototype, ZoomRegionIface);

View File

@ -184,7 +184,7 @@ PanelMenuItem.prototype = {
this.label = new St.Label({ text: text });
this.actor.set_child(this.label);
},
}
};
function PanelSeparatorMenuItem() {
@ -209,9 +209,9 @@ PanelSeparatorMenuItem.prototype = {
let found, margin, gradientHeight;
[found, margin] = themeNode.get_length('-margin-horizontal', false);
[found, gradientHeight] = themeNode.get_length('-gradient-height', false);
let startColor = new Clutter.Color()
let startColor = new Clutter.Color();
themeNode.get_color('-gradient-start', false, startColor);
let endColor = new Clutter.Color()
let endColor = new Clutter.Color();
themeNode.get_color('-gradient-end', false, endColor);
let gradientWidth = (width - margin * 2);

View File

@ -633,11 +633,11 @@ SingleView.prototype = {
this._leftShadow = new St.Bin({ style_class: 'left-workspaces-shadow',
width: Math.ceil(global.screen_width * WORKSPACE_SHADOW_SCALE),
height: global.screen_height,
x: global.screen_width })
x: global.screen_width });
this._rightShadow = new St.Bin({ style_class: 'right-workspaces-shadow',
width: Math.ceil(global.screen_width * WORKSPACE_SHADOW_SCALE),
height: global.screen_height,
x: global.screen_width })
x: global.screen_width });
GenericWorkspacesView.prototype._init.call(this, width, height, x, y, workspaces);
@ -1545,7 +1545,7 @@ WorkspacesControls.prototype = {
},
_workspacesChanged: function() {
let showToggleButton = (global.screen.n_workspaces > 1)
let showToggleButton = (global.screen.n_workspaces > 1);
Tweener.addTween(this._toggleViewButton,
{ opacity: showToggleButton ? 255 : 0,
time: WORKSPACE_SWITCH_TIME,