https://bugs.kde.org/show_bug.cgi?id=523675

Marco Martin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Marco Martin <[email protected]> ---
Indeed, in plasma6 applet.index is not implemented. now, i'm not sure how to
actually implement it as it seems to be a stub since plasma5 (the old actual
implementation seems to be KDE4 based)

I'll give it a try to see if i can have an implementation that works on the
current panel architecture

in the meantime, a workaround that is as small as possible (and reliable for
now) is:
    panelIds.forEach((panelId) => {
        let panel = panelById(panelId);
        if (!panel) {
            return;
        }
        panel.widgetIds.forEach((appletWidgetId) => {
            let appletWidget = panel.widgetById(appletWidgetId);
            if (appletWidget.type === "org.kde.plasma.kickoff") {
                const x = appletWidget.geometry.x + appletWidget.geometry.width
/ 2
                const y = appletWidget.geometry.y +
appletWidget.geometry.height / 2
                const newWidget = panel.addWidget('org.kde.plasma.icon', x +
1,y + 1);
                //newWidget.index = appletWidget.index;
                newWidget.writeConfig( 'localpath',
'/usr/share/applications/org.kde.kate.desktop' );
                newWidget.currentConfigGroup = [ 'General' ];
                newWidget.writeConfig( 'url',
'file:///usr/share/applications/org.kde.kate.desktop' );
            }
        }); 
    });

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to