Skip to content

Commit

Permalink
rename messages that open windows
Browse files Browse the repository at this point in the history
  • Loading branch information
justDeeevin committed Mar 26, 2024
1 parent 286fd28 commit 0c696e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/nuhxboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ pub enum Message {
Listener(listener::Event),
ReleaseScroll(u32),
LoadStyle(usize),
OpenLoadKeyboardWindow,
OpenSettingsWindow,
OpenLoadKeyboard,
OpenSettings,
WindowClosed(window::Id),
ChangeKeyboardCategory(String),
LoadKeyboard(usize),
Expand Down Expand Up @@ -448,7 +448,7 @@ impl Application for NuhxBoard {
}
}
}
Message::OpenSettingsWindow => {
Message::OpenSettings => {
let (id, command) = window::spawn(window::Settings {
resizable: false,
size: iced::Size {
Expand All @@ -460,7 +460,7 @@ impl Application for NuhxBoard {
self.settings_window_id = Some(id);
return command;
}
Message::OpenLoadKeyboardWindow => {
Message::OpenLoadKeyboard => {
let path = self.keyboards_path.clone();
let (id, command) = window::spawn::<Message>(window::Settings {
resizable: false,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ impl NuhxBoard {
let context_menu = ContextMenu::new(canvas, || {
let load_keyboard_window_message = match self.load_keyboard_window_id {
Some(_) => None,
None => Some(Message::OpenLoadKeyboardWindow),
None => Some(Message::OpenLoadKeyboard),
};

let settings_window_message = match self.settings_window_id {
Some(_) => None,
None => Some(Message::OpenSettingsWindow),
None => Some(Message::OpenSettings),
};

let toggle_button_label = match self.edit_mode {
Expand Down

0 comments on commit 0c696e7

Please sign in to comment.