D18504: [plasma-nm/applet] Add right-click context menu to directly customize a connection

Kai Uwe Broulik noreply at phabricator.kde.org
Fri Jan 25 07:29:09 GMT 2019


broulik added a comment.


  > I'm not convinced this is needed at all. How often do you need to modify a connection?
  
  Often enough that it annoys me that I have to open the connection editor first and then search the connection *again* in the list of connections. +1 for the change.

INLINE COMMENTS

> ConnectionItem.qml:144
> +        acceptedButtons: Qt.RightButton
> +        propagateComposedEvents: true
> +        anchors.fill: parent

What't this for?

> ConnectionItem.qml:146
> +        anchors.fill: parent
> +        onClicked: {
> +            contextMenu.popup()

Context menus open on press, not click

> ConnectionItem.qml:151
> +
> +    Controls.Menu {
> +        id: contextMenu

I would prefer `PlasmaComponent.Menu` here which is a "proper" popping up menu rather than an inline item like QQC2 unfortunately always does.

> ConnectionItem.qml:153
> +        id: contextMenu
> +        Controls.MenuItem {
> +            text: ItemUniqueName

I don't think this header is needed, we hardly do that elsewhere.

> ConnectionItem.qml:158
> +        Controls.MenuItem {
> +            text: (ConnectionState == PlasmaNM.Enums.Deactivated) ? i18n("Connect") : i18n("Disconnect")
> +            icon.name: (ConnectionState == PlasmaNM.Enums.Deactivated) ? "network-connect" : "network-disconnect"

I guess you can just use the `stateChangeButton` text?

> ConnectionItem.qml:165
> +            icon.name: "settings-configure"
> +            onTriggered: KCMShell.open([mainWindow.kcm, "--args", "Uuid=" + Uuid])
> +        }

Sneaky, I didn't intend `KCMShell.open` to accept arbitrary argument :D

REPOSITORY
  R116 Plasma Network Management Applet

REVISION DETAIL
  https://phabricator.kde.org/D18504

To: vpilo, #vdg
Cc: broulik, jgrulich, ngraham, abetts, GB_2, plasma-devel, jraleigh, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190125/26da36fa/attachment-0001.html>


More information about the Plasma-devel mailing list