Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
hamster-time-tracker
0174-Fix-compatibility-issues-with-Gnome-shell-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0174-Fix-compatibility-issues-with-Gnome-shell-46.patch of Package hamster-time-tracker
From 010316aad2b2d3af771020a8625fc63829706fce Mon Sep 17 00:00:00 2001 From: Hedayat Vatankhah <hedayat.fwd@gmail.com> Date: Wed, 27 Mar 2024 14:47:47 +0330 Subject: [PATCH 174/176] Fix compatibility issues with Gnome shell 46 * *Box add() -> add_child() * Actor add_actor() -> add_child() * Actor remove_actor() -> remove_child() --- extension/extension.js | 10 +++++----- extension/widgets/factsBox.js | 12 ++++++------ extension/widgets/panelWidget.js | 6 +++--- extension/widgets/todaysFactsWidget.js | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/extension/extension.js b/extension/extension.js index 05e75cb..580d0a2 100644 --- a/extension/extension.js +++ b/extension/extension.js @@ -238,7 +238,7 @@ export default class Controller extends Extension { // 'Replace calendar' Main.panel.addToStatusArea("hamster", this.panelWidget, 0, "center"); - Main.panel._centerBox.remove_actor(dateMenu.container); + Main.panel._centerBox.remove_child(dateMenu.container); Main.panel._addToPanelBox('dateMenu', dateMenu, -1, Main.panel._rightBox); } else if (placement == 2) { // 'Replace activities' @@ -261,21 +261,21 @@ export default class Controller extends Extension { _removeWidget(placement) { if (placement == 1) { // We replaced the calendar - Main.panel._rightBox.remove_actor(dateMenu.container); + Main.panel._rightBox.remove_child(dateMenu.container); Main.panel._addToPanelBox( 'dateMenu', dateMenu, Main.sessionMode.panel.center.indexOf('dateMenu'), Main.panel._centerBox ); - Main.panel._centerBox.remove_actor(this.panelWidget.container); + Main.panel._centerBox.remove_child(this.panelWidget.container); } else if (placement == 2) { // We replaced the 'Activities' menu let activitiesMenu = Main.panel._leftBox.get_children()[0].get_children()[0].get_children()[0].get_children()[0]; activitiesMenu.set_text(this._activitiesText); - Main.panel._leftBox.remove_actor(this.panelWidget.container); + Main.panel._leftBox.remove_child(this.panelWidget.container); } else { - Main.panel._rightBox.remove_actor(this.panelWidget.container); + Main.panel._rightBox.remove_child(this.panelWidget.container); } } } diff --git a/extension/widgets/factsBox.js b/extension/widgets/factsBox.js index ab745de..8e9fac3 100644 --- a/extension/widgets/factsBox.js +++ b/extension/widgets/factsBox.js @@ -54,29 +54,29 @@ class FactsBox extends PopupMenu.PopupBaseMenuItem { // Setup *ongoing fact* label and widget let _ongoingFactLabel = new St.Label({style_class: 'hamster-box-label'}); _ongoingFactLabel.set_text(_("What are you doing?")); - main_box.add(_ongoingFactLabel); + main_box.add_child(_ongoingFactLabel); this.ongoingFactEntry = new OngoingFactEntry(this._controller); //this.ongoingFactEntry.clutter_text.connect('key-release-event', this._onKeyReleaseEvent.bind(this)); - main_box.add(this.ongoingFactEntry); + main_box.add_child(this.ongoingFactEntry); let fact_list_label = new St.Label({style_class: 'hamster-box-label'}); fact_list_label.set_text(_("Today's activities")); - main_box.add(fact_list_label); + main_box.add_child(fact_list_label); // Scrollbox that will house the list of todays facts // Since ``St.Table`` does not implement St.Scrollable, we create a // container object that does. this.todaysFactsWidget = new TodaysFactsWidget(this._controller, panelWidget); this._scrollAdjustment = this.todaysFactsWidget.vscroll.adjustment; - main_box.add(this.todaysFactsWidget); + main_box.add_child(this.todaysFactsWidget); // Setup category summery this.summaryLabel = new CategoryTotalsWidget(); - main_box.add(this.summaryLabel); + main_box.add_child(this.summaryLabel); // Setup total time this.totalTimeLabel = new TotalTimeWidget(); - main_box.add(this.totalTimeLabel); + main_box.add_child(this.totalTimeLabel); } // [FIXME] diff --git a/extension/widgets/panelWidget.js b/extension/widgets/panelWidget.js index bfdc41b..9b678cb 100644 --- a/extension/widgets/panelWidget.js +++ b/extension/widgets/panelWidget.js @@ -75,7 +75,7 @@ class PanelWidget extends PanelMenu.Button { let panelContainer = new St.BoxLayout({style_class: "panel-box"}); let _actor = (this instanceof Clutter.Actor ? this : this.actor); - _actor.add_actor(panelContainer); + _actor.add_child(panelContainer); _actor.add_style_class_name('panel-status-button'); this.panelLabel = new St.Label({ @@ -93,8 +93,8 @@ class PanelWidget extends PanelMenu.Button { icon_size: 16, style_class: "panel-icon"}); - panelContainer.add(this.icon); - panelContainer.add(this.panelLabel); + panelContainer.add_child(this.icon); + panelContainer.add_child(this.panelLabel); this.factsBox = new FactsBox(controller, this); this.menu.addMenuItem(this.factsBox); diff --git a/extension/widgets/todaysFactsWidget.js b/extension/widgets/todaysFactsWidget.js index 29c2370..1734cde 100644 --- a/extension/widgets/todaysFactsWidget.js +++ b/extension/widgets/todaysFactsWidget.js @@ -47,8 +47,8 @@ class TodaysFactsWidget extends St.ScrollView { layout_manager: new Clutter.GridLayout(), reactive: true }); - this.factsBox.add(this.facts_widget); - this.add_actor(this.factsBox); + this.factsBox.add_child(this.facts_widget); + this.add_child(this.factsBox); } -- 2.44.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor