various: update the extensions for gnome-shell API changes

GNOME Shell has changed internal API here and there, and this
broke some extensions.
alternate-tab and dock still have issues, I'll try to solve them
post 3.2.0
This commit is contained in:
Giovanni Campagna
2011-10-03 17:31:43 +01:00
parent e102c0c666
commit c256ed802b
4 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -69,8 +69,8 @@ AltTabPopupW.prototype = {
__proto__ : AltTab.AltTabPopup.prototype,
show : function(backward, switch_group) {
let tracker = Shell.WindowTracker.get_default();
let apps = tracker.get_running_apps ('');
let appSys = Shell.AppSystem.get_default();
let apps = appSys.get_running ();
if (!apps.length)
return false;
@@ -358,8 +358,8 @@ AltTabPopup2.prototype = {
let list = '';
let normal_windows= [];
let appIcons = [];
let tracker = Shell.WindowTracker.get_default();
let apps = tracker.get_running_apps ('');
let appSys = Shell.AppSystem.get_default();
let apps = appSys.get_running();
for (let w = windows.length-1; w >= 0; w--) {
let win = windows[w].get_meta_window();
@@ -507,8 +507,8 @@ WindowList.prototype = {
let win=windows[w];
let tracker = Shell.WindowTracker.get_default();
let apps = tracker.get_running_apps ('');
let appSys = Shell.AppSystem.get_default();
let apps = appSys.get_running();
let ap1 = null;
for (let i = 0; i < apps.length; i++) {
let app_wins = apps[i].get_windows();
@@ -114,7 +114,7 @@ function reset(statusMenu) {
}
function enable() {
let statusMenu = Main.panel._userMenu;
let statusMenu = Main.panel._statusArea.userMenu;
statusMenu.menu.removeAll();
createSubMenu.call(statusMenu);
reset(statusMenu);
@@ -122,7 +122,7 @@ function enable() {
function disable() {
// not guarranteed to work, if more extensions operate in the same place
let statusMenu = Main.panel._userMenu;
let statusMenu = Main.panel._statusArea.userMenu;
statusMenu.menu.removeAll();
statusMenu._createSubMenu();
reset(statusMenu);
+3 -6
View File
@@ -295,7 +295,7 @@ Dock.prototype = {
this._installedChangedId = this._appSystem.connect('installed-changed', Lang.bind(this, this._queueRedisplay));
this._appFavoritesChangedId = AppFavorites.getAppFavorites().connect('changed', Lang.bind(this, this._queueRedisplay));
this._appStateChangedId = this._tracker.connect('app-state-changed', Lang.bind(this, this._queueRedisplay));
this._appStateChangedId = this._appSystem.connect('app-state-changed', Lang.bind(this, this._queueRedisplay));
this._overviewShowingId = Main.overview.connect('showing', Lang.bind(this, function() {
this.actor.hide();
@@ -386,7 +386,7 @@ Dock.prototype = {
}
if (this._appStateChangedId) {
this._tracker.disconnect(this._appStateChangedId);
this._appSystem.disconnect(this._appStateChangedId);
this._appStateChangedId = 0;
}
@@ -450,10 +450,7 @@ Dock.prototype = {
let favorites = AppFavorites.getAppFavorites().getFavoriteMap();
/* hardcode here pending some design about how exactly desktop contexts behave */
let contextId = '';
let running = this._tracker.get_running_apps(contextId);
let running = this._appSystem.get_running();
let runningIds = this._appIdListToHash(running);
let icons = 0;
+5 -2
View File
@@ -21,7 +21,10 @@ WorkspaceIndicator.prototype = {
this._currentWorkspace = global.screen.get_active_workspace().index();
this.statusLabel = new St.Label({ text: this._labelText() });
this.actor.set_child(this.statusLabel);
// destroy all previously created children, and add our statusLabel
this.actor.get_children().forEach(function(c) { c.destroy() });
this.actor.add_actor(this.statusLabel);
this.workspacesItems = [];
this._workspaceSection = new PopupMenu.PopupMenuSection();
@@ -94,7 +97,7 @@ WorkspaceIndicator.prototype = {
}
function init(meta) {
Panel.STANDARD_TRAY_ICON_ORDER.unshift('workspace-indicator');
// empty
}
let _indicator;