Skip to content

Commit

Permalink
remove: multi-window feature
Browse files Browse the repository at this point in the history
  • Loading branch information
edfloreshz committed Nov 20, 2024
1 parent 8aec570 commit 880c34a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chrono = { version = "0.4.38", features = ["serde"] }
[dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic.git"
default-features = false
features = ["multi-window", "tokio", "winit", "wgpu", "about"]
features = ["tokio", "winit", "wgpu", "about"]

[dependencies.cosmic-ext-config-templates]
git = "https://github.com/ryanabx/cosmic-ext-config-templates"
Expand Down
10 changes: 2 additions & 8 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ impl Application for TweakTool {
)),
];

if let Some(id) = app.core.main_window_id() {
tasks.push(app.set_window_title(fl!("app-title"), id));
}
tasks.push(app.set_window_title(fl!("app-title")));

(app, Task::batch(tasks))
}
Expand Down Expand Up @@ -271,17 +269,13 @@ impl Application for TweakTool {
) -> cosmic::iced::Task<app::Message<Self::Message>> {
self.nav_model.activate(id);

let Some(win_id) = self.core.main_window_id() else {
return Task::none();
};

let title = if let Some(page) = self.nav_model.data::<Page>(id) {
format!("{} - {}", page.title(), fl!("app-title"))
} else {
fl!("app-title")
};

Task::batch(vec![self.set_window_title(title, win_id)])
Task::batch(vec![self.set_window_title(title)])
}

fn context_drawer(&self) -> Option<ContextDrawer<Self::Message>> {
Expand Down

0 comments on commit 880c34a

Please sign in to comment.