1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 18:51:04 +02:00

refactor: replace deprecated indexmap method

This commit is contained in:
Jake Stanger 2024-02-02 20:05:29 +00:00
parent 4934f2c409
commit f3687c5f9e
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@ impl Item {
} }
pub fn unmerge_toplevel(&mut self, info: &ToplevelInfo) { pub fn unmerge_toplevel(&mut self, info: &ToplevelInfo) {
self.windows.remove(&info.id); self.windows.shift_remove(&info.id);
self.recalculate_open_state(); self.recalculate_open_state();
} }

View file

@ -204,7 +204,7 @@ impl Module<gtk::Box> for LauncherModule {
item.unmerge_toplevel(&info); item.unmerge_toplevel(&info);
if item.windows.is_empty() { if item.windows.is_empty() {
items.remove(&info.app_id); items.shift_remove(&info.app_id);
Some(ItemOrWindowId::Item) Some(ItemOrWindowId::Item)
} else { } else {
Some(ItemOrWindowId::Window) Some(ItemOrWindowId::Window)
@ -364,7 +364,7 @@ impl Module<gtk::Box> for LauncherModule {
} }
} else { } else {
container.remove(&button.button); container.remove(&button.button);
buttons.remove(&app_id); buttons.shift_remove(&app_id);
} }
} }
} }
@ -483,7 +483,7 @@ impl Module<gtk::Box> for LauncherModule {
debug!("Removing window from popup for '{app_id}': {win_id}"); debug!("Removing window from popup for '{app_id}': {win_id}");
if let Some(buttons) = buttons.get_mut(&app_id) { if let Some(buttons) = buttons.get_mut(&app_id) {
buttons.remove(&win_id); buttons.shift_remove(&win_id);
} }
} }
LauncherUpdate::Title(app_id, win_id, title) => { LauncherUpdate::Title(app_id, win_id, title) => {