Redo tabs => spaces indentation change to not lose manual indentation
Revert most JS changes in commit: Fri Nov 28 20:12:20 2008 +0000 Convert all JS style to be uniform, add Eclipse settings bits Instead, just add 'indent-tabs-mode: nil' to the mode lines and convert tabs to spaces. The indentation no longer exactly matches the Eclipse settings, since they differ in some ways from the style we are trying to achieve. svn path=/trunk/; revision=97
This commit is contained in:
parent
12720e2c90
commit
7b471645f4
@ -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 Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
@ -69,7 +69,8 @@ _init: function(appinfo, width) {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
this._bg = new Clutter.Rectangle({ color: APPDISPLAY_BACKGROUND_COLOR,
|
this._bg = new Clutter.Rectangle({ color: APPDISPLAY_BACKGROUND_COLOR,
|
||||||
x: 0, y: 0, width: width, height: APPDISPLAY_HEIGHT });
|
x: 0, y: 0,
|
||||||
|
width: width, height: APPDISPLAY_HEIGHT });
|
||||||
this._group.add_actor(this._bg);
|
this._group.add_actor(this._bg);
|
||||||
|
|
||||||
this._icon = new Clutter.Texture({ width: 48, height: 48, x: 0, y: 0 });
|
this._icon = new Clutter.Texture({ width: 48, height: 48, x: 0, y: 0 });
|
||||||
@ -119,7 +120,8 @@ markSelected: function(isSelected) {
|
|||||||
color = APPDISPLAY_BACKGROUND_COLOR;
|
color = APPDISPLAY_BACKGROUND_COLOR;
|
||||||
this._bg.color = color;
|
this._bg.color = color;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
Signals.addSignalMethods(AppDisplayItem.prototype);
|
Signals.addSignalMethods(AppDisplayItem.prototype);
|
||||||
|
|
||||||
function AppDisplay(x, y, width, height) {
|
function AppDisplay(x, y, width, height) {
|
||||||
@ -143,7 +145,7 @@ _init : function(x, y, width, height) {
|
|||||||
this._grid = new Tidy.Grid({x: x, y: y, width: width, height: height});
|
this._grid = new Tidy.Grid({x: x, y: y, width: width, height: height});
|
||||||
global.stage.add_actor(this._grid);
|
global.stage.add_actor(this._grid);
|
||||||
this._appset = {}; // Map<appid, appinfo>
|
this._appset = {}; // Map<appid, appinfo>
|
||||||
this._displayed = {} // Map<appid, AppDisplay>
|
this._displayed = {}; // Map<appid, AppDisplay>
|
||||||
this._selectedIndex = -1;
|
this._selectedIndex = -1;
|
||||||
this._max_items = this._height / (APPDISPLAY_HEIGHT + APPDISPLAY_PADDING);
|
this._max_items = this._height / (APPDISPLAY_HEIGHT + APPDISPLAY_PADDING);
|
||||||
},
|
},
|
||||||
@ -172,7 +174,6 @@ _removeItem: function(appid) {
|
|||||||
let group = item.actor;
|
let group = item.actor;
|
||||||
group.destroy();
|
group.destroy();
|
||||||
delete this._displayed[appid];
|
delete this._displayed[appid];
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeAll: function() {
|
_removeAll: function() {
|
||||||
@ -347,6 +348,6 @@ show: function() {
|
|||||||
hide: function() {
|
hide: function() {
|
||||||
this._grid.hide();
|
this._grid.hide();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
Signals.addSignalMethods(AppDisplay.prototype);
|
|
||||||
|
|
||||||
|
Signals.addSignalMethods(AppDisplay.prototype);
|
||||||
|
@ -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 Clutter = imports.gi.Clutter;
|
||||||
const Tweener = imports.tweener.tweener;
|
const Tweener = imports.tweener.tweener;
|
||||||
@ -25,6 +25,7 @@ function Button(text, buttonColor, pressedButtonColor, staysPressed, minWidth, m
|
|||||||
Button.prototype = {
|
Button.prototype = {
|
||||||
_init : function(text, buttonColor, pressedButtonColor, staysPressed, minWidth, minHeight) {
|
_init : function(text, buttonColor, pressedButtonColor, staysPressed, minWidth, minHeight) {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
this._buttonColor = buttonColor
|
this._buttonColor = buttonColor
|
||||||
if (buttonColor == null)
|
if (buttonColor == null)
|
||||||
this._buttonColor = DEFAULT_BUTTON_COLOR;
|
this._buttonColor = DEFAULT_BUTTON_COLOR;
|
||||||
@ -113,5 +114,4 @@ release : function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
@ -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 Clutter = imports.gi.Clutter;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
@ -22,14 +22,14 @@ let wm = null;
|
|||||||
// so it can update values and redraw. The default frame ticker for
|
// so it can update values and redraw. The default frame ticker for
|
||||||
// Tweener just uses a simple timeout at a fixed frame rate and has no idea
|
// Tweener just uses a simple timeout at a fixed frame rate and has no idea
|
||||||
// of "catching up" by dropping frames.
|
// of "catching up" by dropping frames.
|
||||||
|
//
|
||||||
// We substitute it with custom frame ticker here that connects Tweener to
|
// We substitute it with custom frame ticker here that connects Tweener to
|
||||||
// a Clutter.TimeLine. Now, Clutter.Timeline itself isn't a whole lot more
|
// a Clutter.TimeLine. Now, Clutter.Timeline itself isn't a whole lot more
|
||||||
// sophisticated than a simple timeout at a fixed frame rate, but at least
|
// sophisticated than a simple timeout at a fixed frame rate, but at least
|
||||||
// it knows how to drop frames. (See HippoAnimationManager for a more
|
// it knows how to drop frames. (See HippoAnimationManager for a more
|
||||||
// sophisticated view of continous time updates; even better is to pay
|
// sophisticated view of continous time updates; even better is to pay
|
||||||
// attention to the vertical vblank and sync to that when possible.)
|
// attention to the vertical vblank and sync to that when possible.)
|
||||||
|
//
|
||||||
function ClutterFrameTicker() {
|
function ClutterFrameTicker() {
|
||||||
this._init();
|
this._init();
|
||||||
}
|
}
|
||||||
|
@ -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 Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
@ -35,7 +35,7 @@ const WINDOW_OPACITY = 0.9 * 255;
|
|||||||
// Define a layout scheme for small window counts. For larger
|
// Define a layout scheme for small window counts. For larger
|
||||||
// counts we fall back to an algorithm. We need more schemes here
|
// counts we fall back to an algorithm. We need more schemes here
|
||||||
// unless we have a really good algorithm.
|
// unless we have a really good algorithm.
|
||||||
|
//
|
||||||
// Each triplet is [xCenter, yCenter, scale] where the scale
|
// Each triplet is [xCenter, yCenter, scale] where the scale
|
||||||
// is relative to the width of the desktop.
|
// is relative to the width of the desktop.
|
||||||
const POSITIONS = {
|
const POSITIONS = {
|
||||||
@ -196,6 +196,7 @@ _recalculateSize: function () {
|
|||||||
show : function() {
|
show : function() {
|
||||||
if (this.visible)
|
if (this.visible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
let global = Shell.Global.get();
|
let global = Shell.Global.get();
|
||||||
@ -257,6 +258,7 @@ show : function() {
|
|||||||
hide : function() {
|
hide : function() {
|
||||||
if (!this.visible)
|
if (!this.visible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let global = Shell.Global.get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
@ -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 Clutter = imports.gi.Clutter;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
|
@ -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 Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
@ -93,6 +93,7 @@ _run : function(command) {
|
|||||||
|
|
||||||
show : function() {
|
show : function() {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
if (this._group.visible) // Already shown
|
if (this._group.visible) // Already shown
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -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 Clutter = imports.gi.Clutter;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
|
Loading…
Reference in New Issue
Block a user