Docs: Update MenuBar docstrings and remove unused comments
- Updated docstrings for __init__ and update_ui_for_update to reflect recent changes in arguments and logic, improving code documentation. - Removed an unused commented-out line in the __init__ method signature.
This commit is contained in:
@@ -24,7 +24,6 @@ class MenuBar(ttk.Frame):
|
||||
def __init__(
|
||||
self,
|
||||
container: ttk.Frame,
|
||||
# Should have a .get_icon(str) -> PhotoImage method
|
||||
image_manager: 'Any',
|
||||
tooltip_state: 'BooleanVar',
|
||||
on_theme_toggle: 'Callable[[], None]',
|
||||
@@ -39,14 +38,14 @@ class MenuBar(ttk.Frame):
|
||||
"""
|
||||
Initializes the MenuBar.
|
||||
|
||||
Args:
|
||||
Args:
|
||||
container: The parent widget.
|
||||
image_manager: An object with a `get_icon` method to retrieve icons.
|
||||
tooltip_state: A tkinter BooleanVar to control tooltip visibility.
|
||||
on_theme_toggle: Callback function to toggle the application's theme.
|
||||
toggle_log_window: Callback function to show/hide the log window.
|
||||
app_version: The current version string of the application.
|
||||
msg_config: Project-specific messages. Must have STR and TTIP dicts.
|
||||
msg_config: Project-specific messages and tooltips. Must have STR and TTIP dicts.
|
||||
about_icon_path: Filesystem path to the icon for the 'About' dialog.
|
||||
about_url: URL for the project's repository or website.
|
||||
gitea_api_url: The Gitea API URL for update checks.
|
||||
@@ -215,6 +214,7 @@ class MenuBar(ttk.Frame):
|
||||
new_version: The new version string if an update is available,
|
||||
"DISABLED" if updates are off, "ERROR" if an error occurred,
|
||||
or None if no update is available.
|
||||
This string also serves as the update status.
|
||||
"""
|
||||
self.update_status = new_version
|
||||
self.animated_icon_frame.grid_remove()
|
||||
|
Reference in New Issue
Block a user