fix: open-dialog example
This commit is contained in:
parent
1c1840a7c2
commit
684d33115c
2 changed files with 3 additions and 5 deletions
|
|
@ -16,6 +16,6 @@ tracing-subscriber = "0.3.17"
|
|||
url = "2.4.0"
|
||||
|
||||
[dependencies.libcosmic]
|
||||
features = ["debug", "winit", "multi-window", "wayland", "tokio"]
|
||||
path = "../../"
|
||||
default-features = false
|
||||
features = ["debug", "wayland", "tokio"]
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ impl cosmic::Application for App {
|
|||
|
||||
/// Creates the application, and optionally emits command on initialize.
|
||||
fn init(core: Core, _input: Self::Flags) -> (Self, Task<Self::Message>) {
|
||||
let id = core.main_window_id().unwrap();
|
||||
let mut app = App {
|
||||
core,
|
||||
file_contents: String::new(),
|
||||
|
|
@ -75,10 +76,7 @@ impl cosmic::Application for App {
|
|||
};
|
||||
|
||||
app.set_header_title("Open a file".into());
|
||||
let cmd = app.set_window_title(
|
||||
"COSMIC OpenDialog Demo".into(),
|
||||
self.core.main_window_id().unwrap(),
|
||||
);
|
||||
let cmd = app.set_window_title("COSMIC OpenDialog Demo".into(), id);
|
||||
|
||||
(app, cmd)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue