Skip to content

Commit

Permalink
fix: add alternative for FlowBox.remove_all()
Browse files Browse the repository at this point in the history
  • Loading branch information
dynobo committed Feb 12, 2024
1 parent d50a95d commit 462f36e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.4.2 (2024-02-13)

- Fix missing method in GTK 4.6.

## v0.4.1 (2024-02-04)

- Fix `No module named 'toml'`.
Expand Down
Empty file removed keyhint/config/__init__.py
Empty file.
Empty file removed keyhint/resources/__init__.py
Empty file.
7 changes: 6 additions & 1 deletion keyhint/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,12 @@ def create_column_view(
return column_view

def populate_sheet_container(self) -> None:
self.sheet_container_box.remove_all()
if hasattr(self.sheet_container_box, "remove_all") and False:
# Only available in GTK 4.12+
self.sheet_container_box.remove_all()
else:
while child := self.sheet_container_box.get_first_child():
self.sheet_container_box.remove(child)

sheet_id = self.sheet_drop_down.get_selected_item().get_string()
sheet = self.get_sheet_by_id(sheet_id)
Expand Down

0 comments on commit 462f36e

Please sign in to comment.