[gnome-shell/wip/paging-release: 18/93] AppDisplay: typos
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging-release: 18/93] AppDisplay: typos
- Date: Mon, 12 Aug 2013 17:13:18 +0000 (UTC)
commit f81b2e365509ce5cd74ac3e2ab52a375bddd9c01
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Mon Aug 12 17:36:35 2013 +0200
AppDisplay: typos
js/ui/appDisplay.js | 46 ++++++++++++++++++++++------------------------
1 files changed, 22 insertions(+), 24 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index b84eef0..17c7132 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -41,7 +41,8 @@ const MAX_APPS_PAGES = 20;
const PAGE_SWITCH_TRESHOLD = 0.2;
const PAGE_SWITCH_TIME = 0.3;
-// Recursively load a GMenuTreeDirectory; we could put this in ShellAppSystem too
+// Recursively load a GMenuTreeDirectory; we could put this in ShellAppSystem
+// too
function _loadCategory(dir, list) {
let iter = dir.iter();
let appSystem = Shell.AppSystem.get_default();
@@ -126,7 +127,7 @@ const FolderView = new Lang.Class({
columnLimit: MAX_COLUMNS });
this.actor = this._grid.actor;
- //Standard hack for ClutterBinLayout
+ // Standard hack for ClutterBinLayout
this._grid.actor.x_expand = true;
this._items = {};
@@ -260,7 +261,6 @@ const PaginationScrollView = new Lang.Class({
_init: function(parent) {
this.parent();
-
this._stack = new St.Widget({layout_manager: new Clutter.BinLayout()});
this._box = new St.BoxLayout({vertical: true});
this._pages = new AppPages(this);
@@ -300,7 +300,7 @@ const PaginationScrollView = new Lang.Class({
}));
this._eventBlocker.add_action(this._clickAction);
},
-
+
vfunc_get_preferred_height: function (container, forWidht) {
return [0, 0];
},
@@ -308,7 +308,7 @@ const PaginationScrollView = new Lang.Class({
vfunc_get_preferred_width: function(container, forHeight) {
return [0, 0];
},
-
+
vfunc_allocate: function(box, flags) {
box = this.get_parent().allocation;
this.set_allocation(box, flags);
@@ -316,9 +316,8 @@ const PaginationScrollView = new Lang.Class({
let availHeight = box.y2 - box.y1;
let childBox = new Clutter.ActorBox();
- //Get the boxLayout inside scrollView
+ // Get the boxLayout inside scrollView
let child = this.get_children()[2];
-
childBox.x1 = 0;
childBox.y1 = 0;
childBox.x2 = availWidth;
@@ -363,20 +362,20 @@ const PaginationScrollView = new Lang.Class({
Tweener.addTween(this.vscroll.adjustment, params);
}
},
-
+
nPages: function() {
return this._pages.nPages();
},
-
+
currentPage: function() {
return this._currentPage;
},
-
+
_diffToPage: function (pageNumber) {
let currentScrollPosition = this.vscroll.adjustment.value;
return Math.abs(currentScrollPosition - this._pages._grid.getPagePosition(pageNumber)[1]);
},
-
+
_nearestPage: function() {
let currentNearestPage = 0;
let diff = this._diffToPage(currentNearestPage);
@@ -396,7 +395,7 @@ const PaginationScrollView = new Lang.Class({
_goToNearestPage: function(action) {
this._parent.goToPage(this._nearestPage(), action);
},
-
+
_onScroll: function(actor, event) {
let direction = event.get_scroll_direction();
let nextPage;
@@ -421,7 +420,7 @@ const PaginationScrollView = new Lang.Class({
this._updateIconOpacities(isOpen);
}));
},
-
+
_updateIconOpacities: function(folderOpen) {
for (let id in this._items) {
if (folderOpen && !this._items[id].actor.checked)
@@ -455,7 +454,7 @@ const PaginationScrollView = new Lang.Class({
const PaginationIconIndicator = new Lang.Class({
Name: 'PaginationIconIndicator',
-
+
_init: function(parent, index) {
this.actor = new St.Button({ style_class: 'show-apps',
@@ -485,7 +484,7 @@ const PaginationIconIndicator = new Lang.Class({
this._parent.goToPage(this._index);
return false;
},
-
+
setChecked: function (checked) {
this.actor.set_checked(checked);
}
@@ -549,12 +548,10 @@ const AllView = new Lang.Class({
let layout = new Clutter.BinLayout();
this.actor = new Shell.GenericContainer({ layout_manager: layout,
x_expand:true, y_expand:true });
-
layout.add(this._paginationView, 2,2);
layout.add(this._paginationIndicator, 2,3);
for(let i = 0; i < MAX_APPS_PAGES; i++) {
-
let indicatorIcon = new PaginationIconIndicator(this, i);
if(i == 0) {
indicatorIcon.setChecked(true);
@@ -595,16 +592,18 @@ const AllView = new Lang.Class({
addApp: function(app) {
let appIcon = this._paginationView._pages.addItem(app);
- /*if (appIcon)
- appIcon.actor.connect('key-focus-in',
- Lang.bind(this, this._ensureIconVisible));*/
+ /*
+ * if (appIcon) appIcon.actor.connect('key-focus-in', Lang.bind(this,
+ * this._ensureIconVisible));
+ */
},
addFolder: function(dir) {
let folderIcon = this._paginationView._pages.addItem(dir);
- /*if (folderIcon)
- folderIcon.actor.connect('key-focus-in',
- Lang.bind(this, this._ensureIconVisible));*/
+ /*
+ * if (folderIcon) folderIcon.actor.connect('key-focus-in',
+ * Lang.bind(this, this._ensureIconVisible));
+ */
},
addFolderPopup: function(popup) {
@@ -981,7 +980,6 @@ const AppFolderPopup = new Lang.Class({
visible: false,
// We don't want to expand really, but look
// at the layout manager of our parent...
- //
// DOUBLE HACK: if you set one, you automatically
// get the effect for the other direction too, so
// we need to set the y_align
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]