From 350cd296fa90adb3d18f9b375b5531077cff825a Mon Sep 17 00:00:00 2001 From: Zander Brown Date: Tue, 7 Nov 2023 10:47:14 +0000 Subject: [PATCH] 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: --- js/gdm/authList.js | 4 +- js/gdm/loginDialog.js | 10 ++-- js/ui/accessDialog.js | 2 +- js/ui/altTab.js | 26 ++++----- js/ui/appDisplay.js | 4 +- js/ui/audioDeviceSelection.js | 6 +-- js/ui/backgroundMenu.js | 2 +- js/ui/boxpointer.js | 4 +- js/ui/calendar.js | 22 ++++---- js/ui/checkBox.js | 4 +- js/ui/components/autorunManager.js | 4 +- js/ui/components/telepathyClient.js | 8 +-- js/ui/dash.js | 4 +- js/ui/dateMenu.js | 30 +++++------ js/ui/dialog.js | 4 +- js/ui/dnd.js | 6 +-- js/ui/extensionDownloader.js | 2 +- js/ui/ibusCandidatePopup.js | 12 ++--- js/ui/iconGrid.js | 6 +-- js/ui/keyboard.js | 8 +-- js/ui/layout.js | 28 +++++----- js/ui/lightbox.js | 2 +- js/ui/lookingGlass.js | 82 ++++++++++++++--------------- js/ui/magnifier.js | 24 ++++----- js/ui/messageList.js | 28 +++++----- js/ui/messageTray.js | 8 +-- js/ui/modalDialog.js | 6 +-- js/ui/osdMonitorLabeler.js | 4 +- js/ui/osdWindow.js | 2 +- js/ui/padOsd.js | 30 +++++------ js/ui/pageIndicators.js | 2 +- js/ui/panel.js | 12 ++--- js/ui/panelMenu.js | 4 +- js/ui/pointerA11yTimeout.js | 2 +- js/ui/popupMenu.js | 12 ++--- js/ui/quickSettings.js | 2 +- js/ui/ripples.js | 6 +-- js/ui/runDialog.js | 2 +- js/ui/screenShield.js | 4 +- js/ui/screenshot.js | 8 +-- js/ui/search.js | 20 +++---- js/ui/searchController.js | 2 +- js/ui/shellEntry.js | 2 +- js/ui/status/keyboard.js | 4 +- js/ui/status/network.js | 4 +- js/ui/switcherPopup.js | 14 ++--- js/ui/unlockDialog.js | 12 ++--- js/ui/windowManager.js | 4 +- js/ui/windowMenu.js | 4 +- js/ui/workspaceAnimation.js | 2 +- js/ui/workspaceSwitcherPopup.js | 4 +- js/ui/workspaceThumbnail.js | 8 +-- js/ui/workspacesView.js | 6 +-- js/ui/xdndHandler.js | 4 +- 54 files changed, 263 insertions(+), 263 deletions(-) diff --git a/js/gdm/authList.js b/js/gdm/authList.js index eb3c37cfb..d46fb11bb 100644 --- a/js/gdm/authList.js +++ b/js/gdm/authList.js @@ -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); diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index a3e4372b4..0121a2fdc 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -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: '', diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index e3fd5f10a..777fd2b3c 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -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(); diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 40a86b08c..21dba9d3f 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -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 = []; diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 1ecdb23c3..901bb5516 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -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); } diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js index dad6b09a3..d4d5e12ab 100644 --- a/js/ui/audioDeviceSelection.js +++ b/js/ui/audioDeviceSelection.js @@ -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); diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index cf89685c0..33b340275 100644 --- a/js/ui/backgroundMenu.js +++ b/js/ui/backgroundMenu.js @@ -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(); } } diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index 0a50bd562..53433245d 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -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; diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 6de034c2c..913203e04 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -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() { diff --git a/js/ui/checkBox.js b/js/ui/checkBox.js index f4bae7ee7..4a5dbba7a 100644 --- a/js/ui/checkBox.js +++ b/js/ui/checkBox.js @@ -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); diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 16a05aefc..58c0d1fc9 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -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, diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index c8f28aa9c..001c5d274 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -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); } } diff --git a/js/ui/dash.js b/js/ui/dash.js index ca598ae76..8f4c2a95c 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -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); diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index ae8073e41..d9219fda2 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -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); diff --git a/js/ui/dialog.js b/js/ui/dialog.js index b4388b040..62602870f 100644 --- a/js/ui/dialog.js +++ b/js/ui/dialog.js @@ -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', diff --git a/js/ui/dnd.js b/js/ui/dnd.js index bca5face6..22e45766c 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -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); diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index eb1757978..6daca8155 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -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() { diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js index 9a4293089..4fb62ece6 100644 --- a/js/ui/ibusCandidatePopup.js +++ b/js/ui/ibusCandidatePopup.js @@ -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(); diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index e7bb62fb9..81eabf97a 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -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; diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index fb39b2d1f..da9137d5f 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -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(); diff --git a/js/ui/layout.js b/js/ui/layout.js index ff1626e24..4dfa514de 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -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); } diff --git a/js/ui/lightbox.js b/js/ui/lightbox.js index 36739fe83..b461aa58f 100644 --- a/js/ui/lightbox.js +++ b/js/ui/lightbox.js @@ -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)); diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 0f840df59..83f563c7a 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -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: ''})); + propsBox.add_child(new St.Label({text: ''})); } } } @@ -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: ''}); } 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); diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index ab8150bb4..ce03e3cd7 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -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(); } diff --git a/js/ui/messageList.js b/js/ui/messageList.js index c3746bc1c..15d0c5e12 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -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)); diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 73a9ed9f6..42ded63fb 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -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; diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 2cb2a737c..eda38b3af 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -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); diff --git a/js/ui/osdMonitorLabeler.js b/js/ui/osdMonitorLabeler.js index 2e8682fcc..81633c6f8 100644 --- a/js/ui/osdMonitorLabeler.js +++ b/js/ui/osdMonitorLabeler.js @@ -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); diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index 9d32e40cb..70ced0efe 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -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); diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index c5faad7e8..0309f0d42 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -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); diff --git a/js/ui/pageIndicators.js b/js/ui/pageIndicators.js index c8d5c2361..38b812a6e 100644 --- a/js/ui/pageIndicators.js +++ b/js/ui/pageIndicators.js @@ -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); diff --git a/js/ui/panel.js b/js/ui/panel.js index 6fa493b69..a15290771 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -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); diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js index 1c43065eb..d4980fde3 100644 --- a/js/ui/panelMenu.js +++ b/js/ui/panelMenu.js @@ -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; diff --git a/js/ui/pointerA11yTimeout.js b/js/ui/pointerA11yTimeout.js index 4b78f0189..2288612e6 100644 --- a/js/ui/pointerA11yTimeout.js +++ b/js/ui/pointerA11yTimeout.js @@ -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); diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index f06bee65f..131f9ba6c 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -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)); diff --git a/js/ui/quickSettings.js b/js/ui/quickSettings.js index 1bc84a012..d53ae2f8b 100644 --- a/js/ui/quickSettings.js +++ b/js/ui/quickSettings.js @@ -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; diff --git a/js/ui/ripples.js b/js/ui/ripples.js index 9eb3c7ef4..6cc5888eb 100644 --- a/js/ui/ripples.js +++ b/js/ui/ripples.js @@ -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) { diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index 3ffa1ebb2..667608796 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -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', diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 526aa8bfd..7e428623e 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -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) { diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 563fbed79..af031e432 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -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() { diff --git a/js/ui/search.js b/js/ui/search.js index 071f6332b..d31265be3 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -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() { diff --git a/js/ui/searchController.js b/js/ui/searchController.js index 3c4af3289..25b53e6e1 100644 --- a/js/ui/searchController.js +++ b/js/ui/searchController.js @@ -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); diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index 80a5b9f2f..65c811168 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -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(); } diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index 8d98e16de..7436326b9 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -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); } } diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 322d7d91a..958d3c058 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -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', diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index dec8dbf61..cc44c401a 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -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)); diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 342a14eac..26092320f 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -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(`${n.title} ${body}`); - textBox.add(label); + textBox.add_child(label); visible = true; } diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 99be1b406..0cb0788de 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -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) { diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js index 145722854..655572e29 100644 --- a/js/ui/windowMenu.js +++ b/js/ui/windowMenu.js @@ -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) { diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js index b6442f743..c83001496 100644 --- a/js/ui/workspaceAnimation.js +++ b/js/ui/workspaceAnimation.js @@ -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, diff --git a/js/ui/workspaceSwitcherPopup.js b/js/ui/workspaceSwitcherPopup.js index 6ae6e0a59..cae189eb5 100644 --- a/js/ui/workspaceSwitcherPopup.js +++ b/js/ui/workspaceSwitcherPopup.js @@ -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); } } diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 20b5b55dd..1302414fb 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -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 diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 5d58542f9..24c24896d 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -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); diff --git a/js/ui/xdndHandler.js b/js/ui/xdndHandler.js index 99e3b74d3..6c2fba79b 100644 --- a/js/ui/xdndHandler.js +++ b/js/ui/xdndHandler.js @@ -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);