Update all extensions for gnome-shell 3.9.90
addActor() gone from PopupBaseMenuItem, arrows in menus, SystemStatusButton gone. The auto-move-windows cleanup is probably older, weird noone noticed before. Anyway, I need a pitch fork.
This commit is contained in:
@@ -36,7 +36,7 @@ const ActivitiesMenuItem = new Lang.Class({
|
|||||||
_init: function(button) {
|
_init: function(button) {
|
||||||
this.parent();
|
this.parent();
|
||||||
this._button = button;
|
this._button = button;
|
||||||
this.addActor(new St.Label({ text: _("Activities Overview") }));
|
this.actor.add_child(new St.Label({ text: _("Activities Overview") }));
|
||||||
},
|
},
|
||||||
|
|
||||||
activate: function(event) {
|
activate: function(event) {
|
||||||
@@ -56,10 +56,10 @@ const ApplicationMenuItem = new Lang.Class({
|
|||||||
this._button = button;
|
this._button = button;
|
||||||
|
|
||||||
this._iconBin = new St.Bin();
|
this._iconBin = new St.Bin();
|
||||||
this.addActor(this._iconBin);
|
this.actor.add_child(this._iconBin);
|
||||||
|
|
||||||
let appLabel = new St.Label({ text: app.get_name() });
|
let appLabel = new St.Label({ text: app.get_name() });
|
||||||
this.addActor(appLabel, { expand: true });
|
this.actor.add_child(appLabel, { expand: true });
|
||||||
this.actor.label_actor = appLabel;
|
this.actor.label_actor = appLabel;
|
||||||
|
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
@@ -112,7 +112,7 @@ const CategoryMenuItem = new Lang.Class({
|
|||||||
else
|
else
|
||||||
name = _("Favorites");
|
name = _("Favorites");
|
||||||
|
|
||||||
this.addActor(new St.Label({ text: name }));
|
this.actor.add_child(new St.Label({ text: name }));
|
||||||
this.actor.connect('motion-event', Lang.bind(this, this._onMotionEvent));
|
this.actor.connect('motion-event', Lang.bind(this, this._onMotionEvent));
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -273,9 +273,17 @@ const ApplicationsButton = new Lang.Class({
|
|||||||
// role ATK_ROLE_MENU like other elements of the panel.
|
// role ATK_ROLE_MENU like other elements of the panel.
|
||||||
this.actor.accessible_role = Atk.Role.LABEL;
|
this.actor.accessible_role = Atk.Role.LABEL;
|
||||||
|
|
||||||
this._label = new St.Label({ text: _("Applications") });
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
|
|
||||||
this.actor.add_actor(this._label);
|
this._label = new St.Label({ text: _("Applications"),
|
||||||
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER });
|
||||||
|
hbox.add_child(this._label);
|
||||||
|
hbox.add_child(new St.Label({ text: '\u25BE',
|
||||||
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER }));
|
||||||
|
|
||||||
|
this.actor.add_actor(hbox);
|
||||||
this.actor.name = 'panelApplications';
|
this.actor.name = 'panelApplications';
|
||||||
this.actor.label_actor = this._label;
|
this.actor.label_actor = this._label;
|
||||||
|
|
||||||
|
|||||||
@@ -89,10 +89,10 @@ function init() {
|
|||||||
|
|
||||||
function myCheckWorkspaces() {
|
function myCheckWorkspaces() {
|
||||||
let i;
|
let i;
|
||||||
let emptyWorkspaces = new Array(Main._workspaces.length);
|
let emptyWorkspaces = new Array(this._workspaces.length);
|
||||||
|
|
||||||
for (i = 0; i < Main._workspaces.length; i++) {
|
for (i = 0; i < this._workspaces.length; i++) {
|
||||||
let lastRemoved = Main._workspaces[i]._lastRemovedWindow;
|
let lastRemoved = this._workspaces[i]._lastRemovedWindow;
|
||||||
if (lastRemoved &&
|
if (lastRemoved &&
|
||||||
(lastRemoved.get_window_type() == Meta.WindowType.SPLASHSCREEN ||
|
(lastRemoved.get_window_type() == Meta.WindowType.SPLASHSCREEN ||
|
||||||
lastRemoved.get_window_type() == Meta.WindowType.DIALOG ||
|
lastRemoved.get_window_type() == Meta.WindowType.DIALOG ||
|
||||||
@@ -129,13 +129,13 @@ function myCheckWorkspaces() {
|
|||||||
|
|
||||||
if (removingTrailWorkspaces) {
|
if (removingTrailWorkspaces) {
|
||||||
// "Merge" the empty workspace we are removing with the one at the end
|
// "Merge" the empty workspace we are removing with the one at the end
|
||||||
Main.wm.blockAnimations();
|
this._wm.blockAnimations();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete other empty workspaces; do it from the end to avoid index changes
|
// Delete other empty workspaces; do it from the end to avoid index changes
|
||||||
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
|
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
|
||||||
if (emptyWorkspaces[i])
|
if (emptyWorkspaces[i])
|
||||||
global.screen.remove_workspace(Main._workspaces[i], global.get_current_time());
|
global.screen.remove_workspace(this._workspaces[i], global.get_current_time());
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -143,25 +143,25 @@ function myCheckWorkspaces() {
|
|||||||
if (removingTrailWorkspaces) {
|
if (removingTrailWorkspaces) {
|
||||||
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
|
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
|
||||||
|
|
||||||
Main.wm.unblockAnimations();
|
this._wm.unblockAnimations();
|
||||||
|
|
||||||
if (!Main.overview.visible && showOverview)
|
if (!Main.overview.visible && showOverview)
|
||||||
Main.overview.show();
|
Main.overview.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
Main._checkWorkspacesId = 0;
|
this._checkWorkspacesId = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function enable() {
|
function enable() {
|
||||||
prevCheckWorkspaces = Main._checkWorkspaces;
|
prevCheckWorkspaces = Main.wm._workspaceTracker._checkWorkspaces;
|
||||||
if (Meta.prefs_get_dynamic_workspaces())
|
if (Meta.prefs_get_dynamic_workspaces())
|
||||||
Main._checkWorkspaces = myCheckWorkspaces;
|
Main.wm._workspaceTracker._checkWorkspaces = myCheckWorkspaces;
|
||||||
|
|
||||||
winMover = new WindowMover();
|
winMover = new WindowMover();
|
||||||
}
|
}
|
||||||
|
|
||||||
function disable() {
|
function disable() {
|
||||||
Main._checkWorkspaces = prevCheckWorkspaces;
|
Main.wm._workspaceTracker._checkWorkspaces = prevCheckWorkspaces;
|
||||||
winMover.destroy();
|
winMover.destroy();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// Drive menu extension
|
// Drive menu extension
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
@@ -25,7 +26,7 @@ const MountMenuItem = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
this.label = new St.Label({ text: mount.get_name() });
|
this.label = new St.Label({ text: mount.get_name() });
|
||||||
this.addActor(this.label);
|
this.actor.add(this.label, { expand: true });
|
||||||
this.actor.label_actor = this.label;
|
this.actor.label_actor = this.label;
|
||||||
|
|
||||||
this.mount = mount;
|
this.mount = mount;
|
||||||
@@ -34,7 +35,7 @@ const MountMenuItem = new Lang.Class({
|
|||||||
style_class: 'popup-menu-icon ' });
|
style_class: 'popup-menu-icon ' });
|
||||||
let ejectButton = new St.Button({ child: ejectIcon });
|
let ejectButton = new St.Button({ child: ejectIcon });
|
||||||
ejectButton.connect('clicked', Lang.bind(this, this._eject));
|
ejectButton.connect('clicked', Lang.bind(this, this._eject));
|
||||||
this.addActor(ejectButton);
|
this.actor.add(ejectButton);
|
||||||
},
|
},
|
||||||
|
|
||||||
_eject: function() {
|
_eject: function() {
|
||||||
@@ -83,10 +84,20 @@ const MountMenuItem = new Lang.Class({
|
|||||||
|
|
||||||
const DriveMenu = new Lang.Class({
|
const DriveMenu = new Lang.Class({
|
||||||
Name: 'DriveMenu.DriveMenu',
|
Name: 'DriveMenu.DriveMenu',
|
||||||
Extends: PanelMenu.SystemStatusButton,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent('media-eject-symbolic', _("Removable devices"));
|
this.parent(0.0, _("Removable devices"));
|
||||||
|
|
||||||
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
|
let icon = new St.Icon({ icon_name: 'media-eject-symbolic',
|
||||||
|
style_class: 'system-status-icon' });
|
||||||
|
|
||||||
|
hbox.add_child(icon);
|
||||||
|
hbox.add_child(new St.Label({ text: '\u25BE',
|
||||||
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER }));
|
||||||
|
this.actor.add_child(hbox);
|
||||||
|
|
||||||
this._monitor = Gio.VolumeMonitor.get();
|
this._monitor = Gio.VolumeMonitor.get();
|
||||||
this._addedId = this._monitor.connect('mount-added', Lang.bind(this, function(monitor, mount) {
|
this._addedId = this._monitor.connect('mount-added', Lang.bind(this, function(monitor, mount) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
@@ -32,10 +33,10 @@ const PlaceMenuItem = new Lang.Class({
|
|||||||
|
|
||||||
this._icon = new St.Icon({ gicon: info.icon,
|
this._icon = new St.Icon({ gicon: info.icon,
|
||||||
icon_size: PLACE_ICON_SIZE });
|
icon_size: PLACE_ICON_SIZE });
|
||||||
this.addActor(this._icon);
|
this.actor.add_child(this._icon);
|
||||||
|
|
||||||
this._label = new St.Label({ text: info.name });
|
this._label = new St.Label({ text: info.name });
|
||||||
this.addActor(this._label);
|
this.actor.add_child(this._label);
|
||||||
|
|
||||||
this._changedId = info.connect('changed',
|
this._changedId = info.connect('changed',
|
||||||
Lang.bind(this, this._propertiesChanged));
|
Lang.bind(this, this._propertiesChanged));
|
||||||
@@ -74,9 +75,17 @@ const PlacesMenu = new Lang.Class({
|
|||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
let label = new St.Label({ text: _("Places") });
|
this.parent(0.0, _("Places"));
|
||||||
this.parent(0.0, label.text);
|
|
||||||
this.actor.add_actor(label);
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
|
let label = new St.Label({ text: _("Places"),
|
||||||
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER });
|
||||||
|
hbox.add_child(label);
|
||||||
|
hbox.add_child(new St.Label({ text: '\u25BE',
|
||||||
|
y_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER }));
|
||||||
|
this.actor.add_actor(hbox);
|
||||||
|
|
||||||
this.placesManager = new PlaceDisplay.PlacesManager();
|
this.placesManager = new PlaceDisplay.PlacesManager();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user