Skip to content

network applet: optional VPN list cap with overflow submenu (#13562)#13767

Open
araujorm wants to merge 1 commit into
linuxmint:masterfrom
araujorm:13562-optional-vpn-cap
Open

network applet: optional VPN list cap with overflow submenu (#13562)#13767
araujorm wants to merge 1 commit into
linuxmint:masterfrom
araujorm:13562-optional-vpn-cap

Conversation

@araujorm
Copy link
Copy Markdown

Fixes #13562.

NMDeviceVPN._createSection lists every configured VPN inline regardless of count, unlike the wired, wireless, mobile broadband and WireGuard sections, which cap at NUM_VISIBLE_NETWORKS (5). With many VPN connections the menu exceeds the monitor height and the items below (Network Settings, Network Connections) become unreachable.

The patch adds a per-instance cap to NMDeviceVPN, exposed through two new settings:

  • "Limit VPN list" (switch, default off): gates the behaviour.
  • "Visible VPN connections before "More"" (spinbutton, default 5, range 1-50, shown via dependency only when the switch is on): cap value.

When the switch is off the cap is Infinity, so the popup looks exactly like an unpatched Cinnamon 6.6.x. When on, items beyond the cap move into a "More" submenu, matching the existing behaviour of the other sections.

Tested on Fedora 44 (cinnamon-6.6.7-5.fc44) with 27 configured VPN connections.

@github-actions
Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 2 potential issue(s):

⚠️ WARNING

⚠️ lang_bind

files/usr/share/cinnamon/applets/network@cinnamon.org/applet.js:1839

this.settings.bind("cap-vpn-list", "_capVpnList", Lang.bind(this, this._onVpnCapChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

files/usr/share/cinnamon/applets/network@cinnamon.org/applet.js:1840

this.settings.bind("num-visible-vpns", "_numVisibleVpns", Lang.bind(this, this._onVpnCapChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.


Automated pattern check.

@araujorm araujorm force-pushed the 13562-optional-vpn-cap branch from f3f45c9 to cf55360 Compare May 18, 2026 10:03
@araujorm
Copy link
Copy Markdown
Author

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or maintainability issues, or that may already be provided by Cinnamon. Most findings are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.

Found 2 potential issue(s):

⚠️ WARNING

⚠️ lang_bind

files/usr/share/cinnamon/applets/network@cinnamon.org/applet.js:1839

this.settings.bind("cap-vpn-list", "_capVpnList", Lang.bind(this, this._onVpnCapChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

files/usr/share/cinnamon/applets/network@cinnamon.org/applet.js:1840

this.settings.bind("num-visible-vpns", "_numVisibleVpns", Lang.bind(this, this._onVpnCapChanged));

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

Automated pattern check.

Fixed in latest push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

network@cinnamon.org applet missing "More" on VPN Connections in LM 22.3 & LMDE 7

1 participant