Convert users of static functions to new gjs syntax
svn path=/trunk/; revision=86
This commit is contained in:
parent
cedab08018
commit
3d41f586fc
@ -57,7 +57,7 @@ AppDisplayItem.prototype = {
|
|||||||
|
|
||||||
let name = appinfo.get_name();
|
let name = appinfo.get_name();
|
||||||
|
|
||||||
let icontheme = Gtk.icon_theme_get_default();
|
let icontheme = Gtk.IconTheme.get_default();
|
||||||
|
|
||||||
this._group = new Clutter.Group({reactive: true,
|
this._group = new Clutter.Group({reactive: true,
|
||||||
width: width,
|
width: width,
|
||||||
@ -114,7 +114,7 @@ function AppDisplay(x, y, width, height) {
|
|||||||
AppDisplay.prototype = {
|
AppDisplay.prototype = {
|
||||||
_init : function(x, y, width, height) {
|
_init : function(x, y, width, height) {
|
||||||
let me = this;
|
let me = this;
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
this._search = '';
|
this._search = '';
|
||||||
this._x = x;
|
this._x = x;
|
||||||
this._y = y;
|
this._y = y;
|
||||||
|
@ -84,7 +84,7 @@ ClutterFrameTicker.prototype = {
|
|||||||
Signals.addSignalMethods(ClutterFrameTicker.prototype);
|
Signals.addSignalMethods(ClutterFrameTicker.prototype);
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
Tweener.setFrameTicker(new ClutterFrameTicker());
|
Tweener.setFrameTicker(new ClutterFrameTicker());
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ function start() {
|
|||||||
// the stage. Returns true if we successfully grabbed the keyboard and
|
// the stage. Returns true if we successfully grabbed the keyboard and
|
||||||
// went modal, false otherwise
|
// went modal, false otherwise
|
||||||
function startModal() {
|
function startModal() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
if (!global.grab_keyboard())
|
if (!global.grab_keyboard())
|
||||||
return false;
|
return false;
|
||||||
@ -136,7 +136,7 @@ function startModal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function endModal() {
|
function endModal() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
global.ungrab_keyboard();
|
global.ungrab_keyboard();
|
||||||
global.set_stage_input_area(0, 0, global.screen_width, Panel.PANEL_HEIGHT);
|
global.set_stage_input_area(0, 0, global.screen_width, Panel.PANEL_HEIGHT);
|
||||||
|
@ -54,11 +54,11 @@ Sideshow.prototype = {
|
|||||||
_init : function(width) {
|
_init : function(width) {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
this._group = new Clutter.Group();
|
this._group = new Clutter.Group();
|
||||||
this._group.hide();
|
this._group.hide();
|
||||||
global.stage.add_actor(this._group);
|
global.stage.add_actor(this._group);
|
||||||
let icontheme = Gtk.icon_theme_get_default();
|
let icontheme = Gtk.IconTheme.get_default();
|
||||||
let rect = new Clutter.Rectangle({ color: SIDESHOW_SEARCH_BG_COLOR,
|
let rect = new Clutter.Rectangle({ color: SIDESHOW_SEARCH_BG_COLOR,
|
||||||
x: SIDESHOW_PAD,
|
x: SIDESHOW_PAD,
|
||||||
y: Panel.PANEL_HEIGHT + SIDESHOW_PAD,
|
y: Panel.PANEL_HEIGHT + SIDESHOW_PAD,
|
||||||
@ -130,7 +130,7 @@ Overlay.prototype = {
|
|||||||
_init : function() {
|
_init : function() {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
this._group = new Clutter.Group();
|
this._group = new Clutter.Group();
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@ -161,7 +161,7 @@ Overlay.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_recalculateSize: function () {
|
_recalculateSize: function () {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
let screenWidth = global.screen_width;
|
let screenWidth = global.screen_width;
|
||||||
let screenHeight = global.screen_height;
|
let screenHeight = global.screen_height;
|
||||||
// The desktop windows are shown on top of a scaled down version of the
|
// The desktop windows are shown on top of a scaled down version of the
|
||||||
@ -176,7 +176,7 @@ Overlay.prototype = {
|
|||||||
if (!this.visible) {
|
if (!this.visible) {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
let windows = global.get_windows();
|
let windows = global.get_windows();
|
||||||
let desktopWindow = null;
|
let desktopWindow = null;
|
||||||
@ -235,7 +235,7 @@ Overlay.prototype = {
|
|||||||
|
|
||||||
hide : function() {
|
hide : function() {
|
||||||
if (this.visible) {
|
if (this.visible) {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
global.window_group.show()
|
global.window_group.show()
|
||||||
@ -260,7 +260,7 @@ Overlay.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createDesktopRectangle : function() {
|
_createDesktopRectangle : function() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
// In the case when we have a desktop window from the file manager, its height is
|
// In the case when we have a desktop window from the file manager, its height is
|
||||||
// full-screen, i.e. it includes the height of the panel, so we should not subtract
|
// full-screen, i.e. it includes the height of the panel, so we should not subtract
|
||||||
// the height of the panel from global.screen_height here either to have them show
|
// the height of the panel from global.screen_height here either to have them show
|
||||||
|
@ -22,7 +22,7 @@ function Panel() {
|
|||||||
|
|
||||||
Panel.prototype = {
|
Panel.prototype = {
|
||||||
_init : function() {
|
_init : function() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
this._group = new Clutter.Group();
|
this._group = new Clutter.Group();
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ Panel.prototype = {
|
|||||||
// Struts determine the area along each side of the screen that is reserved
|
// Struts determine the area along each side of the screen that is reserved
|
||||||
// and not available to applications
|
// and not available to applications
|
||||||
_setStruts: function() {
|
_setStruts: function() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
let struts = [
|
let struts = [
|
||||||
new Meta.Strut({
|
new Meta.Strut({
|
||||||
|
@ -24,7 +24,7 @@ function RunDialog() {
|
|||||||
|
|
||||||
RunDialog.prototype = {
|
RunDialog.prototype = {
|
||||||
_init : function() {
|
_init : function() {
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
|
|
||||||
// All actors are inside _group. We create it initially
|
// All actors are inside _group. We create it initially
|
||||||
// hidden then show it in show()
|
// hidden then show it in show()
|
||||||
@ -111,7 +111,7 @@ RunDialog.prototype = {
|
|||||||
// return true;
|
// return true;
|
||||||
// });
|
// });
|
||||||
|
|
||||||
let global = Shell.global_get();
|
let global = Shell.Global.get();
|
||||||
global.stage.set_key_focus(this._entry);
|
global.stage.set_key_focus(this._entry);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -18,7 +18,7 @@ WindowManager.prototype = {
|
|||||||
_init : function() {
|
_init : function() {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
this._global = Shell.global_get();
|
this._global = Shell.Global.get();
|
||||||
this._shellwm = this._global.window_manager;
|
this._shellwm = this._global.window_manager;
|
||||||
|
|
||||||
this._switchData = null;
|
this._switchData = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user