js: Stop using ClutterContainer API
These have been long deprecated over in clutter, and (via several vtables) simply forward the call to the equivalent ClutterActor methods Save ourselves the hassle and just use ClutterActor methods directly Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>
This commit is contained in:
parent
ed3b8d093e
commit
350cd296fa
@ -97,7 +97,7 @@ export const AuthList = GObject.registerClass({
|
||||
pseudo_class: 'expanded',
|
||||
});
|
||||
|
||||
this._scrollView.add_actor(this._box);
|
||||
this._scrollView.add_child(this._box);
|
||||
this._items = new Map();
|
||||
|
||||
this.connect('key-focus-in', this._moveFocusToItems.bind(this));
|
||||
@ -142,7 +142,7 @@ export const AuthList = GObject.registerClass({
|
||||
this.removeItem(key);
|
||||
|
||||
let item = new AuthListItem(key, text);
|
||||
this._box.add(item);
|
||||
this._box.add_child(item);
|
||||
|
||||
this._items.set(key, item);
|
||||
|
||||
|
@ -68,7 +68,7 @@ export const UserListItem = GObject.registerClass({
|
||||
});
|
||||
|
||||
this._userWidget = new UserWidget.UserWidget(this.user);
|
||||
layout.add(this._userWidget);
|
||||
layout.add_child(this._userWidget);
|
||||
|
||||
this._userWidget.bind_property('label-actor',
|
||||
this, 'label-actor',
|
||||
@ -79,7 +79,7 @@ export const UserListItem = GObject.registerClass({
|
||||
scale_x: 0,
|
||||
visible: false,
|
||||
});
|
||||
layout.add(this._timedLoginIndicator);
|
||||
layout.add_child(this._timedLoginIndicator);
|
||||
|
||||
this._onUserChanged();
|
||||
}
|
||||
@ -179,7 +179,7 @@ const UserList = GObject.registerClass({
|
||||
pseudo_class: 'expanded',
|
||||
});
|
||||
|
||||
this.add_actor(this._box);
|
||||
this.add_child(this._box);
|
||||
this._items = {};
|
||||
}
|
||||
|
||||
@ -333,7 +333,7 @@ const SessionMenuButton = GObject.registerClass({
|
||||
this._button = button;
|
||||
|
||||
this._menu = new PopupMenu.PopupMenu(this._button, 0, St.Side.BOTTOM);
|
||||
Main.uiGroup.add_actor(this._menu.actor);
|
||||
Main.uiGroup.add_child(this._menu.actor);
|
||||
this._menu.actor.hide();
|
||||
|
||||
this._menu.connect('open-state-changed', (menu, isOpen) => {
|
||||
@ -497,7 +497,7 @@ export const LoginDialog = GObject.registerClass({
|
||||
|
||||
let bannerBox = new St.BoxLayout({vertical: true});
|
||||
|
||||
this._bannerView.add_actor(bannerBox);
|
||||
this._bannerView.add_child(bannerBox);
|
||||
this._bannerLabel = new St.Label({
|
||||
style_class: 'login-dialog-banner',
|
||||
text: '',
|
||||
|
@ -47,7 +47,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
|
||||
let choices = options['choices'] || [];
|
||||
|
||||
let content = new Dialog.MessageDialogContent({title, description});
|
||||
this.contentLayout.add_actor(content);
|
||||
this.contentLayout.add_child(content);
|
||||
|
||||
this._choices = new Map();
|
||||
|
||||
|
@ -387,7 +387,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
||||
this._thumbnailsFocused = false;
|
||||
});
|
||||
|
||||
this.add_actor(this._thumbnails);
|
||||
this.add_child(this._thumbnails);
|
||||
|
||||
// Need to force an allocation so we can figure out whether we
|
||||
// need to scroll when selecting
|
||||
@ -414,10 +414,10 @@ class CyclerHighlight extends St.Widget {
|
||||
this._window = null;
|
||||
|
||||
this._clone = new Clutter.Clone();
|
||||
this.add_actor(this._clone);
|
||||
this.add_child(this._clone);
|
||||
|
||||
this._highlight = new St.Widget({style_class: 'cycler-highlight'});
|
||||
this.add_actor(this._highlight);
|
||||
this.add_child(this._highlight);
|
||||
|
||||
let coordinate = Clutter.BindCoordinate.ALL;
|
||||
let constraint = new Clutter.BindConstraint({coordinate});
|
||||
@ -495,7 +495,7 @@ const CyclerPopup = GObject.registerClass({
|
||||
this._items = this._getWindows();
|
||||
|
||||
this._highlight = new CyclerHighlight();
|
||||
global.window_group.add_actor(this._highlight);
|
||||
global.window_group.add_child(this._highlight);
|
||||
|
||||
this._switcherList = new CyclerList();
|
||||
this._switcherList.connect('item-highlighted', (list, index) => {
|
||||
@ -884,7 +884,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
|
||||
let arrow = new St.DrawingArea({style_class: 'switcher-arrow'});
|
||||
arrow.connect('repaint', () => SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM));
|
||||
this.add_actor(arrow);
|
||||
this.add_child(arrow);
|
||||
this._arrows.push(arrow);
|
||||
|
||||
if (appIcon.cachedWindows.length === 1)
|
||||
@ -926,7 +926,7 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
|
||||
|
||||
let bin = new St.Bin({style_class: 'thumbnail'});
|
||||
|
||||
box.add_actor(bin);
|
||||
box.add_child(bin);
|
||||
this._thumbnailBins.push(bin);
|
||||
|
||||
const title = windows[i].get_title();
|
||||
@ -936,7 +936,7 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._labels.push(name);
|
||||
box.add_actor(name);
|
||||
box.add_child(name);
|
||||
|
||||
this.addItem(box, name);
|
||||
}
|
||||
@ -965,7 +965,7 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
|
||||
|
||||
let clone = _createWindowClone(mutterWindow, thumbnailSize);
|
||||
this._thumbnailBins[i].set_height(binHeight);
|
||||
this._thumbnailBins[i].add_actor(clone);
|
||||
this._thumbnailBins[i].add_child(clone);
|
||||
|
||||
mutterWindow.connectObject('destroy',
|
||||
source => this._removeThumbnail(source, clone), this);
|
||||
@ -1026,22 +1026,22 @@ class WindowIcon extends St.BoxLayout {
|
||||
switch (mode) {
|
||||
case AppIconMode.THUMBNAIL_ONLY:
|
||||
size = WINDOW_PREVIEW_SIZE;
|
||||
this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
|
||||
this._icon.add_child(_createWindowClone(mutterWindow, size * scaleFactor));
|
||||
break;
|
||||
|
||||
case AppIconMode.BOTH:
|
||||
size = WINDOW_PREVIEW_SIZE;
|
||||
this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
|
||||
this._icon.add_child(_createWindowClone(mutterWindow, size * scaleFactor));
|
||||
|
||||
if (this.app) {
|
||||
this._icon.add_actor(
|
||||
this._icon.add_child(
|
||||
this._createAppIcon(this.app, APP_ICON_SIZE_SMALL));
|
||||
}
|
||||
break;
|
||||
|
||||
case AppIconMode.APP_ICON_ONLY:
|
||||
size = APP_ICON_SIZE;
|
||||
this._icon.add_actor(this._createAppIcon(this.app, size));
|
||||
this._icon.add_child(this._createAppIcon(this.app, size));
|
||||
}
|
||||
|
||||
this._icon.set_size(size * scaleFactor, size * scaleFactor);
|
||||
@ -1067,7 +1067,7 @@ class WindowSwitcher extends SwitcherPopup.SwitcherList {
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this.add_actor(this._label);
|
||||
this.add_child(this._label);
|
||||
|
||||
this.windows = windows;
|
||||
this.icons = [];
|
||||
|
@ -527,7 +527,7 @@ var BaseAppView = GObject.registerClass({
|
||||
this._scrollTimeoutId = 0;
|
||||
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
|
||||
|
||||
this._scrollView.add_actor(this._grid);
|
||||
this._scrollView.add_child(this._grid);
|
||||
|
||||
const scroll = this._scrollView.hscroll;
|
||||
this._adjustment = scroll.adjustment;
|
||||
@ -3143,7 +3143,7 @@ export const AppIcon = GObject.registerClass({
|
||||
Main.overview.connectObject('hiding',
|
||||
() => this._menu.close(), this);
|
||||
|
||||
Main.uiGroup.add_actor(this._menu.actor);
|
||||
Main.uiGroup.add_child(this._menu.actor);
|
||||
this._menuManager.addMenu(this._menu);
|
||||
}
|
||||
|
||||
|
@ -111,21 +111,21 @@ const AudioDeviceSelectionDialog = GObject.registerClass({
|
||||
style_class: 'audio-selection-device-icon',
|
||||
icon_name: this._getDeviceIcon(device),
|
||||
});
|
||||
box.add(icon);
|
||||
box.add_child(icon);
|
||||
|
||||
const label = new St.Label({
|
||||
style_class: 'audio-selection-device-label',
|
||||
text: this._getDeviceLabel(device),
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
box.add(label);
|
||||
box.add_child(label);
|
||||
|
||||
const button = new St.Button({
|
||||
style_class: 'audio-selection-device',
|
||||
can_focus: true,
|
||||
child: box,
|
||||
});
|
||||
this._selectionBox.add(button);
|
||||
this._selectionBox.add_child(button);
|
||||
|
||||
button.connect('clicked', () => {
|
||||
this.emit('device-selected', device);
|
||||
|
@ -19,7 +19,7 @@ export class BackgroundMenu extends PopupMenu.PopupMenu {
|
||||
|
||||
this.actor.add_style_class_name('background-menu');
|
||||
|
||||
layoutManager.uiGroup.add_actor(this.actor);
|
||||
layoutManager.uiGroup.add_child(this.actor);
|
||||
this.actor.hide();
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,10 @@ export const BoxPointer = GObject.registerClass({
|
||||
this._arrowOrigin = 0;
|
||||
this._arrowActor = null;
|
||||
this.bin = new St.Bin(binProperties);
|
||||
this.add_actor(this.bin);
|
||||
this.add_child(this.bin);
|
||||
this._border = new St.DrawingArea();
|
||||
this._border.connect('repaint', this._drawBorder.bind(this));
|
||||
this.add_actor(this._border);
|
||||
this.add_child(this._border);
|
||||
this.set_child_above_sibling(this.bin, this._border);
|
||||
this._sourceAlignment = 0.5;
|
||||
this._muteKeys = true;
|
||||
|
@ -501,7 +501,7 @@ export const Calendar = GObject.registerClass({
|
||||
accessible_name: _('Previous month'),
|
||||
can_focus: true,
|
||||
});
|
||||
this._topBox.add(this._backButton);
|
||||
this._topBox.add_child(this._backButton);
|
||||
this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this));
|
||||
|
||||
this._monthLabel = new St.Label({
|
||||
@ -519,7 +519,7 @@ export const Calendar = GObject.registerClass({
|
||||
accessible_name: _('Next month'),
|
||||
can_focus: true,
|
||||
});
|
||||
this._topBox.add(this._forwardButton);
|
||||
this._topBox.add_child(this._forwardButton);
|
||||
this._forwardButton.connect('clicked', this._onNextMonthButtonClicked.bind(this));
|
||||
|
||||
// Add weekday labels...
|
||||
@ -903,10 +903,10 @@ class Placeholder extends St.BoxLayout {
|
||||
this._date = new Date();
|
||||
|
||||
this._icon = new St.Icon({icon_name: 'no-notifications-symbolic'});
|
||||
this.add_actor(this._icon);
|
||||
this.add_child(this._icon);
|
||||
|
||||
this._label = new St.Label({text: _('No Notifications')});
|
||||
this.add_actor(this._label);
|
||||
this.add_child(this._label);
|
||||
}
|
||||
});
|
||||
|
||||
@ -941,14 +941,14 @@ class CalendarMessageList extends St.Widget {
|
||||
});
|
||||
|
||||
this._placeholder = new Placeholder();
|
||||
this.add_actor(this._placeholder);
|
||||
this.add_child(this._placeholder);
|
||||
|
||||
let box = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.add_actor(box);
|
||||
this.add_child(box);
|
||||
|
||||
this._scrollView = new St.ScrollView({
|
||||
style_class: 'vfade',
|
||||
@ -956,7 +956,7 @@ class CalendarMessageList extends St.Widget {
|
||||
x_expand: true, y_expand: true,
|
||||
});
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
||||
box.add_actor(this._scrollView);
|
||||
box.add_child(this._scrollView);
|
||||
|
||||
let hbox = new St.BoxLayout({style_class: 'message-list-controls'});
|
||||
box.add_child(hbox);
|
||||
@ -991,7 +991,7 @@ class CalendarMessageList extends St.Widget {
|
||||
this._clearButton.connect('clicked', () => {
|
||||
this._sectionList.get_children().forEach(s => s.clear());
|
||||
});
|
||||
hbox.add_actor(this._clearButton);
|
||||
hbox.add_child(this._clearButton);
|
||||
|
||||
this._placeholder.bind_property('visible',
|
||||
this._clearButton, 'visible',
|
||||
@ -1008,7 +1008,7 @@ class CalendarMessageList extends St.Widget {
|
||||
'actor-added', this._sync.bind(this),
|
||||
'actor-removed', this._sync.bind(this),
|
||||
this);
|
||||
this._scrollView.add_actor(this._sectionList);
|
||||
this._scrollView.add_child(this._sectionList);
|
||||
|
||||
this._mediaSection = new Mpris.MediaSection();
|
||||
this._addSection(this._mediaSection);
|
||||
@ -1024,11 +1024,11 @@ class CalendarMessageList extends St.Widget {
|
||||
'notify::visible', this._sync.bind(this),
|
||||
'notify::empty', this._sync.bind(this),
|
||||
'notify::can-clear', this._sync.bind(this),
|
||||
'destroy', () => this._sectionList.remove_actor(section),
|
||||
'destroy', () => this._sectionList.remove_child(section),
|
||||
'message-focused', (_s, messageActor) => {
|
||||
ensureActorVisibleInScrollView(this._scrollView, messageActor);
|
||||
}, this);
|
||||
this._sectionList.add_actor(section);
|
||||
this._sectionList.add_child(section);
|
||||
}
|
||||
|
||||
_sync() {
|
||||
|
@ -21,13 +21,13 @@ class CheckBox extends St.Button {
|
||||
this.set_accessible_role(Atk.Role.CHECK_BOX);
|
||||
|
||||
this._box = new St.Bin({y_align: Clutter.ActorAlign.START});
|
||||
container.add_actor(this._box);
|
||||
container.add_child(this._box);
|
||||
|
||||
this._label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
|
||||
this._label.clutter_text.set_line_wrap(true);
|
||||
this._label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
|
||||
this.set_label_actor(this._label);
|
||||
container.add_actor(this._label);
|
||||
container.add_child(this._label);
|
||||
|
||||
if (label)
|
||||
this.setLabel(label);
|
||||
|
@ -312,7 +312,7 @@ class AutorunNotification extends MessageTray.Notification {
|
||||
gicon: app.get_icon(),
|
||||
style_class: 'hotplug-notification-item-icon',
|
||||
});
|
||||
box.add(icon);
|
||||
box.add_child(icon);
|
||||
|
||||
let label = new St.Bin({
|
||||
child: new St.Label({
|
||||
@ -320,7 +320,7 @@ class AutorunNotification extends MessageTray.Notification {
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
}),
|
||||
});
|
||||
box.add(label);
|
||||
box.add_child(label);
|
||||
|
||||
const button = new St.Button({
|
||||
child: box,
|
||||
|
@ -880,7 +880,7 @@ class ChatNotificationBanner extends MessageTray.NotificationBanner {
|
||||
style_class: 'chat-body',
|
||||
vertical: true,
|
||||
});
|
||||
this._scrollArea.add_actor(this._contentArea);
|
||||
this._scrollArea.add_child(this._contentArea);
|
||||
|
||||
this.setExpandedBody(this._scrollArea);
|
||||
this.setExpandedLines(CHAT_EXPAND_LINES);
|
||||
@ -942,8 +942,8 @@ class ChatNotificationBanner extends MessageTray.NotificationBanner {
|
||||
}
|
||||
|
||||
let lineBox = new ChatLineBox();
|
||||
lineBox.add(body);
|
||||
this._contentArea.add_actor(lineBox);
|
||||
lineBox.add_child(body);
|
||||
this._contentArea.add_child(lineBox);
|
||||
this._messageActors.set(message, lineBox);
|
||||
|
||||
this._updateTimestamp(message);
|
||||
@ -966,7 +966,7 @@ class ChatNotificationBanner extends MessageTray.NotificationBanner {
|
||||
timeLabel.x_expand = timeLabel.y_expand = true;
|
||||
timeLabel.x_align = timeLabel.y_align = Clutter.ActorAlign.END;
|
||||
|
||||
actor.add_actor(timeLabel);
|
||||
actor.add_child(timeLabel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ class DashItemContainer extends St.Widget {
|
||||
|
||||
this.child = actor;
|
||||
this.child.y_expand = true;
|
||||
this.add_actor(this.child);
|
||||
this.add_child(this.child);
|
||||
}
|
||||
|
||||
show(animate) {
|
||||
@ -210,7 +210,7 @@ class ShowAppsIcon extends DashItemContainer {
|
||||
});
|
||||
this.icon.y_align = Clutter.ActorAlign.CENTER;
|
||||
|
||||
this.toggleButton.add_actor(this.icon);
|
||||
this.toggleButton.add_child(this.icon);
|
||||
this.toggleButton._delegate = this;
|
||||
|
||||
this.setChild(this.toggleButton);
|
||||
|
@ -64,16 +64,16 @@ class TodayButton extends St.Button {
|
||||
});
|
||||
|
||||
const hbox = new St.BoxLayout({vertical: true});
|
||||
this.add_actor(hbox);
|
||||
this.add_child(hbox);
|
||||
|
||||
this._dayLabel = new St.Label({
|
||||
style_class: 'day-label',
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
hbox.add_actor(this._dayLabel);
|
||||
hbox.add_child(this._dayLabel);
|
||||
|
||||
this._dateLabel = new St.Label({style_class: 'date-label'});
|
||||
hbox.add_actor(this._dateLabel);
|
||||
hbox.add_child(this._dateLabel);
|
||||
|
||||
this._calendar = calendar;
|
||||
this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
|
||||
@ -272,11 +272,11 @@ class EventsSection extends St.Button {
|
||||
style_class: 'event-box',
|
||||
vertical: true,
|
||||
});
|
||||
box.add(new St.Label({
|
||||
box.add_child(new St.Label({
|
||||
text: event.summary,
|
||||
style_class: 'event-summary',
|
||||
}));
|
||||
box.add(new St.Label({
|
||||
box.add_child(new St.Label({
|
||||
text: this._formatEventTime(event),
|
||||
style_class: 'event-time',
|
||||
}));
|
||||
@ -868,12 +868,12 @@ class DateMenuButton extends PanelMenu.Button {
|
||||
}));
|
||||
|
||||
let box = new St.BoxLayout({style_class: 'clock-display-box'});
|
||||
box.add_actor(indicatorPad);
|
||||
box.add_actor(this._clockDisplay);
|
||||
box.add_actor(this._indicator);
|
||||
box.add_child(indicatorPad);
|
||||
box.add_child(this._clockDisplay);
|
||||
box.add_child(this._indicator);
|
||||
|
||||
this.label_actor = this._clockDisplay;
|
||||
this.add_actor(box);
|
||||
this.add_child(box);
|
||||
this.add_style_class_name('clock-display');
|
||||
|
||||
let layout = new FreezableBinLayout();
|
||||
@ -883,7 +883,7 @@ class DateMenuButton extends PanelMenu.Button {
|
||||
this.menu.box.add_child(bin);
|
||||
|
||||
hbox = new St.BoxLayout({name: 'calendarArea'});
|
||||
bin.add_actor(hbox);
|
||||
bin.add_child(hbox);
|
||||
|
||||
this._calendar = new Calendar.Calendar();
|
||||
this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
|
||||
@ -914,10 +914,10 @@ class DateMenuButton extends PanelMenu.Button {
|
||||
layout_manager: boxLayout,
|
||||
});
|
||||
boxLayout.hookup_style(vbox);
|
||||
hbox.add(vbox);
|
||||
hbox.add_child(vbox);
|
||||
|
||||
vbox.add_actor(this._date);
|
||||
vbox.add_actor(this._calendar);
|
||||
vbox.add_child(this._date);
|
||||
vbox.add_child(this._calendar);
|
||||
|
||||
this._displaysSection = new St.ScrollView({
|
||||
style_class: 'datemenu-displays-section vfade',
|
||||
@ -925,14 +925,14 @@ class DateMenuButton extends PanelMenu.Button {
|
||||
overlay_scrollbars: true,
|
||||
});
|
||||
this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
|
||||
vbox.add_actor(this._displaysSection);
|
||||
vbox.add_child(this._displaysSection);
|
||||
|
||||
const displaysBox = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
style_class: 'datemenu-displays-box',
|
||||
});
|
||||
this._displaysSection.add_actor(displaysBox);
|
||||
this._displaysSection.add_child(displaysBox);
|
||||
|
||||
this._eventsItem = new EventsSection();
|
||||
displaysBox.add_child(this._eventsItem);
|
||||
|
@ -144,7 +144,7 @@ class Dialog extends St.Widget {
|
||||
for (let i in keys)
|
||||
this._buttonKeys[keys[i]] = buttonInfo;
|
||||
|
||||
this.buttonLayout.add_actor(button);
|
||||
this.buttonLayout.add_child(button);
|
||||
|
||||
return button;
|
||||
}
|
||||
@ -268,7 +268,7 @@ export const ListSection = GObject.registerClass({
|
||||
style_class: 'dialog-list-box',
|
||||
vertical: true,
|
||||
});
|
||||
this._listScrollView.add_actor(this.list);
|
||||
this._listScrollView.add_child(this.list);
|
||||
|
||||
let defaultParams = {
|
||||
style_class: 'dialog-list',
|
||||
|
@ -51,7 +51,7 @@ let currentDraggable = null;
|
||||
function _getEventHandlerActor() {
|
||||
if (!eventHandlerActor) {
|
||||
eventHandlerActor = new Clutter.Actor({width: 0, height: 0, reactive: true});
|
||||
Main.uiGroup.add_actor(eventHandlerActor);
|
||||
Main.uiGroup.add_child(eventHandlerActor);
|
||||
// We connect to 'event' rather than 'captured-event' because the capturing phase doesn't happen
|
||||
// when you've grabbed the pointer.
|
||||
eventHandlerActor.connect('event', (actor, event) => {
|
||||
@ -461,7 +461,7 @@ class _Draggable extends Signals.EventEmitter {
|
||||
this._dragActor.scale_x = scaledWidth / this._dragOrigWidth;
|
||||
this._dragActor.scale_y = scaledHeight / this._dragOrigHeight;
|
||||
|
||||
this._dragOrigParent.remove_actor(this._dragActor);
|
||||
this._dragOrigParent.remove_child(this._dragActor);
|
||||
Main.uiGroup.add_child(this._dragActor);
|
||||
Main.uiGroup.set_child_above_sibling(this._dragActor, null);
|
||||
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
||||
@ -817,7 +817,7 @@ class _Draggable extends Signals.EventEmitter {
|
||||
_onAnimationComplete(dragActor, eventTime) {
|
||||
if (this._dragOrigParent) {
|
||||
Main.uiGroup.remove_child(this._dragActor);
|
||||
this._dragOrigParent.add_actor(this._dragActor);
|
||||
this._dragOrigParent.add_child(this._dragActor);
|
||||
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
|
||||
if (this._dragActorHadFixedPos)
|
||||
dragActor.set_position(this._dragOrigX, this._dragOrigY);
|
||||
|
@ -267,7 +267,7 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
|
||||
description: _('Download and install “%s” from extensions.gnome.org?').format(info.name),
|
||||
});
|
||||
|
||||
this.contentLayout.add(content);
|
||||
this.contentLayout.add_child(content);
|
||||
}
|
||||
|
||||
_onCancelButtonPressed() {
|
||||
|
@ -46,7 +46,7 @@ const CandidateArea = GObject.registerClass({
|
||||
box.add_child(box._indexLabel);
|
||||
box.add_child(box._candidateLabel);
|
||||
this._candidateBoxes.push(box);
|
||||
this.add(box);
|
||||
this.add_child(box);
|
||||
|
||||
let j = i;
|
||||
box.connect('button-release-event', (actor, event) => {
|
||||
@ -69,7 +69,7 @@ const CandidateArea = GObject.registerClass({
|
||||
});
|
||||
this._buttonBox.add_child(this._nextButton);
|
||||
|
||||
this.add(this._buttonBox);
|
||||
this.add_child(this._buttonBox);
|
||||
|
||||
this._previousButton.connect('clicked', () => {
|
||||
this.emit('previous-page');
|
||||
@ -153,7 +153,7 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
|
||||
this.style_class = 'candidate-popup-boxpointer';
|
||||
|
||||
this._dummyCursor = new Clutter.Actor({opacity: 0});
|
||||
Main.layoutManager.uiGroup.add_actor(this._dummyCursor);
|
||||
Main.layoutManager.uiGroup.add_child(this._dummyCursor);
|
||||
|
||||
Main.layoutManager.addTopChrome(this);
|
||||
|
||||
@ -167,16 +167,16 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
|
||||
style_class: 'candidate-popup-text',
|
||||
visible: false,
|
||||
});
|
||||
box.add(this._preeditText);
|
||||
box.add_child(this._preeditText);
|
||||
|
||||
this._auxText = new St.Label({
|
||||
style_class: 'candidate-popup-text',
|
||||
visible: false,
|
||||
});
|
||||
box.add(this._auxText);
|
||||
box.add_child(this._auxText);
|
||||
|
||||
this._candidateArea = new CandidateArea();
|
||||
box.add(this._candidateArea);
|
||||
box.add_child(this._candidateArea);
|
||||
|
||||
this._candidateArea.connect('previous-page', () => {
|
||||
this._panelService.page_up();
|
||||
|
@ -85,7 +85,7 @@ class BaseIcon extends Shell.SquareBin {
|
||||
this.iconSize = ICON_SIZE;
|
||||
this._iconBin = new St.Bin({x_align: Clutter.ActorAlign.CENTER});
|
||||
|
||||
this._box.add_actor(this._iconBin);
|
||||
this._box.add_child(this._iconBin);
|
||||
|
||||
if (params.showLabel) {
|
||||
this.label = new St.Label({text: label});
|
||||
@ -93,7 +93,7 @@ class BaseIcon extends Shell.SquareBin {
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._box.add_actor(this.label);
|
||||
this._box.add_child(this.label);
|
||||
} else {
|
||||
this.label = null;
|
||||
}
|
||||
@ -199,7 +199,7 @@ function zoomOutActorAtPos(actor, x, y) {
|
||||
actorClone.opacity = 255;
|
||||
actorClone.set_pivot_point(0.5, 0.5);
|
||||
|
||||
Main.uiGroup.add_actor(actorClone);
|
||||
Main.uiGroup.add_child(actorClone);
|
||||
|
||||
// Avoid monitor edges to not zoom outside the current monitor
|
||||
let scaledWidth = width * APPICON_ANIMATION_OUT_SCALE;
|
||||
|
@ -493,13 +493,13 @@ const Key = GObject.registerClass({
|
||||
let key = this._makeKey(extendedKey);
|
||||
|
||||
key.extendedKey = extendedKey;
|
||||
this._extendedKeyboard.add(key);
|
||||
this._extendedKeyboard.add_child(key);
|
||||
|
||||
key.set_size(...this.keyButton.allocation.get_size());
|
||||
this.keyButton.connect('notify::allocation',
|
||||
() => key.set_size(...this.keyButton.allocation.get_size()));
|
||||
}
|
||||
this._boxPointer.bin.add_actor(this._extendedKeyboard);
|
||||
this._boxPointer.bin.add_child(this._extendedKeyboard);
|
||||
}
|
||||
|
||||
get subkeys() {
|
||||
@ -1387,7 +1387,7 @@ export const Keyboard = GObject.registerClass({
|
||||
this._keyboardController.destroy();
|
||||
|
||||
Main.layoutManager.untrackChrome(this);
|
||||
Main.layoutManager.keyboardBox.remove_actor(this);
|
||||
Main.layoutManager.keyboardBox.remove_child(this);
|
||||
Main.layoutManager.keyboardBox.hide();
|
||||
|
||||
if (this._languagePopup) {
|
||||
@ -1399,7 +1399,7 @@ export const Keyboard = GObject.registerClass({
|
||||
}
|
||||
|
||||
_setupKeyboard() {
|
||||
Main.layoutManager.keyboardBox.add_actor(this);
|
||||
Main.layoutManager.keyboardBox.add_child(this);
|
||||
Main.layoutManager.trackChrome(this);
|
||||
|
||||
this._keyboardController = new KeyboardController();
|
||||
|
@ -225,8 +225,8 @@ export const LayoutManager = GObject.registerClass({
|
||||
|
||||
global.stage.add_child(this.uiGroup);
|
||||
|
||||
global.stage.remove_actor(global.window_group);
|
||||
this.uiGroup.add_actor(global.window_group);
|
||||
global.stage.remove_child(global.window_group);
|
||||
this.uiGroup.add_child(global.window_group);
|
||||
global.connect('shutdown', () => {
|
||||
const monitorManager = global.backend.get_monitor_manager();
|
||||
monitorManager.disconnectObject(this);
|
||||
@ -238,8 +238,8 @@ export const LayoutManager = GObject.registerClass({
|
||||
];
|
||||
|
||||
for (let adoptedActor of adoptedUiGroupActors) {
|
||||
this.uiGroup.remove_actor(adoptedActor);
|
||||
global.stage.add_actor(adoptedActor);
|
||||
this.uiGroup.remove_child(adoptedActor);
|
||||
global.stage.add_child(adoptedActor);
|
||||
}
|
||||
|
||||
this._destroyHotCorners();
|
||||
@ -250,9 +250,9 @@ export const LayoutManager = GObject.registerClass({
|
||||
// Using addChrome() to add actors to uiGroup will position actors
|
||||
// underneath the top_window_group.
|
||||
// To insert actors at the top of uiGroup, we use addTopChrome() or
|
||||
// add the actor directly using uiGroup.add_actor().
|
||||
global.stage.remove_actor(global.top_window_group);
|
||||
this.uiGroup.add_actor(global.top_window_group);
|
||||
// add the actor directly using uiGroup.add_child().
|
||||
global.stage.remove_child(global.top_window_group);
|
||||
this.uiGroup.add_child(global.top_window_group);
|
||||
|
||||
this.overviewGroup = new St.Widget({
|
||||
name: 'overviewGroup',
|
||||
@ -292,7 +292,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
name: 'modalDialogGroup',
|
||||
layout_manager: new Clutter.BinLayout(),
|
||||
});
|
||||
this.uiGroup.add_actor(this.modalDialogGroup);
|
||||
this.uiGroup.add_child(this.modalDialogGroup);
|
||||
|
||||
this.keyboardBox = new St.BoxLayout({
|
||||
name: 'keyboardBox',
|
||||
@ -311,11 +311,11 @@ export const LayoutManager = GObject.registerClass({
|
||||
// A dummy actor that tracks the mouse or text cursor, based on the
|
||||
// position and size set in setDummyCursorGeometry.
|
||||
this.dummyCursor = new St.Widget({width: 0, height: 0, opacity: 0});
|
||||
this.uiGroup.add_actor(this.dummyCursor);
|
||||
this.uiGroup.add_child(this.dummyCursor);
|
||||
|
||||
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
|
||||
global.stage.remove_actor(feedbackGroup);
|
||||
this.uiGroup.add_actor(feedbackGroup);
|
||||
global.stage.remove_child(feedbackGroup);
|
||||
this.uiGroup.add_child(feedbackGroup);
|
||||
|
||||
this._backgroundGroup = new Meta.BackgroundGroup();
|
||||
global.window_group.add_child(this._backgroundGroup);
|
||||
@ -856,7 +856,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
// monitor (it will be hidden whenever a fullscreen window is visible,
|
||||
// and shown otherwise)
|
||||
addChrome(actor, params) {
|
||||
this.uiGroup.add_actor(actor);
|
||||
this.uiGroup.add_child(actor);
|
||||
if (this.uiGroup.contains(global.top_window_group))
|
||||
this.uiGroup.set_child_below_sibling(actor, global.top_window_group);
|
||||
this._trackActor(actor, params);
|
||||
@ -868,7 +868,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
//
|
||||
// Like addChrome(), but adds @actor above all windows, including popups.
|
||||
addTopChrome(actor, params) {
|
||||
this.uiGroup.add_actor(actor);
|
||||
this.uiGroup.add_child(actor);
|
||||
this._trackActor(actor, params);
|
||||
}
|
||||
|
||||
@ -916,7 +916,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
//
|
||||
// Removes @actor from the chrome
|
||||
removeChrome(actor) {
|
||||
this.uiGroup.remove_actor(actor);
|
||||
this.uiGroup.remove_child(actor);
|
||||
this._untrackActor(actor);
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ export const Lightbox = GObject.registerClass({
|
||||
else
|
||||
this.set({opacity: 0, style_class: 'lightbox'});
|
||||
|
||||
container.add_actor(this);
|
||||
container.add_child(this);
|
||||
container.set_child_above_sibling(this, null);
|
||||
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
@ -160,11 +160,11 @@ const Notebook = GObject.registerClass({
|
||||
return true;
|
||||
});
|
||||
labelBox.add_child(label);
|
||||
this.tabControls.add(labelBox);
|
||||
this.tabControls.add_child(labelBox);
|
||||
|
||||
let scrollview = new St.ScrollView({y_expand: true});
|
||||
scrollview.get_hscroll_bar().hide();
|
||||
scrollview.add_actor(child);
|
||||
scrollview.add_child(child);
|
||||
|
||||
const tabData = {
|
||||
child,
|
||||
@ -319,14 +319,14 @@ class Result extends St.BoxLayout {
|
||||
|
||||
let cmdTxt = new St.Label({text: command});
|
||||
cmdTxt.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
||||
this.add(cmdTxt);
|
||||
this.add_child(cmdTxt);
|
||||
let box = new St.BoxLayout({});
|
||||
this.add(box);
|
||||
this.add_child(box);
|
||||
let resultTxt = new St.Label({text: `r(${index}) = `});
|
||||
resultTxt.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
||||
box.add(resultTxt);
|
||||
box.add_child(resultTxt);
|
||||
let objLink = new ObjLink(this._lookingGlass, o);
|
||||
box.add(objLink);
|
||||
box.add_child(objLink);
|
||||
}
|
||||
});
|
||||
|
||||
@ -357,23 +357,23 @@ const WindowList = GObject.registerClass({
|
||||
metaWindow._lookingGlassManaged = true;
|
||||
}
|
||||
let box = new St.BoxLayout({vertical: true});
|
||||
this.add(box);
|
||||
this.add_child(box);
|
||||
let windowLink = new ObjLink(this._lookingGlass, metaWindow, metaWindow.title);
|
||||
box.add_child(windowLink);
|
||||
let propsBox = new St.BoxLayout({vertical: true, style: 'padding-left: 6px;'});
|
||||
box.add(propsBox);
|
||||
propsBox.add(new St.Label({text: `wmclass: ${metaWindow.get_wm_class()}`}));
|
||||
box.add_child(propsBox);
|
||||
propsBox.add_child(new St.Label({text: `wmclass: ${metaWindow.get_wm_class()}`}));
|
||||
let app = tracker.get_window_app(metaWindow);
|
||||
if (app != null && !app.is_window_backed()) {
|
||||
let icon = app.create_icon_texture(22);
|
||||
let propBox = new St.BoxLayout({style: 'spacing: 6px; '});
|
||||
propsBox.add(propBox);
|
||||
propsBox.add_child(propBox);
|
||||
propBox.add_child(new St.Label({text: 'app: '}));
|
||||
let appLink = new ObjLink(this._lookingGlass, app, app.get_id());
|
||||
propBox.add_child(appLink);
|
||||
propBox.add_child(icon);
|
||||
} else {
|
||||
propsBox.add(new St.Label({text: '<untracked>'}));
|
||||
propsBox.add_child(new St.Label({text: '<untracked>'}));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -403,7 +403,7 @@ class ObjInspector extends St.ScrollView {
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.add_actor(this._container);
|
||||
this.add_child(this._container);
|
||||
|
||||
this._lookingGlass = lookingGlass;
|
||||
}
|
||||
@ -418,7 +418,7 @@ class ObjInspector extends St.ScrollView {
|
||||
this._container.destroy_all_children();
|
||||
|
||||
let hbox = new St.BoxLayout({style_class: 'lg-obj-inspector-title'});
|
||||
this._container.add_actor(hbox);
|
||||
this._container.add_child(hbox);
|
||||
let label = new St.Label({
|
||||
text: `Inspecting: ${typeof obj}: ${objectToString(obj)}`,
|
||||
x_expand: true,
|
||||
@ -427,12 +427,12 @@ class ObjInspector extends St.ScrollView {
|
||||
hbox.add_child(label);
|
||||
let button = new St.Button({label: 'Insert', style_class: 'lg-obj-inspector-button'});
|
||||
button.connect('clicked', this._onInsert.bind(this));
|
||||
hbox.add(button);
|
||||
hbox.add_child(button);
|
||||
|
||||
if (this._previousObj != null) {
|
||||
button = new St.Button({label: 'Back', style_class: 'lg-obj-inspector-button'});
|
||||
button.connect('clicked', this._onBack.bind(this));
|
||||
hbox.add(button);
|
||||
hbox.add_child(button);
|
||||
}
|
||||
|
||||
button = new St.Button({
|
||||
@ -440,7 +440,7 @@ class ObjInspector extends St.ScrollView {
|
||||
icon_name: 'window-close-symbolic',
|
||||
});
|
||||
button.connect('clicked', this.close.bind(this));
|
||||
hbox.add(button);
|
||||
hbox.add_child(button);
|
||||
if (typeof obj === typeof {}) {
|
||||
let properties = [];
|
||||
for (let propName in obj)
|
||||
@ -457,9 +457,9 @@ class ObjInspector extends St.ScrollView {
|
||||
link = new St.Label({text: '<error>'});
|
||||
}
|
||||
let box = new St.BoxLayout();
|
||||
box.add(new St.Label({text: `${propName}: `}));
|
||||
box.add(link);
|
||||
this._container.add_actor(box);
|
||||
box.add_child(new St.Label({text: `${propName}: `}));
|
||||
box.add_child(link);
|
||||
this._container.add_child(box);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -583,7 +583,7 @@ export const Inspector = GObject.registerClass({
|
||||
_init(lookingGlass) {
|
||||
super._init({width: 0, height: 0});
|
||||
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
|
||||
const eventHandler = new St.BoxLayout({
|
||||
name: 'LookingGlassDialog',
|
||||
@ -591,7 +591,7 @@ export const Inspector = GObject.registerClass({
|
||||
reactive: true,
|
||||
});
|
||||
this._eventHandler = eventHandler;
|
||||
this.add_actor(eventHandler);
|
||||
this.add_child(eventHandler);
|
||||
this._displayText = new St.Label({x_expand: true});
|
||||
eventHandler.add_child(this._displayText);
|
||||
|
||||
@ -729,8 +729,8 @@ const Extensions = GObject.registerClass({
|
||||
vertical: true,
|
||||
style_class: 'lg-extensions-list',
|
||||
});
|
||||
this._extensionsList.add(this._noExtensions);
|
||||
this.add(this._extensionsList);
|
||||
this._extensionsList.add_child(this._noExtensions);
|
||||
this.add_child(this._extensionsList);
|
||||
|
||||
Main.extensionManager.getUuids().forEach(uuid => {
|
||||
this._loadExtension(null, uuid);
|
||||
@ -749,7 +749,7 @@ const Extensions = GObject.registerClass({
|
||||
|
||||
let extensionDisplay = this._createExtensionDisplay(extension);
|
||||
if (this._numExtensions === 0)
|
||||
this._extensionsList.remove_actor(this._noExtensions);
|
||||
this._extensionsList.remove_child(this._noExtensions);
|
||||
|
||||
this._numExtensions++;
|
||||
const {name} = extension.metadata;
|
||||
@ -780,15 +780,15 @@ const Extensions = GObject.registerClass({
|
||||
let errorDisplay = new St.BoxLayout({vertical: true});
|
||||
if (errors && errors.length) {
|
||||
for (let i = 0; i < errors.length; i++)
|
||||
errorDisplay.add(new St.Label({text: errors[i]}));
|
||||
errorDisplay.add_child(new St.Label({text: errors[i]}));
|
||||
} else {
|
||||
/* Translators: argument is an extension UUID. */
|
||||
let message = _('%s has not emitted any errors.').format(extension.uuid);
|
||||
errorDisplay.add(new St.Label({text: message}));
|
||||
errorDisplay.add_child(new St.Label({text: message}));
|
||||
}
|
||||
|
||||
actor._errorDisplay = errorDisplay;
|
||||
actor._parentBox.add(errorDisplay);
|
||||
actor._parentBox.add_child(errorDisplay);
|
||||
actor.label = _('Hide Errors');
|
||||
} else {
|
||||
actor._errorDisplay.destroy();
|
||||
@ -837,12 +837,12 @@ const Extensions = GObject.registerClass({
|
||||
box.add_child(description);
|
||||
|
||||
let metaBox = new St.BoxLayout({style_class: 'lg-extension-meta'});
|
||||
box.add(metaBox);
|
||||
box.add_child(metaBox);
|
||||
const state = new St.Label({
|
||||
style_class: 'lg-extension-state',
|
||||
text: this._stateToString(extension.state),
|
||||
});
|
||||
metaBox.add(state);
|
||||
metaBox.add_child(state);
|
||||
|
||||
const viewsource = new St.Button({
|
||||
reactive: true,
|
||||
@ -852,7 +852,7 @@ const Extensions = GObject.registerClass({
|
||||
});
|
||||
viewsource._extension = extension;
|
||||
viewsource.connect('clicked', this._onViewSource.bind(this));
|
||||
metaBox.add(viewsource);
|
||||
metaBox.add_child(viewsource);
|
||||
|
||||
if (extension.metadata.url) {
|
||||
const webpage = new St.Button({
|
||||
@ -863,7 +863,7 @@ const Extensions = GObject.registerClass({
|
||||
});
|
||||
webpage._extension = extension;
|
||||
webpage.connect('clicked', this._onWebPage.bind(this));
|
||||
metaBox.add(webpage);
|
||||
metaBox.add_child(webpage);
|
||||
}
|
||||
|
||||
const viewerrors = new St.Button({
|
||||
@ -876,7 +876,7 @@ const Extensions = GObject.registerClass({
|
||||
viewerrors._parentBox = box;
|
||||
viewerrors._isShowing = false;
|
||||
viewerrors.connect('clicked', this._onViewErrors.bind(this));
|
||||
metaBox.add(viewerrors);
|
||||
metaBox.add_child(viewerrors);
|
||||
|
||||
return box;
|
||||
}
|
||||
@ -1303,7 +1303,7 @@ class LookingGlass extends St.BoxLayout {
|
||||
this._updateFont();
|
||||
|
||||
// We want it to appear to slide out from underneath the panel
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
Main.uiGroup.set_child_below_sibling(this,
|
||||
Main.layoutManager.panelBox);
|
||||
Main.layoutManager.panelBox.connect('notify::allocation',
|
||||
@ -1312,16 +1312,16 @@ class LookingGlass extends St.BoxLayout {
|
||||
this._queueResize.bind(this));
|
||||
|
||||
this._objInspector = new ObjInspector(this);
|
||||
Main.uiGroup.add_actor(this._objInspector);
|
||||
Main.uiGroup.add_child(this._objInspector);
|
||||
this._objInspector.hide();
|
||||
|
||||
let toolbar = new St.BoxLayout({name: 'Toolbar'});
|
||||
this.add_actor(toolbar);
|
||||
this.add_child(toolbar);
|
||||
const inspectButton = new St.Button({
|
||||
style_class: 'lg-toolbar-button',
|
||||
icon_name: 'find-location-symbolic',
|
||||
});
|
||||
toolbar.add_actor(inspectButton);
|
||||
toolbar.add_child(inspectButton);
|
||||
inspectButton.connect('clicked', () => {
|
||||
let inspector = new Inspector(this);
|
||||
inspector.connect('target', (i, target, stageX, stageY) => {
|
||||
@ -1339,7 +1339,7 @@ class LookingGlass extends St.BoxLayout {
|
||||
style_class: 'lg-toolbar-button',
|
||||
icon_name: 'user-trash-full-symbolic',
|
||||
});
|
||||
toolbar.add_actor(gcButton);
|
||||
toolbar.add_child(gcButton);
|
||||
gcButton.connect('clicked', () => {
|
||||
gcButton.child.icon_name = 'user-trash-symbolic';
|
||||
System.gc();
|
||||
@ -1361,7 +1361,7 @@ class LookingGlass extends St.BoxLayout {
|
||||
|
||||
let emptyBox = new St.Bin({x_expand: true});
|
||||
toolbar.add_child(emptyBox);
|
||||
toolbar.add_actor(notebook.tabControls);
|
||||
toolbar.add_child(notebook.tabControls);
|
||||
|
||||
this._evalBox = new St.BoxLayout({name: 'EvalBox', vertical: true});
|
||||
notebook.appendPage('Evaluator', this._evalBox);
|
||||
@ -1377,10 +1377,10 @@ class LookingGlass extends St.BoxLayout {
|
||||
name: 'EntryArea',
|
||||
y_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
this._evalBox.add_actor(this._entryArea);
|
||||
this._evalBox.add_child(this._entryArea);
|
||||
|
||||
let label = new St.Label({text: CHEVRON});
|
||||
this._entryArea.add(label);
|
||||
this._entryArea.add_child(label);
|
||||
|
||||
this._entry = new St.Entry({
|
||||
can_focus: true,
|
||||
@ -1462,7 +1462,7 @@ class LookingGlass extends St.BoxLayout {
|
||||
_pushResult(command, obj) {
|
||||
let index = this._resultsArea.get_n_children() + this._offset;
|
||||
let result = new Result(this, CHEVRON + command, obj, index);
|
||||
this._resultsArea.add(result);
|
||||
this._resultsArea.add_child(result);
|
||||
if (obj instanceof Clutter.Actor)
|
||||
this.setBorderPaintTarget(obj);
|
||||
|
||||
|
@ -109,7 +109,7 @@ export class Magnifier extends Signals.EventEmitter {
|
||||
this._mouseSprite.content = new MouseSpriteContent();
|
||||
|
||||
this._cursorRoot = new Clutter.Actor();
|
||||
this._cursorRoot.add_actor(this._mouseSprite);
|
||||
this._cursorRoot.add_child(this._mouseSprite);
|
||||
|
||||
// Create the first ZoomRegion and initialize it according to the
|
||||
// magnification settings.
|
||||
@ -1471,7 +1471,7 @@ class ZoomRegion {
|
||||
_createActors() {
|
||||
// The root actor for the zoom region
|
||||
this._magView = new St.Bin({style_class: 'magnifier-zoom-region'});
|
||||
global.stage.add_actor(this._magView);
|
||||
global.stage.add_child(this._magView);
|
||||
|
||||
// hide the magnified region from CLUTTER_PICK_ALL
|
||||
Shell.util_set_hidden_from_pick(this._magView, true);
|
||||
@ -1483,7 +1483,7 @@ class ZoomRegion {
|
||||
// Add a background for when the magnified uiGroup is scrolled
|
||||
// out of view (don't want to see desktop showing through).
|
||||
this._background = new Background.SystemBackground();
|
||||
mainGroup.add_actor(this._background);
|
||||
mainGroup.add_child(this._background);
|
||||
|
||||
// Clone the group that contains all of UI on the screen. This is the
|
||||
// chrome, the windows, etc.
|
||||
@ -1491,7 +1491,7 @@ class ZoomRegion {
|
||||
source: Main.uiGroup,
|
||||
clip_to_allocation: true,
|
||||
});
|
||||
mainGroup.add_actor(this._uiGroupClone);
|
||||
mainGroup.add_child(this._uiGroupClone);
|
||||
|
||||
// Add either the given mouseSourceActor to the ZoomRegion, or a clone of
|
||||
// it.
|
||||
@ -1499,7 +1499,7 @@ class ZoomRegion {
|
||||
this._mouseActor = new Clutter.Clone({source: this._mouseSourceActor});
|
||||
else
|
||||
this._mouseActor = this._mouseSourceActor;
|
||||
mainGroup.add_actor(this._mouseActor);
|
||||
mainGroup.add_child(this._mouseActor);
|
||||
|
||||
if (this._crossHairs)
|
||||
this._crossHairsActor = this._crossHairs.addToZoomRegion(this, this._mouseActor);
|
||||
@ -1516,7 +1516,7 @@ class ZoomRegion {
|
||||
|
||||
_destroyActors() {
|
||||
if (this._mouseActor === this._mouseSourceActor)
|
||||
this._mouseActor.get_parent().remove_actor(this._mouseActor);
|
||||
this._mouseActor.get_parent().remove_child(this._mouseActor);
|
||||
if (this._crossHairs)
|
||||
this._crossHairs.removeFromParent(this._crossHairsActor);
|
||||
|
||||
@ -1833,10 +1833,10 @@ class Crosshairs extends Clutter.Actor {
|
||||
this._horizRightHair = new Clutter.Actor();
|
||||
this._vertTopHair = new Clutter.Actor();
|
||||
this._vertBottomHair = new Clutter.Actor();
|
||||
this.add_actor(this._horizLeftHair);
|
||||
this.add_actor(this._horizRightHair);
|
||||
this.add_actor(this._vertTopHair);
|
||||
this.add_actor(this._vertBottomHair);
|
||||
this.add_child(this._horizLeftHair);
|
||||
this.add_child(this._horizRightHair);
|
||||
this.add_child(this._vertTopHair);
|
||||
this.add_child(this._vertBottomHair);
|
||||
this._clipSize = [0, 0];
|
||||
this._clones = [];
|
||||
this.reCenter();
|
||||
@ -1887,7 +1887,7 @@ class Crosshairs extends Clutter.Actor {
|
||||
GObject.BindingFlags.SYNC_CREATE);
|
||||
}
|
||||
|
||||
container.add_actor(crosshairsActor);
|
||||
container.add_child(crosshairsActor);
|
||||
container.set_child_above_sibling(magnifiedMouse, crosshairsActor);
|
||||
let [xMouse, yMouse] = magnifiedMouse.get_position();
|
||||
let [crosshairsWidth, crosshairsHeight] = crosshairsActor.get_size();
|
||||
@ -1908,7 +1908,7 @@ class Crosshairs extends Clutter.Actor {
|
||||
*/
|
||||
removeFromParent(childActor) {
|
||||
if (childActor === this)
|
||||
childActor.get_parent().remove_actor(childActor);
|
||||
childActor.get_parent().remove_child(childActor);
|
||||
else
|
||||
childActor.destroy();
|
||||
}
|
||||
|
@ -332,13 +332,13 @@ export const Message = GObject.registerClass({
|
||||
this.set_child(vbox);
|
||||
|
||||
let hbox = new St.BoxLayout();
|
||||
vbox.add_actor(hbox);
|
||||
vbox.add_child(hbox);
|
||||
|
||||
this._actionBin = new St.Widget({
|
||||
layout_manager: new ScaleLayout(),
|
||||
visible: false,
|
||||
});
|
||||
vbox.add_actor(this._actionBin);
|
||||
vbox.add_child(this._actionBin);
|
||||
|
||||
this._iconBin = new St.Bin({
|
||||
style_class: 'message-icon-bin',
|
||||
@ -346,30 +346,30 @@ export const Message = GObject.registerClass({
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
visible: false,
|
||||
});
|
||||
hbox.add_actor(this._iconBin);
|
||||
hbox.add_child(this._iconBin);
|
||||
|
||||
const contentBox = new St.BoxLayout({
|
||||
style_class: 'message-content',
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
});
|
||||
hbox.add_actor(contentBox);
|
||||
hbox.add_child(contentBox);
|
||||
|
||||
this._mediaControls = new St.BoxLayout();
|
||||
hbox.add_actor(this._mediaControls);
|
||||
hbox.add_child(this._mediaControls);
|
||||
|
||||
let titleBox = new St.BoxLayout();
|
||||
contentBox.add_actor(titleBox);
|
||||
contentBox.add_child(titleBox);
|
||||
|
||||
this.titleLabel = new St.Label({style_class: 'message-title'});
|
||||
this.setTitle(title);
|
||||
titleBox.add_actor(this.titleLabel);
|
||||
titleBox.add_child(this.titleLabel);
|
||||
|
||||
this._secondaryBin = new St.Bin({
|
||||
style_class: 'message-secondary-bin',
|
||||
x_expand: true, y_expand: true,
|
||||
});
|
||||
titleBox.add_actor(this._secondaryBin);
|
||||
titleBox.add_child(this._secondaryBin);
|
||||
|
||||
this._closeButton = new St.Button({
|
||||
style_class: 'message-close-button',
|
||||
@ -377,15 +377,15 @@ export const Message = GObject.registerClass({
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
opacity: 0,
|
||||
});
|
||||
titleBox.add_actor(this._closeButton);
|
||||
titleBox.add_child(this._closeButton);
|
||||
|
||||
this._bodyStack = new St.Widget({x_expand: true});
|
||||
this._bodyStack.layout_manager = new LabelExpanderLayout();
|
||||
contentBox.add_actor(this._bodyStack);
|
||||
contentBox.add_child(this._bodyStack);
|
||||
|
||||
this.bodyLabel = new URLHighlighter('', false, this._useBodyMarkup);
|
||||
this.bodyLabel.add_style_class_name('message-body');
|
||||
this._bodyStack.add_actor(this.bodyLabel);
|
||||
this._bodyStack.add_child(this.bodyLabel);
|
||||
this.setBody(body);
|
||||
|
||||
this._closeButton.connect('clicked', this.close.bind(this));
|
||||
@ -439,7 +439,7 @@ export const Message = GObject.registerClass({
|
||||
if (this._actionBin.get_n_children() > 0)
|
||||
throw new Error('Message already has an action area');
|
||||
|
||||
this._actionBin.add_actor(actor);
|
||||
this._actionBin.add_child(actor);
|
||||
this._actionBin.visible = this.expanded;
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ export const Message = GObject.registerClass({
|
||||
iconName,
|
||||
});
|
||||
button.connect('clicked', callback);
|
||||
this._mediaControls.add_actor(button);
|
||||
this._mediaControls.add_child(button);
|
||||
return button;
|
||||
}
|
||||
|
||||
@ -574,7 +574,7 @@ export const MessageListSection = GObject.registerClass({
|
||||
style_class: 'message-list-section-list',
|
||||
vertical: true,
|
||||
});
|
||||
this.add_actor(this._list);
|
||||
this.add_child(this._list);
|
||||
|
||||
this._list.connect('actor-added', this._sync.bind(this));
|
||||
this._list.connect('actor-removed', this._sync.bind(this));
|
||||
|
@ -571,7 +571,7 @@ export const NotificationBanner = GObject.registerClass({
|
||||
if (this._buttonBox.get_n_children() >= MAX_NOTIFICATION_BUTTONS)
|
||||
return null;
|
||||
|
||||
this._buttonBox.add(button);
|
||||
this._buttonBox.add_child(button);
|
||||
button.connect('clicked', () => {
|
||||
callback();
|
||||
|
||||
@ -619,7 +619,7 @@ class SourceActor extends St.Widget {
|
||||
width: size * scaleFactor,
|
||||
});
|
||||
|
||||
this.add_actor(this._iconBin);
|
||||
this.add_child(this._iconBin);
|
||||
|
||||
this._source.connectObject('icon-updated',
|
||||
this._updateIcon.bind(this), this);
|
||||
@ -849,7 +849,7 @@ export const MessageTray = GObject.registerClass({
|
||||
this._onNotificationKeyRelease.bind(this));
|
||||
this._bannerBin.connect('notify::hover',
|
||||
this._onNotificationHoverChanged.bind(this));
|
||||
this.add_actor(this._bannerBin);
|
||||
this.add_child(this._bannerBin);
|
||||
|
||||
this._notificationFocusGrabber = new FocusGrabber(this._bannerBin);
|
||||
this._notificationQueue = [];
|
||||
@ -1240,7 +1240,7 @@ export const MessageTray = GObject.registerClass({
|
||||
'done-displaying', this._escapeTray.bind(this),
|
||||
'unfocused', () => this._updateState(), this);
|
||||
|
||||
this._bannerBin.add_actor(this._banner);
|
||||
this._bannerBin.add_child(this._banner);
|
||||
|
||||
this._bannerBin.opacity = 0;
|
||||
this._bannerBin.y = -this._banner.height;
|
||||
|
@ -61,7 +61,7 @@ export const ModalDialog = GObject.registerClass({
|
||||
this._shouldFadeOut = params.shouldFadeOut;
|
||||
this._destroyOnClose = params.destroyOnClose;
|
||||
|
||||
Main.layoutManager.modalDialogGroup.add_actor(this);
|
||||
Main.layoutManager.modalDialogGroup.add_child(this);
|
||||
|
||||
const constraint = new Clutter.BindConstraint({
|
||||
source: global.stage,
|
||||
@ -77,7 +77,7 @@ export const ModalDialog = GObject.registerClass({
|
||||
this._backgroundBin = new St.Bin({child: this.backgroundStack});
|
||||
this._monitorConstraint = new Layout.MonitorConstraint();
|
||||
this._backgroundBin.add_constraint(this._monitorConstraint);
|
||||
this.add_actor(this._backgroundBin);
|
||||
this.add_child(this._backgroundBin);
|
||||
|
||||
this.dialogLayout = new Dialog.Dialog(this.backgroundStack, params.styleClass);
|
||||
this.contentLayout = this.dialogLayout.contentLayout;
|
||||
@ -91,7 +91,7 @@ export const ModalDialog = GObject.registerClass({
|
||||
this._lightbox.highlight(this._backgroundBin);
|
||||
|
||||
this._eventBlocker = new Clutter.Actor({reactive: true});
|
||||
this.backgroundStack.add_actor(this._eventBlocker);
|
||||
this.backgroundStack.add_child(this._eventBlocker);
|
||||
}
|
||||
|
||||
global.focus_manager.add_group(this.dialogLayout);
|
||||
|
@ -19,13 +19,13 @@ class OsdMonitorLabel extends St.Widget {
|
||||
this._box = new St.BoxLayout({
|
||||
vertical: true,
|
||||
});
|
||||
this.add_actor(this._box);
|
||||
this.add_child(this._box);
|
||||
|
||||
this._label = new St.Label({
|
||||
style_class: 'osd-monitor-label',
|
||||
text: label,
|
||||
});
|
||||
this._box.add(this._label);
|
||||
this._box.add_child(this._label);
|
||||
|
||||
Main.uiGroup.add_child(this);
|
||||
Main.uiGroup.set_child_above_sibling(this, null);
|
||||
|
@ -31,7 +31,7 @@ class OsdWindow extends Clutter.Actor {
|
||||
this._hbox = new St.BoxLayout({
|
||||
style_class: 'osd-window',
|
||||
});
|
||||
this.add_actor(this._hbox);
|
||||
this.add_child(this._hbox);
|
||||
|
||||
this._icon = new St.Icon({y_expand: true});
|
||||
this._hbox.add_child(this._icon);
|
||||
|
@ -65,7 +65,7 @@ const PadChooser = GObject.registerClass({
|
||||
this.set_checked(false);
|
||||
});
|
||||
this._padChooserMenu.actor.hide();
|
||||
Main.uiGroup.add_actor(this._padChooserMenu.actor);
|
||||
Main.uiGroup.add_child(this._padChooserMenu.actor);
|
||||
|
||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
||||
this._menuManager.addMenu(this._padChooserMenu);
|
||||
@ -144,7 +144,7 @@ const ActionComboBox = GObject.registerClass({
|
||||
this.set_checked(false);
|
||||
});
|
||||
this._editMenu.actor.hide();
|
||||
Main.uiGroup.add_actor(this._editMenu.actor);
|
||||
Main.uiGroup.add_child(this._editMenu.actor);
|
||||
|
||||
this._editMenuManager = new PopupMenu.PopupMenuManager(this);
|
||||
this._editMenuManager.addMenu(this._editMenu);
|
||||
@ -215,11 +215,11 @@ const ActionEditor = GObject.registerClass({
|
||||
|
||||
this._actionComboBox = new ActionComboBox();
|
||||
this._actionComboBox.connect('action-selected', this._onActionSelected.bind(this));
|
||||
this.add_actor(this._actionComboBox);
|
||||
this.add_child(this._actionComboBox);
|
||||
|
||||
this._keybindingEdit = new KeybindingEntry();
|
||||
this._keybindingEdit.connect('keybinding-edited', this._onKeybindingEdited.bind(this));
|
||||
this.add_actor(this._keybindingEdit);
|
||||
this.add_child(this._keybindingEdit);
|
||||
|
||||
this._doneButton = new St.Button({
|
||||
label: _('Done'),
|
||||
@ -227,7 +227,7 @@ const ActionEditor = GObject.registerClass({
|
||||
x_expand: false,
|
||||
});
|
||||
this._doneButton.connect('clicked', this._onEditingDone.bind(this));
|
||||
this.add_actor(this._doneButton);
|
||||
this.add_child(this._doneButton);
|
||||
}
|
||||
|
||||
_updateKeybindingEntryState() {
|
||||
@ -338,7 +338,7 @@ const PadDiagram = GObject.registerClass({
|
||||
set editorActor(actor) {
|
||||
actor.hide();
|
||||
this._editorActor = actor;
|
||||
this.add_actor(actor);
|
||||
this.add_child(actor);
|
||||
}
|
||||
|
||||
_initLabels() {
|
||||
@ -565,7 +565,7 @@ const PadDiagram = GObject.registerClass({
|
||||
|
||||
let label = new St.Label();
|
||||
this._labels.push({label, action, idx, dir, x, y, arrangement});
|
||||
this.add_actor(label);
|
||||
this.add_child(label);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -671,7 +671,7 @@ export const PadOsd = GObject.registerClass({
|
||||
});
|
||||
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
|
||||
this._monitorIndex = monitorIndex;
|
||||
let constraint = new Layout.MonitorConstraint({index: monitorIndex});
|
||||
@ -683,13 +683,13 @@ export const PadOsd = GObject.registerClass({
|
||||
x_expand: false,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this.add_actor(this._titleBox);
|
||||
this.add_child(this._titleBox);
|
||||
|
||||
const labelBox = new St.BoxLayout({
|
||||
style_class: 'pad-osd-title-menu-box',
|
||||
vertical: true,
|
||||
});
|
||||
this._titleBox.add_actor(labelBox);
|
||||
this._titleBox.add_child(labelBox);
|
||||
|
||||
this._titleLabel = new St.Label({
|
||||
style: 'font-side: larger; font-weight: bold;',
|
||||
@ -697,10 +697,10 @@ export const PadOsd = GObject.registerClass({
|
||||
});
|
||||
this._titleLabel.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
|
||||
this._titleLabel.clutter_text.set_text(padDevice.get_device_name());
|
||||
labelBox.add_actor(this._titleLabel);
|
||||
labelBox.add_child(this._titleLabel);
|
||||
|
||||
this._tipLabel = new St.Label({x_align: Clutter.ActorAlign.CENTER});
|
||||
labelBox.add_actor(this._tipLabel);
|
||||
labelBox.add_child(this._tipLabel);
|
||||
|
||||
this._updatePadChooser();
|
||||
|
||||
@ -714,7 +714,7 @@ export const PadOsd = GObject.registerClass({
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.add_actor(this._padDiagram);
|
||||
this.add_child(this._padDiagram);
|
||||
this._updateActionLabels();
|
||||
|
||||
const buttonBox = new St.Widget({
|
||||
@ -723,7 +723,7 @@ export const PadOsd = GObject.registerClass({
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this.add_actor(buttonBox);
|
||||
this.add_child(buttonBox);
|
||||
this._editButton = new St.Button({
|
||||
label: _('Edit…'),
|
||||
style_class: 'button',
|
||||
@ -733,7 +733,7 @@ export const PadOsd = GObject.registerClass({
|
||||
this._editButton.connect('clicked', () => {
|
||||
this.setEditionMode(true);
|
||||
});
|
||||
buttonBox.add_actor(this._editButton);
|
||||
buttonBox.add_child(this._editButton);
|
||||
|
||||
this._syncEditionMode();
|
||||
this._grab = Main.pushModal(this);
|
||||
|
@ -77,7 +77,7 @@ export const PageIndicators = GObject.registerClass({
|
||||
this._updateIndicator(indicator, pageIndex);
|
||||
});
|
||||
this._updateIndicator(indicator, pageIndex);
|
||||
this.add_actor(indicator);
|
||||
this.add_child(indicator);
|
||||
}
|
||||
} else {
|
||||
let children = this.get_children().splice(diff);
|
||||
|
@ -73,7 +73,7 @@ const AppMenuButton = GObject.registerClass({
|
||||
this._targetApp = null;
|
||||
|
||||
let bin = new St.Bin({name: 'appMenu'});
|
||||
this.add_actor(bin);
|
||||
this.add_child(bin);
|
||||
|
||||
this.bind_property('reactive', this, 'can-focus', 0);
|
||||
this.reactive = false;
|
||||
@ -91,7 +91,7 @@ const AppMenuButton = GObject.registerClass({
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._iconBox.add_effect(iconEffect);
|
||||
this._container.add_actor(this._iconBox);
|
||||
this._container.add_child(this._iconBox);
|
||||
|
||||
this._iconBox.connect('style-changed', () => {
|
||||
let themeNode = this._iconBox.get_theme_node();
|
||||
@ -102,7 +102,7 @@ const AppMenuButton = GObject.registerClass({
|
||||
y_expand: true,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._container.add_actor(this._label);
|
||||
this._container.add_child(this._label);
|
||||
|
||||
this._visible = !Main.overview.visible;
|
||||
if (!this._visible)
|
||||
@ -115,7 +115,7 @@ const AppMenuButton = GObject.registerClass({
|
||||
animate: true,
|
||||
hideOnStop: true,
|
||||
});
|
||||
this._container.add_actor(this._spinner);
|
||||
this._container.add_child(this._spinner);
|
||||
|
||||
let menu = new AppMenu(this);
|
||||
this.setMenu(menu);
|
||||
@ -677,7 +677,7 @@ class Panel extends St.Widget {
|
||||
this.remove_style_pseudo_class('overview');
|
||||
});
|
||||
|
||||
Main.layoutManager.panelBox.add(this);
|
||||
Main.layoutManager.panelBox.add_child(this);
|
||||
Main.ctrlAltTabManager.addGroup(this,
|
||||
_('Top Bar'), 'focus-top-bar-symbolic',
|
||||
{sortGroup: CtrlAltTab.SortGroup.TOP});
|
||||
@ -919,7 +919,7 @@ class Panel extends St.Widget {
|
||||
|
||||
let parent = container.get_parent();
|
||||
if (parent)
|
||||
parent.remove_actor(container);
|
||||
parent.remove_child(container);
|
||||
|
||||
|
||||
box.insert_child_at_index(container, position);
|
||||
|
@ -131,7 +131,7 @@ export const Button = GObject.registerClass({
|
||||
this.menu.connect('open-state-changed', this._onOpenStateChanged.bind(this));
|
||||
this.menu.actor.connect('key-press-event', this._onMenuKeyPress.bind(this));
|
||||
|
||||
Main.uiGroup.add_actor(this.menu.actor);
|
||||
Main.uiGroup.add_child(this.menu.actor);
|
||||
this.menu.actor.hide();
|
||||
}
|
||||
this.emit('menu-set');
|
||||
@ -227,7 +227,7 @@ class SystemIndicator extends St.BoxLayout {
|
||||
|
||||
_addIndicator() {
|
||||
let icon = new St.Icon({style_class: 'system-status-icon'});
|
||||
this.add_actor(icon);
|
||||
this.add_child(icon);
|
||||
icon.connect('notify::visible', this._syncIndicatorsVisible.bind(this));
|
||||
this._syncIndicatorsVisible();
|
||||
return icon;
|
||||
|
@ -116,7 +116,7 @@ export class PointerA11yTimeout {
|
||||
let [x, y] = global.get_pointer();
|
||||
|
||||
this._pieTimer = new PieTimer();
|
||||
Main.uiGroup.add_actor(this._pieTimer);
|
||||
Main.uiGroup.add_child(this._pieTimer);
|
||||
Main.uiGroup.set_child_above_sibling(this._pieTimer, null);
|
||||
|
||||
this._pieTimer.start(x, y, timeout);
|
||||
|
@ -96,7 +96,7 @@ export const PopupBaseMenuItem = GObject.registerClass({
|
||||
this._delegate = this;
|
||||
|
||||
this._ornamentIcon = new St.Icon({style_class: 'popup-menu-ornament'});
|
||||
this.add(this._ornamentIcon);
|
||||
this.add_child(this._ornamentIcon);
|
||||
this.setOrnament(Ornament.HIDDEN);
|
||||
|
||||
this._parent = null;
|
||||
@ -304,7 +304,7 @@ class PopupSeparatorMenuItem extends PopupBaseMenuItem {
|
||||
});
|
||||
|
||||
this.label = new St.Label({text: text || ''});
|
||||
this.add(this.label);
|
||||
this.add_child(this.label);
|
||||
this.label_actor = this.label;
|
||||
|
||||
this.label.connect('notify::text',
|
||||
@ -718,14 +718,14 @@ export class PopupMenuBase extends Signals.EventEmitter {
|
||||
addMenuItem(menuItem, position) {
|
||||
let beforeItem = null;
|
||||
if (position === undefined) {
|
||||
this.box.add(menuItem.actor);
|
||||
this.box.add_child(menuItem.actor);
|
||||
} else {
|
||||
let items = this._getMenuItems();
|
||||
if (position < items.length) {
|
||||
beforeItem = items[position].actor;
|
||||
this.box.insert_child_below(menuItem.actor, beforeItem);
|
||||
} else {
|
||||
this.box.add(menuItem.actor);
|
||||
this.box.add_child(menuItem.actor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -746,7 +746,7 @@ export class PopupMenuBase extends Signals.EventEmitter {
|
||||
menuItem);
|
||||
} else if (menuItem instanceof PopupSubMenuMenuItem) {
|
||||
if (beforeItem == null)
|
||||
this.box.add(menuItem.menu.actor);
|
||||
this.box.add_child(menuItem.menu.actor);
|
||||
else
|
||||
this.box.insert_child_below(menuItem.menu.actor, beforeItem);
|
||||
|
||||
@ -1018,7 +1018,7 @@ export class PopupSubMenu extends PopupMenuBase {
|
||||
vscrollbar_policy: St.PolicyType.NEVER,
|
||||
});
|
||||
|
||||
this.actor.add_actor(this.box);
|
||||
this.actor.add_child(this.box);
|
||||
this.actor._delegate = this;
|
||||
this.actor.clip_to_allocation = true;
|
||||
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));
|
||||
|
@ -847,7 +847,7 @@ class SystemIndicator extends St.BoxLayout {
|
||||
|
||||
_addIndicator() {
|
||||
const icon = new St.Icon({style_class: 'system-status-icon'});
|
||||
this.add_actor(icon);
|
||||
this.add_child(icon);
|
||||
icon.connect('notify::visible', () => this._syncIndicatorsVisible());
|
||||
this._syncIndicatorsVisible();
|
||||
return icon;
|
||||
|
@ -82,9 +82,9 @@ export class Ripples {
|
||||
throw new Error('Ripples already added');
|
||||
|
||||
this._stage = stage;
|
||||
this._stage.add_actor(this._ripple1);
|
||||
this._stage.add_actor(this._ripple2);
|
||||
this._stage.add_actor(this._ripple3);
|
||||
this._stage.add_child(this._ripple1);
|
||||
this._stage.add_child(this._ripple2);
|
||||
this._stage.add_child(this._ripple3);
|
||||
}
|
||||
|
||||
playAnimation(x, y) {
|
||||
|
@ -63,7 +63,7 @@ class RunDialog extends ModalDialog.ModalDialog {
|
||||
let title = _('Run a Command');
|
||||
|
||||
let content = new Dialog.MessageDialogContent({title});
|
||||
this.contentLayout.add_actor(content);
|
||||
this.contentLayout.add_child(content);
|
||||
|
||||
let entry = new St.Entry({
|
||||
style_class: 'run-dialog-entry',
|
||||
|
@ -74,8 +74,8 @@ export class ScreenShield extends Signals.EventEmitter {
|
||||
name: 'lockDialogGroup',
|
||||
});
|
||||
|
||||
this.actor.add_actor(this._lockScreenGroup);
|
||||
this.actor.add_actor(this._lockDialogGroup);
|
||||
this.actor.add_child(this._lockScreenGroup);
|
||||
this.actor.add_child(this._lockDialogGroup);
|
||||
|
||||
this._presence = new GnomeSession.Presence((proxy, error) => {
|
||||
if (error) {
|
||||
|
@ -2664,7 +2664,7 @@ class SelectArea extends St.Widget {
|
||||
x: 0,
|
||||
y: 0,
|
||||
});
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
|
||||
this._grabHelper = new GrabHelper.GrabHelper(this);
|
||||
|
||||
@ -2678,7 +2678,7 @@ class SelectArea extends St.Widget {
|
||||
style_class: 'select-area-rubberband',
|
||||
visible: false,
|
||||
});
|
||||
this.add_actor(this._rubberband);
|
||||
this.add_child(this._rubberband);
|
||||
}
|
||||
|
||||
async selectAsync() {
|
||||
@ -2892,7 +2892,7 @@ class PickPixel extends St.Widget {
|
||||
this._color = null;
|
||||
this._inPick = false;
|
||||
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
|
||||
this._grabHelper = new GrabHelper.GrabHelper(this);
|
||||
|
||||
@ -2925,7 +2925,7 @@ class PickPixel extends St.Widget {
|
||||
effect: this._recolorEffect,
|
||||
visible: false,
|
||||
});
|
||||
Main.uiGroup.add_actor(this._previewCursor);
|
||||
Main.uiGroup.add_child(this._previewCursor);
|
||||
}
|
||||
|
||||
async pickAsync() {
|
||||
|
@ -94,7 +94,7 @@ class ListSearchResult extends SearchResult {
|
||||
// An icon for, or thumbnail of, content
|
||||
let icon = this.metaInfo['createIcon'](this.ICON_SIZE);
|
||||
if (icon)
|
||||
titleBox.add(icon);
|
||||
titleBox.add_child(icon);
|
||||
|
||||
let title = new St.Label({
|
||||
text: this.metaInfo['name'],
|
||||
@ -171,7 +171,7 @@ const SearchResultsBase = GObject.registerClass({
|
||||
this.add_child(this._resultDisplayBin);
|
||||
|
||||
let separator = new St.Widget({style_class: 'search-section-separator'});
|
||||
this.add(separator);
|
||||
this.add_child(separator);
|
||||
|
||||
this._resultDisplays = {};
|
||||
|
||||
@ -325,7 +325,7 @@ class ListSearchResults extends SearchResultsBase {
|
||||
}
|
||||
|
||||
_addItem(display) {
|
||||
this._content.add_actor(display);
|
||||
this._content.add_child(display);
|
||||
}
|
||||
|
||||
getFirstResult() {
|
||||
@ -575,7 +575,7 @@ export const SearchResultsView = GObject.registerClass({
|
||||
y_expand: true,
|
||||
});
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
||||
this._scrollView.add_actor(this._content);
|
||||
this._scrollView.add_child(this._content);
|
||||
|
||||
let action = new Clutter.PanAction({interpolate: true});
|
||||
action.connect('pan', this._onPan.bind(this));
|
||||
@ -590,7 +590,7 @@ export const SearchResultsView = GObject.registerClass({
|
||||
});
|
||||
this._statusBin = new St.Bin({y_expand: true});
|
||||
this.add_child(this._statusBin);
|
||||
this._statusBin.add_actor(this._statusText);
|
||||
this._statusBin.add_child(this._statusText);
|
||||
|
||||
this._highlightDefault = false;
|
||||
this._defaultResult = null;
|
||||
@ -770,7 +770,7 @@ export const SearchResultsView = GObject.registerClass({
|
||||
|
||||
providerDisplay.connect('notify::focus-child', this._focusChildChanged.bind(this));
|
||||
providerDisplay.hide();
|
||||
this._content.add(providerDisplay);
|
||||
this._content.add_child(providerDisplay);
|
||||
provider.display = providerDisplay;
|
||||
}
|
||||
|
||||
@ -937,12 +937,12 @@ class ProviderInfo extends St.Button {
|
||||
|
||||
this._moreLabel = new St.Label({x_align: Clutter.ActorAlign.START});
|
||||
|
||||
detailsBox.add_actor(nameLabel);
|
||||
detailsBox.add_actor(this._moreLabel);
|
||||
detailsBox.add_child(nameLabel);
|
||||
detailsBox.add_child(this._moreLabel);
|
||||
|
||||
|
||||
this._content.add_actor(icon);
|
||||
this._content.add_actor(detailsBox);
|
||||
this._content.add_child(icon);
|
||||
this._content.add_child(detailsBox);
|
||||
}
|
||||
|
||||
get PROVIDER_ICON_SIZE() {
|
||||
|
@ -95,7 +95,7 @@ export const SearchController = GObject.registerClass({
|
||||
this._focusTrap.connect('key-focus-in', () => {
|
||||
this._entry.grab_key_focus();
|
||||
});
|
||||
this._searchResults.add_actor(this._focusTrap);
|
||||
this._searchResults.add_child(this._focusTrap);
|
||||
|
||||
global.focus_manager.add_group(this._searchResults);
|
||||
|
||||
|
@ -33,7 +33,7 @@ export class EntryMenu extends PopupMenu.PopupMenu {
|
||||
if (entry instanceof St.PasswordEntry)
|
||||
this._makePasswordItem();
|
||||
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
Main.uiGroup.add_child(this.actor);
|
||||
this.actor.hide();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||
});
|
||||
this.indicator = new St.Label({text: shortName});
|
||||
this.add_child(this.label);
|
||||
this.add(this.indicator);
|
||||
this.add_child(this.indicator);
|
||||
this.label_actor = this.label;
|
||||
}
|
||||
});
|
||||
@ -922,7 +922,7 @@ class InputSourceIndicator extends PanelMenu.Button {
|
||||
});
|
||||
|
||||
this.menu.addMenuItem(menuItem, menuIndex++);
|
||||
this._container.add_actor(indicatorLabel);
|
||||
this._container.add_child(indicatorLabel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ class NMWirelessNetworkItem extends PopupMenu.PopupBaseMenuItem {
|
||||
style_class: 'wireless-secure-icon',
|
||||
y_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
icons.add_actor(this._secureIcon);
|
||||
icons.add_child(this._secureIcon);
|
||||
|
||||
this._label = new St.Label();
|
||||
this.add_child(this._label);
|
||||
@ -1023,7 +1023,7 @@ class NMWirelessNetworkItem extends PopupMenu.PopupBaseMenuItem {
|
||||
style_class: 'popup-menu-icon',
|
||||
icon_name: 'object-select-symbolic',
|
||||
});
|
||||
this.add(this._selectedIcon);
|
||||
this.add_child(this._selectedIcon);
|
||||
|
||||
this._network.bind_property('icon-name',
|
||||
this._signalIcon, 'icon-name',
|
||||
|
@ -53,7 +53,7 @@ export const SwitcherPopup = GObject.registerClass({
|
||||
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
|
||||
Main.layoutManager.connectObject(
|
||||
'system-modal-opened', () => this.destroy(), this);
|
||||
@ -119,7 +119,7 @@ export const SwitcherPopup = GObject.registerClass({
|
||||
this._haveModal = true;
|
||||
this._modifierMask = primaryModifier(mask);
|
||||
|
||||
this.add_actor(this._switcherList);
|
||||
this.add_child(this._switcherList);
|
||||
this._switcherList.connect('item-activated', this._itemActivated.bind(this));
|
||||
this._switcherList.connect('item-entered', this._itemEntered.bind(this));
|
||||
this._switcherList.connect('item-removed', this._itemRemoved.bind(this));
|
||||
@ -412,8 +412,8 @@ export const SwitcherList = GObject.registerClass({
|
||||
});
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.NEVER);
|
||||
|
||||
this._scrollView.add_actor(this._list);
|
||||
this.add_actor(this._scrollView);
|
||||
this._scrollView.add_child(this._list);
|
||||
this.add_child(this._scrollView);
|
||||
|
||||
// Those arrows indicate whether scrolling in one direction is possible
|
||||
this._leftArrow = new St.DrawingArea({
|
||||
@ -431,8 +431,8 @@ export const SwitcherList = GObject.registerClass({
|
||||
drawArrow(this._rightArrow, St.Side.RIGHT);
|
||||
});
|
||||
|
||||
this.add_actor(this._leftArrow);
|
||||
this.add_actor(this._rightArrow);
|
||||
this.add_child(this._leftArrow);
|
||||
this.add_child(this._rightArrow);
|
||||
|
||||
this._items = [];
|
||||
this._highlighted = -1;
|
||||
@ -447,7 +447,7 @@ export const SwitcherList = GObject.registerClass({
|
||||
let bbox = new SwitcherButton(this._squareItems);
|
||||
|
||||
bbox.set_child(item);
|
||||
this._list.add_actor(bbox);
|
||||
this._list.add_child(bbox);
|
||||
|
||||
bbox.connect('clicked', () => this._onItemClicked(bbox));
|
||||
bbox.connect('motion-event', () => this._onItemMotion(bbox));
|
||||
|
@ -48,7 +48,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
vertical: true,
|
||||
style_class: 'unlock-dialog-notifications-container',
|
||||
});
|
||||
this._scrollView.add_actor(this._notificationBox);
|
||||
this._scrollView.add_child(this._notificationBox);
|
||||
|
||||
this.add_child(this._scrollView);
|
||||
|
||||
@ -98,7 +98,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
x_expand: true,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
textBox.add(title);
|
||||
textBox.add_child(title);
|
||||
|
||||
let count = source.unseenCount;
|
||||
let countLabel = new St.Label({
|
||||
@ -106,7 +106,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
visible: count > 1,
|
||||
style_class: 'unlock-dialog-notification-count-text',
|
||||
});
|
||||
textBox.add(countLabel);
|
||||
textBox.add_child(countLabel);
|
||||
|
||||
box.visible = count !== 0;
|
||||
return [title, countLabel];
|
||||
@ -115,7 +115,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
_makeNotificationDetailedSource(source, box) {
|
||||
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
|
||||
let sourceBin = new St.Bin({child: sourceActor});
|
||||
box.add(sourceBin);
|
||||
box.add_child(sourceBin);
|
||||
|
||||
let textBox = new St.BoxLayout({vertical: true});
|
||||
box.add_child(textBox);
|
||||
@ -124,7 +124,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
text: source.title.replace(/\n/g, ' '),
|
||||
style_class: 'unlock-dialog-notification-label',
|
||||
});
|
||||
textBox.add(title);
|
||||
textBox.add_child(title);
|
||||
|
||||
let visible = false;
|
||||
for (let i = 0; i < source.notifications.length; i++) {
|
||||
@ -143,7 +143,7 @@ const NotificationsBox = GObject.registerClass({
|
||||
|
||||
let label = new St.Label({style_class: 'unlock-dialog-notification-count-text'});
|
||||
label.clutter_text.set_markup(`<b>${n.title}</b> ${body}`);
|
||||
textBox.add(label);
|
||||
textBox.add_child(label);
|
||||
|
||||
visible = true;
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ export const TilePreview = GObject.registerClass(
|
||||
class TilePreview extends St.Widget {
|
||||
_init() {
|
||||
super._init();
|
||||
global.window_group.add_actor(this);
|
||||
global.window_group.add_child(this);
|
||||
|
||||
this._reset();
|
||||
this._showing = false;
|
||||
@ -487,7 +487,7 @@ class ResizePopup extends St.Widget {
|
||||
y_expand: true,
|
||||
});
|
||||
this.add_child(this._label);
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
}
|
||||
|
||||
set(rect, displayW, displayH) {
|
||||
|
@ -15,7 +15,7 @@ export class WindowMenu extends PopupMenu.PopupMenu {
|
||||
|
||||
this.actor.add_style_class_name('window-menu');
|
||||
|
||||
Main.layoutManager.uiGroup.add_actor(this.actor);
|
||||
Main.layoutManager.uiGroup.add_child(this.actor);
|
||||
this.actor.hide();
|
||||
|
||||
this._buildMenu(window);
|
||||
@ -227,7 +227,7 @@ export class WindowMenuManager {
|
||||
this._sourceActor.connect('button-press-event', () => {
|
||||
this._manager.activeMenu.toggle();
|
||||
});
|
||||
Main.uiGroup.add_actor(this._sourceActor);
|
||||
Main.uiGroup.add_child(this._sourceActor);
|
||||
}
|
||||
|
||||
showWindowMenuForWindow(window, type, rect) {
|
||||
|
@ -33,7 +33,7 @@ class WorkspaceGroup extends Clutter.Actor {
|
||||
if (this._workspace) {
|
||||
this._background = new Meta.BackgroundGroup();
|
||||
|
||||
this.add_actor(this._background);
|
||||
this.add_child(this._background);
|
||||
|
||||
this._bgManager = new Background.BackgroundManager({
|
||||
container: this._background,
|
||||
|
@ -26,7 +26,7 @@ class WorkspaceSwitcherPopup extends Clutter.Actor {
|
||||
const constraint = new Layout.MonitorConstraint({primary: true});
|
||||
this.add_constraint(constraint);
|
||||
|
||||
Main.uiGroup.add_actor(this);
|
||||
Main.uiGroup.add_child(this);
|
||||
|
||||
this._timeoutId = 0;
|
||||
|
||||
@ -60,7 +60,7 @@ class WorkspaceSwitcherPopup extends Clutter.Actor {
|
||||
if (i === this._activeWorkspaceIndex)
|
||||
indicator.add_style_pseudo_class('active');
|
||||
|
||||
this._list.add_actor(indicator);
|
||||
this._list.add_child(indicator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -483,7 +483,7 @@ export const WorkspaceThumbnail = GObject.registerClass({
|
||||
clone.connect('destroy', () => {
|
||||
this._removeWindowClone(clone.metaWindow);
|
||||
});
|
||||
this._contents.add_actor(clone);
|
||||
this._contents.add_child(clone);
|
||||
|
||||
if (this._windows.length > 0)
|
||||
clone.setStackAbove(this._windows[this._windows.length - 1]);
|
||||
@ -605,14 +605,14 @@ export const ThumbnailsBox = GObject.registerClass({
|
||||
Shell.util_set_hidden_from_pick(indicator, true);
|
||||
|
||||
this._indicator = indicator;
|
||||
this.add_actor(indicator);
|
||||
this.add_child(indicator);
|
||||
|
||||
this._monitorIndex = monitorIndex;
|
||||
|
||||
this._dropWorkspace = -1;
|
||||
this._dropPlaceholderPos = -1;
|
||||
this._dropPlaceholder = new St.Bin({style_class: 'placeholder'});
|
||||
this.add_actor(this._dropPlaceholder);
|
||||
this.add_child(this._dropPlaceholder);
|
||||
this._spliceIndex = -1;
|
||||
|
||||
this._maxThumbnailScale = MAX_THUMBNAIL_SCALE;
|
||||
@ -1008,7 +1008,7 @@ export const ThumbnailsBox = GObject.registerClass({
|
||||
this._porthole.x, this._porthole.y,
|
||||
this._porthole.width, this._porthole.height);
|
||||
this._thumbnails.push(thumbnail);
|
||||
this.add_actor(thumbnail);
|
||||
this.add_child(thumbnail);
|
||||
|
||||
if (this._shouldShow && start > 0 && this._spliceIndex === -1) {
|
||||
// not the initial fill, and not splicing via DND
|
||||
|
@ -453,7 +453,7 @@ class WorkspacesView extends WorkspacesViewBase {
|
||||
metaWorkspace,
|
||||
this._monitorIndex,
|
||||
this._overviewAdjustment);
|
||||
this.add_actor(workspace);
|
||||
this.add_child(workspace);
|
||||
this._workspaces[j] = workspace;
|
||||
} else {
|
||||
workspace = this._workspaces[j];
|
||||
@ -537,7 +537,7 @@ class ExtraWorkspaceView extends WorkspacesViewBase {
|
||||
super._init(monitorIndex, overviewAdjustment);
|
||||
this._workspace =
|
||||
new Workspace.Workspace(null, monitorIndex, overviewAdjustment);
|
||||
this.add_actor(this._workspace);
|
||||
this.add_child(this._workspace);
|
||||
}
|
||||
|
||||
_updateWorkspaceMode() {
|
||||
@ -1044,7 +1044,7 @@ class WorkspacesDisplay extends St.Widget {
|
||||
this._scrollAdjustment,
|
||||
this._fitModeAdjustment,
|
||||
this._overviewAdjustment);
|
||||
Main.layoutManager.overviewGroup.add_actor(view);
|
||||
Main.layoutManager.overviewGroup.add_child(view);
|
||||
}
|
||||
|
||||
this._workspacesViews.push(view);
|
||||
|
@ -16,7 +16,7 @@ export class XdndHandler extends Signals.EventEmitter {
|
||||
|
||||
// Used as a drag actor in case we don't have a cursor window clone
|
||||
this._dummy = new Clutter.Actor({width: 1, height: 1, opacity: 0});
|
||||
Main.uiGroup.add_actor(this._dummy);
|
||||
Main.uiGroup.add_child(this._dummy);
|
||||
this._dummy.hide();
|
||||
|
||||
var dnd = global.backend.get_dnd();
|
||||
@ -61,7 +61,7 @@ export class XdndHandler extends Signals.EventEmitter {
|
||||
});
|
||||
|
||||
this._cursorWindowClone = new Clutter.Clone({source: cursorWindow});
|
||||
Main.uiGroup.add_actor(this._cursorWindowClone);
|
||||
Main.uiGroup.add_child(this._cursorWindowClone);
|
||||
|
||||
// Make sure that the clone has the same position as the source
|
||||
this._cursorWindowClone.add_constraint(constraintPosition);
|
||||
|
Loading…
x
Reference in New Issue
Block a user