~blue-shell/blue-shell/plasma-nm

« back to all changes in this revision

Viewing changes to applet/contents/ui/ConnectionItem.qml

  • Committer: Weng Xuetian
  • Date: 2014-12-17 00:18:58 UTC
  • Revision ID: git-v1:fc42a8d741af3886daddcdf0b05926e8f4fbc2b6
correctly maintain connecting state and connection icons

m_connecting is not always maintained correctly, thus it causes some
problem on plasmoid side. In the old code, if there are multiple
connections, activeConnectionDestroy might set connecting to wrong value
if there's another connection connecting.

This patch introduce ConnectionIcon::setStates() function, which always
scan through all active connections (number of active connections is
relatively small so it won't affect performance), and set connecting to
true if any connection is in "Activtating" state.

REVIEW: 121526

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
 
130
130
            height: units.iconSizes.medium;
131
131
            width: height;
132
 
            running: ConnectionState == PlasmaNM.Enums.Activating;
133
 
            visible: running && !stateChangeButton.visible;
 
132
            running: plasmoid.expanded && !stateChangeButton.visible && ConnectionState == PlasmaNM.Enums.Activating;
 
133
            visible: running;
134
134
        }
135
135
 
136
136
        PlasmaComponents.Button {