encryptare + adaugare de imagini

This commit is contained in:
andrei-mihnea-cerbu
2024-01-19 04:05:05 +02:00
parent 67b7a241d7
commit 2d4cca0e80
11 changed files with 167 additions and 48 deletions
+5 -5
View File
@@ -26,11 +26,11 @@ class MainPageView(tk.Frame):
def create_widgets(self):
"""Takes care of the creation of the UI"""
# Create a main frame to center the user frame and button frame
main_frame = tk.Frame(self.master)
main_frame.pack(expand=True)
self.main_frame = tk.Frame(self)
self.main_frame.pack(expand=True)
# Create a frame to hold the user frames
user_frame_container = tk.Frame(main_frame)
user_frame_container = tk.Frame(self.main_frame)
user_frame_container.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
users_data = self.get_user_list()
@@ -49,7 +49,7 @@ class MainPageView(tk.Frame):
user_frame_instance.grid(row=row, column=column, padx=10, pady=10)
# Create a frame to hold the buttons
button_frame = tk.Frame(main_frame)
button_frame = tk.Frame(self.main_frame)
button_frame.pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)
# Create buttons in the button frame
@@ -64,7 +64,7 @@ class MainPageView(tk.Frame):
def open_chat(self, user_data):
"""Opens a chat in a different window"""
# Pass both the clicked user data and the current logged user info to ChatWindow
chat_window = ChatWindow(self, user_data, self.master.current_logged_user)
chat_window = ChatWindow(self, self.master.encryptor, user_data, self.master.current_logged_user)
chat_window.mainloop() # Main loop for the new window
def get_user_list(self):