Compare commits

...

2 commits

Author SHA1 Message Date
bc59c51c9e Wrap indicator children in BoxLayout for proper allocation
PanelMenu.ButtonBox.vfunc_allocate only handles its first child via
get_first_child(). Adding icon and label as direct children caused the
label to never be allocated, making the indicator invisible when WiFi
generation is unknown and the label should display instead of the icon.
2026-02-18 01:17:53 +01:00
87438d9437 Fix iw command by promisifying communicate_utf8_async
Gio.Subprocess.communicate_utf8_async requires explicit promisification
via Gio._promisify() to be used with await. Without it, the call fails
with "At least 3 arguments required, but only 2 passed", causing silent
fallback to unknown WiFi generation on every refresh.
2026-02-18 01:16:32 +01:00
2 changed files with 6 additions and 2 deletions

View file

@ -142,8 +142,10 @@ export default class WifiSignalPlusExtension extends Extension {
style_class: 'wifi-signal-plus-label',
});
this.indicator.add_child(this.icon);
this.indicator.add_child(this.label);
const box = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
box.add_child(this.icon);
box.add_child(this.label);
this.indicator.add_child(box);
this.buildMenu();
Main.panel.addToStatusArea(this.uuid, this.indicator);

View file

@ -8,6 +8,8 @@ import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import NM from 'gi://NM';
Gio._promisify(Gio.Subprocess.prototype, 'communicate_utf8_async', 'communicate_utf8_finish');
import { parseIwLinkOutput, createEmptyIwLinkInfo } from './wifiGeneration.js';
import {
type WifiConnectionInfo,