Skip to content

Commit 1572920

Browse files
authored
Panel cleanup 2 (#13613)
* panel.js: Remove the TextShadower object This isn't used anywhere in Cinnamon or any Xlets. * panel.js: Port the PanelManager to GObject Clean up uses of Lang.bind() and clean up a few variable names and some code styling * panel.js: Port the PanelDummy to GObject This removes a use of CinnamonGenericContainer * panel.js: Remove the AnimatedIcon object We only have one unmaintained applet using this currently. For the use case of a spinner, we can add a dedicated object for that purpose. We have other uses for that. * panel.js: Port the SettingsLauncher object to a class Remove usage of Lang.bind() as well * panel.js: Port the PanelContextMenu to class Remove old commented out options. These have been disabled for a long time. They can be re-added if we want to bring them back. * panel.js: Port the PanelZoneDNDHandler to class * panel.js: Port the Panel object to class * Rebase on git master * panel.js: Port the panel to St.Widget This removes another major use of CinnamonGenericContainer. This could be taken even further, but trying to break as little as possible with this change. * panel.js: Clean up a bit of code styling This is only a partial cleanup. This file is a mess of different styles but hopefully it's at least a bit better. * panel.js: Remove unneeded uses of this.actor * appletManager.js: Fixed a typo in variable name Missed this when converting the panel to an St.Widget
1 parent cf1f5ad commit 1572920

3 files changed

Lines changed: 649 additions & 831 deletions

File tree

js/ui/applet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ var Applet = class Applet {
656656
}
657657

658658
get _panelHeight() {
659-
return this.panel.height;
659+
return this.panel.heightForZones;
660660
}
661661

662662
get _scaleMode() {

js/ui/appletManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ function createApplet(extension, appletDefinition, panel = null) {
597597
// FIXME: Panel height is now available before an applet is initialized,
598598
// so we don't need to pass it to the constructor anymore, but would
599599
// require a compatibility clean-up effort.
600-
applet = extension.module.main(extension.meta, orientation, panel.height, applet_id);
600+
applet = extension.module.main(extension.meta, orientation, panel.heightForZones, applet_id);
601601
} catch (e) {
602602
Extension.logError(`Failed to evaluate 'main' function on applet: ${uuid}/${applet_id}`, uuid, e);
603603
return null;

0 commit comments

Comments
 (0)