Bug#944993: marked as done (gnome-shell-extension-show-ip: primary-interface patch broke loading the extension)
Your message dated Tue, 19 Nov 2019 15:49:42 + with message-id and subject line Bug#944993: fixed in gnome-shell-extension-show-ip 8-5 has caused the Debian Bug report #944993, regarding gnome-shell-extension-show-ip: primary-interface patch broke loading the extension to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 944993: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944993 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems --- Begin Message --- Package: gnome-shell-extension-show-ip Version: 8-4 Severity: serious Tags: patch The primary-interface patch I proposed had a serious issue: JS ERROR: Extension show...@sgaraud.github.com: ReferenceError: device is not defined I've fixed the issue upstream and in the attached patch. -- 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 626ff48b7e29cf4178a2f439b85340e7b1e25774 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Thu, 2 Mar 2017 18:07:14 +0800 Subject: [PATCH] Show the primary IP address when no interface was chosen Makes it easier to see all IP addresses at a glance. Uses NM to get which interface(s) are in the default route. --- README.md| 1 + extension.js | 53 +--- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0fafb7a..eec47e3 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ issues](https://github.com/sgaraud/gnome-extension-show-ip/issues). ### License Copyright (C) 2015 Sylvain Garaud +Copyright 2017 Paul Wise This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extension.js b/extension.js index d9a7940..5dc7d9a 100644 --- a/extension.js +++ b/extension.js @@ -3,6 +3,7 @@ * https://github.com/sgaraud/gnome-extension-show-ip * * Copyright (C) 2015 Sylvain Garaud + * Copyright 2017 Paul Wise * * This file is part of Show-IP GNOME extension. * Show IP GNOME extension is free software: you can redistribute it and/or modify @@ -170,17 +171,30 @@ const IpMenuBase = new Lang.Class({ } }); +this._getPrimaryDevices(this.client); +let selectedIp = ''; +let primaryIp = ''; +let firstIp = ''; for (let device of this._devices) { -if (device.ifc == this.selectedDevice) { -if (Schema.get_boolean("menu")) { -this.label.set_text(_("IP: %s").format(device.ip)); -} else { -this.label.set_text(device.ip); -} -break; +if (!selectedIp && device.ifc == this.selectedDevice) { +selectedIp = device.ip; +} +if (!primaryIp && device.primary) { +primaryIp = device.ip; +} +if (!firstIp) { +firstIp = device.ip; } } -if ('' == this.selectedDevice) { +let ip = selectedIp ? selectedIp : primaryIp ? primaryIp : firstIp; +if (ip) { +if (Schema.get_boolean("menu")) { +this.label.set_text(_("IP: %s").format(ip)); +} else { +this.label.set_text(ip); +} +this.label.set_text(ip); +} else { this.label.set_text(NOT_CONNECTED); } }, @@ -207,6 +221,26 @@ const IpMenuBase = new Lang.Class({ this._createPopupMenu(); }, +_getPrimaryDevices: function (nmc) { +let primary_conn = nmc.get_primary_connection(); +let primary_devices = primary_conn.get_devices(); +let primary_ifcs = []; +let
Bug#944993: marked as done (gnome-shell-extension-show-ip: primary-interface patch broke loading the extension)
Your message dated Mon, 18 Nov 2019 15:21:39 + with message-id and subject line Bug#944993: fixed in gnome-shell-extension-show-ip 8-5~exp1 has caused the Debian Bug report #944993, regarding gnome-shell-extension-show-ip: primary-interface patch broke loading the extension to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 944993: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944993 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems --- Begin Message --- Package: gnome-shell-extension-show-ip Version: 8-4 Severity: serious Tags: patch The primary-interface patch I proposed had a serious issue: JS ERROR: Extension show...@sgaraud.github.com: ReferenceError: device is not defined I've fixed the issue upstream and in the attached patch. -- 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 626ff48b7e29cf4178a2f439b85340e7b1e25774 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Thu, 2 Mar 2017 18:07:14 +0800 Subject: [PATCH] Show the primary IP address when no interface was chosen Makes it easier to see all IP addresses at a glance. Uses NM to get which interface(s) are in the default route. --- README.md| 1 + extension.js | 53 +--- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0fafb7a..eec47e3 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ issues](https://github.com/sgaraud/gnome-extension-show-ip/issues). ### License Copyright (C) 2015 Sylvain Garaud +Copyright 2017 Paul Wise This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extension.js b/extension.js index d9a7940..5dc7d9a 100644 --- a/extension.js +++ b/extension.js @@ -3,6 +3,7 @@ * https://github.com/sgaraud/gnome-extension-show-ip * * Copyright (C) 2015 Sylvain Garaud + * Copyright 2017 Paul Wise * * This file is part of Show-IP GNOME extension. * Show IP GNOME extension is free software: you can redistribute it and/or modify @@ -170,17 +171,30 @@ const IpMenuBase = new Lang.Class({ } }); +this._getPrimaryDevices(this.client); +let selectedIp = ''; +let primaryIp = ''; +let firstIp = ''; for (let device of this._devices) { -if (device.ifc == this.selectedDevice) { -if (Schema.get_boolean("menu")) { -this.label.set_text(_("IP: %s").format(device.ip)); -} else { -this.label.set_text(device.ip); -} -break; +if (!selectedIp && device.ifc == this.selectedDevice) { +selectedIp = device.ip; +} +if (!primaryIp && device.primary) { +primaryIp = device.ip; +} +if (!firstIp) { +firstIp = device.ip; } } -if ('' == this.selectedDevice) { +let ip = selectedIp ? selectedIp : primaryIp ? primaryIp : firstIp; +if (ip) { +if (Schema.get_boolean("menu")) { +this.label.set_text(_("IP: %s").format(ip)); +} else { +this.label.set_text(ip); +} +this.label.set_text(ip); +} else { this.label.set_text(NOT_CONNECTED); } }, @@ -207,6 +221,26 @@ const IpMenuBase = new Lang.Class({ this._createPopupMenu(); }, +_getPrimaryDevices: function (nmc) { +let primary_conn = nmc.get_primary_connection(); +let primary_devices = primary_conn.get_devices(); +let primary_ifcs = []; +