Skip to content

Commit

Permalink
add a button to generate changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 committed Dec 7, 2024
1 parent 4b353d1 commit f3fdb58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/gtnh/gui/modpack/button_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def __init__(
client_modrinth: Callable[[], Task[None]],
client_technic: Callable[[], Task[None]],
update_all: Callable[[], Task[None]],
update_beta: Callable[[], Task[None]]
update_beta: Callable[[], Task[None]],
generate_changelog: Callable[[], Task[None]],
) -> None:
self.update_assets: Callable[[], Task[None]] = update_asset
self.generate_nightly: Callable[[], Task[None]] = generate_nightly
Expand All @@ -36,6 +37,7 @@ def __init__(
self.client_technic: Callable[[], Task[None]] = client_technic
self.all: Callable[[], Task[None]] = update_all
self.beta: Callable[[], Task[None]] = update_beta
self.generate_changelog: Callable[[], Task[None]] = generate_changelog


class ButtonArray(LabelFrame, TtkLabelFrame): # type: ignore
Expand Down Expand Up @@ -116,6 +118,9 @@ def __init__(
self.btn_server_zip_j9: CustomButton = CustomButton(
self.frame_btn, text="Java 9+ server archive", command=callbacks.server_zip_j9, themed=self.themed
)
self.btn_generate_changelog: CustomButton = CustomButton(
self.frame_btn, text="Generate changelog", command=callbacks.generate_changelog, themed=self.themed
)

progress_bar_length: int = 500

Expand All @@ -137,6 +142,7 @@ def __init__(
self.btn_update_nightly,
self.btn_generate_beta,
self.btn_generate_all,
self.btn_generate_changelog,
self.btn_client_zip,
self.btn_server_zip,
self.btn_server_zip_j9,
Expand Down Expand Up @@ -191,6 +197,7 @@ def show(self) -> None:
self.btn_generate_beta.grid(row=1, column=0)
self.btn_update_nightly.grid(row=2, column=0)
self.btn_update_assets.grid(row=3, column=0)
self.btn_generate_changelog.grid(row=4, column=0)

# column 1: client we control
self.btn_client_zip.grid(row=0, column=1)
Expand Down

0 comments on commit f3fdb58

Please sign in to comment.