Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions src/Widgets/WifiInterface.vala
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,25 @@ public class Network.WifiInterface : Network.WidgetNMInterface {
}

construct {
var no_aps = new PlaceholderLabel (_("No Access Points Available"));
// FIXME: use Granite.Placeholder in GTK4
var no_aps = new Gtk.Label (_("No Access Points Available")) {
justify = CENTER,
max_width_chars = 30,
use_markup = true,
visible = true,
wrap_mode = WORD_CHAR,
wrap = true
};

var scanning = new PlaceholderLabel (_("Scanning for Access Points…")) {
var scanning = new Gtk.Label (_("Scanning for Access Points…")) {
halign = START,
hexpand = true
hexpand = true,
justify = CENTER,
max_width_chars = 30,
use_markup = true,
visible = true,
wrap_mode = WORD_CHAR,
wrap = true
};

var spinner = new Gtk.Spinner ();
Expand Down Expand Up @@ -415,21 +429,6 @@ public class Network.WifiInterface : Network.WidgetNMInterface {
}
}

private class PlaceholderLabel : Gtk.Label {
public PlaceholderLabel (string label) {
Object (label: label);
}

construct {
justify = Gtk.Justification.CENTER;
max_width_chars = 30;
use_markup = true;
visible = true;
wrap_mode = Pango.WrapMode.WORD_CHAR;
wrap = true;
}
}

private void access_point_added_cb (Object ap_) {
NM.AccessPoint ap = (NM.AccessPoint)ap_;
unowned GLib.Bytes ap_ssid = ap.ssid;
Expand Down