Skip to content

Commit

Permalink
changed to python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTheCoder committed Apr 14, 2023
1 parent 3c88390 commit 81e20e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .idea/Passwordsy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions code/password_generation/diceware_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import password_generation.diceware_logic as logic

global clear_btn_image
global checkboxes_text
global widget_text_dict
widget_text_dict = {}
Expand Down Expand Up @@ -48,8 +47,7 @@ def __init__(self, master, **kwargs):

self.password_state = 'shown'

global checkboxes_text
checkboxes_text = {}
self.checkboxes_text = {}

# Give a weight to rows 0 to 15
i = 0
Expand Down Expand Up @@ -111,8 +109,8 @@ def clear_window():
widget.destroy()

self.output_widgets = []
global checkboxes_text
checkboxes_text = {}
self.checkboxes_text
self.checkboxes_text = {}

self.password_state = 'shown'
self.hide_show_button.configure(text=self.shown_passwords_text, command=hide_passwords)
Expand Down Expand Up @@ -151,8 +149,6 @@ def display_words(pair):
pair: dict
Contains the pairs of dice roll numbers and related words according to the dice ware wordlist.
"""
global checkboxes_text

text_height = 1
text_padx = 10

Expand Down Expand Up @@ -185,7 +181,7 @@ def display_words(pair):
self.checkbox.grid(row=3 + 2 * ((self.number_of_dicerolls - 1) // 5), column=column_to_be_placed_in + 1,
sticky='w')
self.output_widgets.append(self.checkbox)
checkboxes_text[self.word_widget.get('1.0', 'end')] = self.checkbox
self.checkboxes_text[self.word_widget.get('1.0', 'end')] = self.checkbox
if self.password_state == 'hidden':
hide_passwords()
else:
Expand All @@ -199,7 +195,7 @@ def display_words(pair):
border_color=self.button_border_colour, text='COPY SELECTIONS',
font=self.button_font, fg_color=self.button_fg_color,
hover_color=self.button_hover_color,
command=lambda: logic.copy_selections(checkboxes_text))
command=lambda: logic.copy_selections(self.checkboxes_text))
self.copy_button.grid(row=16, column=0, columnspan=self.button_columnspan, pady=10, sticky='n')

def show_passwords() -> None:
Expand Down

0 comments on commit 81e20e2

Please sign in to comment.