chore: Show address for bluetooth

This commit is contained in:
Fabio Lenherr / DashieTM 2023-12-06 19:15:39 +01:00
parent 64a5a67e29
commit 8518d6e247
4 changed files with 65 additions and 23 deletions

View file

@ -3,7 +3,6 @@ use std::time::Duration;
use crate::components::bluetooth::bluetooth_entry_impl;
use adw::glib::Object;
use adw::prelude::ActionRowExt;
use adw::subclass::prelude::ObjectSubclassIsExt;
use adw::{glib, ActionRow};
use dbus::blocking::Connection;
@ -29,7 +28,10 @@ impl BluetoothEntry {
.reset_bluetooth_label
.get()
.set_text(&device.alias);
entry.set_subtitle(&device.address);
entry_imp
.reset_bluetooth_address
.get()
.set_text(&device.address);
entry.set_activatable(true);
if device.icon.is_empty() {
entry_imp

View file

@ -14,6 +14,8 @@ pub struct BluetoothEntry {
#[template_child]
pub reset_bluetooth_label: TemplateChild<Label>,
#[template_child]
pub reset_bluetooth_address: TemplateChild<Label>,
#[template_child]
pub reset_bluetooth_button: TemplateChild<Button>,
pub device_name: RefCell<String>,
}