chore: align applets with local stack
Some checks failed
Continuous Integration / linting (push) Has been cancelled
Continuous Integration / formatting (push) Has been cancelled

This commit is contained in:
Lionel DARNIS 2026-05-23 20:49:24 +02:00
parent 1c7143af97
commit 6c24edfae2
39 changed files with 165 additions and 313 deletions

View file

@ -11,7 +11,6 @@ use cosmic::{
iced::{
self, Length, Subscription,
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
theme::Style,
window,
},
surface,
@ -25,6 +24,7 @@ use crate::{
};
#[derive(Clone, Debug)]
#[allow(dead_code)]
pub enum Msg {
None,
Activate(usize),
@ -577,7 +577,7 @@ fn menu_icon_button<'a>(
let icon = menu.icon_handle().clone();
let theme = cosmic::theme::active();
let theme = theme.cosmic();
let _theme = theme.cosmic();
let suggested = applet.suggested_size(true);
let padding = applet.suggested_padding(true).1;

View file

@ -8,7 +8,7 @@ use cosmic::{
iced,
widget::icon::{self, IconFallback},
};
use std::path::{Path, PathBuf};
use std::path::Path;
use crate::subscriptions::status_notifier_item::{IconUpdate, Layout, StatusNotifierItem};

View file

@ -10,21 +10,18 @@
//! can be socket-activated and not conflict with anything else running as a status notifier
//! watcher.
//!
//! The daemon runs as long as as there is at least one client still connected. Which it checks
//! for every `REFRESH_INTERVAL`.
//! The daemon runs as long as there is at least one client still connected.
use crate::subscriptions::status_notifier_watcher::server::create_service;
use crate::unique_names::UniqueNames;
use futures::StreamExt;
use std::{collections::HashSet, time::Duration};
use std::collections::HashSet;
use zbus::fdo;
use zbus::message::Header;
const DBUS_NAME: &str = "com.system76.CosmicStatusNotifierWatcher";
const OBJECT_PATH: &str = "/CosmicStatusNotifierWatcher";
const REFRESH_INTERVAL: Duration = Duration::from_secs(60);
/// Run daemon
pub fn run() -> cosmic::iced::Result {
if let Err(err) = run_inner() {
@ -42,7 +39,7 @@ pub async fn cosmic_register(conn: &zbus::Connection) -> zbus::Result<()> {
tokio::spawn(async move {
while let Some(value) = stream.next().await {
if let Some(_unique_name) = value {
/// Register with new owner
// Register with new owner.
let _ = cosmic_watcher.register_applet().await;
}
}