From 7785e0444fa64e1b4f0f0cc38597cf7d07652de9 Mon Sep 17 00:00:00 2001 From: Richard Horton Date: Wed, 22 Nov 2017 12:50:50 +0000 Subject: [PATCH] Altered link detection --- Client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client.py b/Client.py index 576e7bd..c4911e2 100644 --- a/Client.py +++ b/Client.py @@ -33,7 +33,7 @@ def receiveMessage(i): #Richard message = thisSocket.recv(1024).decode() continue - if "https://" in message: + if "https://" in message or "http://" in message: searchLink = message hyperlinkObj = tkHLM.HyperlinkManager(chatHistory) @@ -87,7 +87,7 @@ i = 0 #Counter used later to prevent the global variable username being reset #GUI Start window = tk.Tk() #Creates the main window for the interface window.title("Chatbot Jeff") -window.geometry("600x600") +window.geometry("600x550") window.configure(background="cornflower blue") lblTitle = tk.Label(window, text="CHATBOT JEFF", bg="cornflower blue", font=("Helvetica", 24)) #Main title for the chatbot GUI @@ -103,7 +103,7 @@ chatHistory.configure(state="disabled") #Prevents the user from typing directly userInputFrame = tk.Frame(window) #Creates a frame to hold the widgets related to user input userInputFrame.configure(background="cornflower blue") -userInput = tk.Entry(userInputFrame, width=80) #Adds a text entry widget to the frame +userInput = tk.Entry(userInputFrame, width=75) #Adds a text entry widget to the frame userInput.grid(row=0, column=0, ipady=3, padx=2) userInput.bind("", sendMessage) #Binds the return key to the widget so that it calls the sendMessage function when the key is pressed