mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 10:41:03 +02:00
refactor: replace deprecated indexmap method
This commit is contained in:
parent
4934f2c409
commit
f3687c5f9e
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue