[System Tray] Listen to external collapse
AbandonedPublic

Authored by broulik on Feb 28 2017, 3:32 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

When plasmoid.expanded = false is done, hide the popup.
This is done by the panelcontroller to ensure we don't manipulate the panel with open popups.

Test Plan

Opened systray popup, clicked panel toolbox, systray popup closed.

The internalSystray is needed because initially it emits plasmoid.expanded true probably because we force expanded rep

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Feb 28 2017, 3:32 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 28 2017, 3:32 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Hold on, I didn't properly test this. It closes because of the controller window gaining focus, my idea was to also have it close when the pin is checked which this patch doesn't fix.

mart added a subscriber: mart.Feb 28 2017, 3:43 PM

i don't think the panel controller does that, but would be easy to do so? (in the panel containment, when isuserconfiguring proeprty changes)

Of course I meant the code in panel containment, but here it does expanded = false and that's what I wanted to listen to :)

Plasmoid.onUserConfiguringChanged: {
    ...
        if (plasmoid.userConfiguring) {
            for (var i = 0; i < plasmoid.applets.length; ++i) {
                plasmoid.applets[i].expanded = false;
            }
        ...
}

But perhaps AppletInterface sees that we force expanded rep and then ignores that request.

mart added a comment.Mar 1 2017, 1:11 PM

Of course I meant the code in panel containment, but here it does expanded = false and that's what I wanted to listen to :)

Plasmoid.onUserConfiguringChanged: {
    ...
        if (plasmoid.userConfiguring) {
            for (var i = 0; i < plasmoid.applets.length; ++i) {
                plasmoid.applets[i].expanded = false;
            }
        ...
}

But perhaps AppletInterface sees that we force expanded rep and then ignores that request.

to me a pinned calendar gets correctly closed, not the systray

broulik abandoned this revision.Mar 3 2017, 1:27 PM