Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
  • Loading branch information
ryanabx committed Aug 22, 2024
1 parent 67e06ef commit 2b9cfdf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 30 deletions.
9 changes: 4 additions & 5 deletions src/app_tray/compositor/cosmic_comp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ use iced::{
use once_cell::sync::Lazy;

use crate::app_tray::{
self,
compositor::{WindowHandle, WindowInfo},
AppTray, AppTrayMessage, ApplicationGroup,
AppTrayMessage, ApplicationGroup,
};

use super::WaylandOutgoing;
Expand Down Expand Up @@ -506,7 +505,7 @@ pub struct CosmicCompBackend {
wayland_sender: Option<Sender<WaylandRequest>>,
active_workspaces: Vec<ZcosmicWorkspaceHandleV1>,
output_list: HashMap<WlOutput, OutputInfo>,
current_output: String,
_current_output: String, // TODO: Get current output
}

impl CosmicCompBackend {
Expand All @@ -515,7 +514,7 @@ impl CosmicCompBackend {
wayland_sender: None,
active_workspaces: Vec::new(),
output_list: HashMap::new(),
current_output: "".to_string(),
_current_output: "".to_string(),
}
}

Expand Down Expand Up @@ -706,7 +705,7 @@ impl CosmicCompBackend {
.iter()
.any(|workspace| t_info.workspace.contains(workspace))
&& t_info.output.iter().any(|x| {
self.output_list.get(x).is_some_and(|val| {
self.output_list.get(x).is_some_and(|_val| {
true // TODO: Output stuff
// val.name.as_ref().is_some_and(|n| *n == self.current_output)
})
Expand Down
2 changes: 0 additions & 2 deletions src/app_tray/compositor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use cctk::toplevel_info::ToplevelInfo;
use cosmic_comp::CosmicCompBackend;
use cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1;

use crate::app_tray::AppTray;

use super::{AppTrayMessage, ApplicationGroup};

pub mod cosmic_comp;
Expand Down
19 changes: 2 additions & 17 deletions src/app_tray/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ use desktop_entry::DesktopEntryCache;
use freedesktop_desktop_entry::DesktopEntry;
use iced::{
event::{self, listen_with},
widget::{button, column, row, Container, Rule},
widget::{button, column, Container},
Background, Border, Color, Element, Length, Radius, Theme,
};

use crate::{
app_tray::compositor::{CompositorBackend, WaylandOutgoing, WindowHandle, WindowInfo},
Message,
};
use crate::app_tray::compositor::{CompositorBackend, WaylandOutgoing, WindowHandle, WindowInfo};

mod compositor;
pub mod desktop_entry;
Expand All @@ -39,18 +36,6 @@ pub enum AppTrayMessage {
RemovedSeat(WlSeat),
}

#[derive(Clone, Debug)]
pub enum AppTrayRequest {
Window(WindowOperationMessage),
}

#[derive(Clone, Debug)]
pub enum WindowOperationMessage {
Activate(WindowHandle),
Minimize(WindowHandle),
Launch(String),
}

impl<'a> Default for AppTrayConfig {
fn default() -> Self {
Self {
Expand Down
10 changes: 4 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use app_tray::{AppTray, AppTrayConfig, AppTrayMessage, ApplicationGroup};
use cctk::wayland_client::protocol::wl_seat::WlSeat;
use app_tray::{AppTray, AppTrayConfig, AppTrayMessage};
use config::PanelConfig;
use iced::{
application::{
actions::layer_surface::SctkLayerSurfaceSettings, layer_surface::Anchor, InitialSurface,
},
event::{self, listen_with},
widget::{column, container::Style},
Application, Background, Color, Command, Element, Radius, Settings, Subscription, Theme,
Application, Background, Color, Command, Radius, Settings, Theme,
};

mod app_tray;
Expand All @@ -30,14 +28,14 @@ fn main() -> Result<(), iced::Error> {

#[derive(Clone, Debug)]
struct Panel<'a> {
panel_config: PanelConfig,
_panel_config: PanelConfig,
app_tray: AppTray<'a>,
}

impl<'a> Default for Panel<'a> {
fn default() -> Self {
Self {
panel_config: PanelConfig::default(),
_panel_config: PanelConfig::default(),
app_tray: AppTray::new(AppTrayConfig::default()),
}
}
Expand Down

0 comments on commit 2b9cfdf

Please sign in to comment.