From 09dbb1fd4d86cdf99f66552216798e975d58b81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1=C4=8Dek?= Date: Tue, 10 Jan 2023 20:16:26 +0100 Subject: [PATCH] Button tooltips --- main.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d8a49da..aa0af1b 100644 --- a/main.py +++ b/main.py @@ -15,9 +15,10 @@ import configparser from pandastable import Table import pathlib import cnb_exchange_rate +from tktooltip import ToolTip -ver = "0.4.7" +ver = "0.4.9" outvar = {} @@ -287,12 +288,24 @@ def pairBis(): textid = completepairing[MSISDN]['textid'] UNIT = completepairing[MSISDN]['UNIT'] mu_id = completepairing[MSISDN]['mu_id'] + # catch mu_id inconsistencies + if mu_id == "N/A": + mu_id = "N/A" + elif mu_id == "0": + mu_id = "N/A" + elif mu_id == "1": + mu_id = "N/A" + elif mu_id == "": + mu_id = "N/A" + print(amount) if currency == "EUR": amount = float(amount.replace(",", "." )) amountczk = float(amount) * float(rate) amountczk = round(amountczk, 2) + amountczk = str(amountczk).replace(".", "," ) + amount = str(amount).replace(".", "," ) else: amountczk = amount @@ -913,10 +926,17 @@ b4 = tk.Button(root, text="Download pairing file", pairbis = tk.Button(root, text="Pair BIS data", command=lambda: pairBis(), width=20) +ToolTip(pairbis,'This merges the Ferengi merged file with BIS merged file', delay=2.0) + +ToolTip(b3,'Merges all output files together after billing', delay=2.0) +ToolTip(b2,'This uses all modules for operators to obtain 4 output files', delay=2.0) +ToolTip(b1,'Checks all needed files', delay=2.0) +ToolTip(b4,'Downloads latest pairing.csv help file', delay=2.0) buttonnewwindow = tk.Button(root, text ="Show results", command = buttonnewwindow, width=20) +ToolTip(buttonnewwindow,'Just a simple overview', delay=2.0) # Everything to grid tmgdpssection.place(x=10, y=10)