[gnome-shell] overviewControls: use Params for SlidingControl constructor
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overviewControls: use Params for SlidingControl constructor
- Date: Tue, 19 Feb 2013 03:50:44 +0000 (UTC)
commit 21403b19e001e85a5eb4553e16ea30dab6b0ee5c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Feb 18 22:35:04 2013 -0500
overviewControls: use Params for SlidingControl constructor
https://bugzilla.gnome.org/show_bug.cgi?id=686984
js/ui/overviewControls.js | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 42e26a1..ccd6543 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -6,6 +6,7 @@ const St = imports.gi.St;
const Shell = imports.gi.Shell;
const Main = imports.ui.main;
+const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const ViewSelector = imports.ui.viewSelector;
@@ -88,11 +89,14 @@ const SlideLayout = new Lang.Class({
const SlidingControl = new Lang.Class({
Name: 'SlidingControl',
- _init: function() {
+ _init: function(params) {
+ params = Params.parse(params, { slideDirection: SlideDirection.LEFT });
+
this.visible = true;
this.inDrag = false;
this.layout = new SlideLayout();
+ this.layout.slideDirection = params.slideDirection;
this.actor = new St.Widget({ layout_manager: this.layout,
clip_to_allocation: true });
@@ -222,9 +226,7 @@ const ThumbnailsSlider = new Lang.Class({
Extends: SlidingControl,
_init: function(thumbnailsBox) {
- this.parent();
-
- this.layout.slideDirection = SlideDirection.RIGHT;
+ this.parent({ slideDirection: SlideDirection.RIGHT });
this._thumbnailsBox = thumbnailsBox;
@@ -296,9 +298,7 @@ const DashSlider = new Lang.Class({
Extends: SlidingControl,
_init: function(dash) {
- this.parent();
-
- this.layout.slideDirection = SlideDirection.LEFT;
+ this.parent({ slideDirection: SlideDirection.LEFT });
this._dash = dash;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]