Package: gnome-shell-extension-show-ip Version: 8-3 Severity: wishlist Tags: patch upstream Forwarded: https://github.com/sgaraud/gnome-extension-show-ip/pull/20
Please apply the attached patch from upstream pull request #20 to show IP addresses on the interface selection list. -- System Information: Debian Release: bullseye/sid APT prefers testing-debug APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental') Architecture: amd64 (x86_64) Kernel: Linux 5.3.0-2-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gnome-shell-extension-show-ip depends on: ii gnome-shell 3.34.1+git20191024-1 gnome-shell-extension-show-ip recommends no packages. gnome-shell-extension-show-ip suggests no packages. -- no debconf information -- bye, pabs https://wiki.debian.org/PaulWise
From 14ab34cf53150bca946cd7a47b6bfbc486904c5c Mon Sep 17 00:00:00 2001 From: Paul Wise <pa...@bonedaddy.net> Date: Thu, 2 Mar 2017 17:36:33 +0800 Subject: [PATCH] Show IP addresses on the interface selection list This is useful to get the full list of IPs at a glance. --- extension.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/extension.js b/extension.js index d9a7940..ae848c7 100644 --- a/extension.js +++ b/extension.js @@ -186,20 +186,27 @@ const IpMenuBase = new Lang.Class({ }, _addToPopupMenu: function (dev) { - this.item = new PopupMenu.PopupMenuItem(dev); + let text = dev + ' '; + for (let device of this._devices) { + if (device.ifc == dev) { + text += device.ip; + } + } + this.item = new PopupMenu.PopupMenuItem(text); + this.item.ifc = dev; this.menu.addMenuItem(this.item); this._manualUpdateId = this.item.connect('activate', Lang.bind(this, this._manualUpdate)); }, _manualUpdate: function (it) { for (let device of this._devices) { - if (device.ifc == it.label.get_text()) { + if (device.ifc == it.ifc) { this.selectedDevice = device.ifc; Schema.set_string('last-device', device.ifc); break; } } - if (PUBLIC_IP == it.label.get_text()) { + if (PUBLIC_IP == it.ifc) { this.selectedDevice = PUBLIC_IP; Schema.set_string('last-device', PUBLIC_IP); } -- 2.24.0
signature.asc
Description: This is a digitally signed message part