Skip to content

Moving UI#8

Open
AylinOez wants to merge 2 commits intorefactoring_teamfrom
moving-ui
Open

Moving UI#8
AylinOez wants to merge 2 commits intorefactoring_teamfrom
moving-ui

Conversation

@AylinOez
Copy link
Collaborator

Moved setup_ui from application.py to ui.py

Split setup_ui into multiple functions:

  • create_language_label
  • create_language_switcher
  • create_imported_languages_label
  • create_server_status_menu_label
  • create_server_status_label
  • create_server_indicator

Added the methods to the init function in application.py

  • self.language_label = self.create_language_label()
  • self.language_switcher = self.create_language_switcher()
  • self.imported_languages_label = self.create_imported_languages_label()
  • self.server_status_menu_label = self.create_server_status_menu_label()
  • self.server_status_label = self.create_server_status_label()
  • self.server_indicator = self.create_server_indicator()

Updated the language_switcher command in application.py
Updated the update_label method in the Application class to use the new UI elements from ui.py

…ons create_language_label, create_language_switcher, create_imported_languages_label, create_server_status_menu_label, create_server_status_label, create_server_indicator
@AylinOez AylinOez assigned AylinOez and odonald and unassigned AylinOez Apr 22, 2024
@AylinOez AylinOez added the enhancement New feature or request label Apr 22, 2024
@odonald
Copy link
Owner

odonald commented Apr 22, 2024

Hi there,
for these changes, please request a pull in to the refactoring_team branch instead of main.
Thx.

@AylinOez AylinOez changed the base branch from main to refactoring_team April 22, 2024 11:06
@odonald
Copy link
Owner

odonald commented Apr 22, 2024

Manually tested changes made,
after import of a language application does not load the lines into frame, also language switcher does not populate with chosen languages:

Error given:

line 220, in import_additional_translation
    self.imported_languages_label.configure(text="Imported Languages: \n " + ", ".join(self.additional_languages.keys()))
AttributeError: 'list' object has no attribute 'configure'

Beyond that, there are more errors shown, which you can ignore at this moment:

  File "/Users/ugn/.pyenv/versions/3.9.17/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/Users/ugn/.pyenv/versions/3.9.17/lib/python3.9/site-packages/customtkinter/windows/widgets/ctk_button.py", line 554, in _clicked
    self._command()
  File "/Users/ugn/Documents/code/playground/Opera-Access/logic/application.py", line 213, in import_additional_language
    self.root.wait_window(dialog.top)
AttributeError: 'ImportLanguageDialog' object has no attribute 'top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants