tooltip message complete with AppConfig Manager
This commit is contained in:
parent
42870e2942
commit
742c6d0cc5
Binary file not shown.
26
wirepy.py
26
wirepy.py
@ -123,7 +123,7 @@ class FrameWidgets(ttk.Frame):
|
||||
self.options_btn = ttk.Menubutton(self.menu_frame, text=_("Options"))
|
||||
self.options_btn.grid(column=1, columnspan=1, row=0)
|
||||
|
||||
Tooltip(self.options_btn, _("Click for Settings"), self.tooltip_state)
|
||||
Tooltip(self.options_btn, Msg.TTIP["settings"], self.tooltip_state)
|
||||
|
||||
self.set_update = tk.IntVar()
|
||||
self.settings = tk.Menu(self, relief="flat")
|
||||
@ -233,7 +233,7 @@ class FrameWidgets(ttk.Frame):
|
||||
self.btn_i = ttk.Button(self.lb_frame_btn_lbox, image=self.imp_pic, command=self.import_sl, padding=0)
|
||||
self.btn_i.grid(column=0, row=1, padx=15, pady=8)
|
||||
|
||||
Tooltip(self.btn_i, _("Click to import a Wireguard Tunnel"), self.tooltip_state)
|
||||
Tooltip(self.btn_i, Msg.TTIP["import_tl"], self.tooltip_state)
|
||||
|
||||
# Button Trash
|
||||
self.btn_tr = ttk.Button(self.lb_frame_btn_lbox, image=self.tr_pic, command=self.delete, padding=0,
|
||||
@ -241,9 +241,9 @@ class FrameWidgets(ttk.Frame):
|
||||
self.btn_tr.grid(column=0, row=2, padx=15, pady=8)
|
||||
|
||||
if self.l_box.size() == 0:
|
||||
Tooltip(self.btn_tr, _("No tunnels to delete in the list"), self.tooltip_state)
|
||||
Tooltip(self.btn_tr, Msg.TTIP["trash_tl_info"], self.tooltip_state)
|
||||
else:
|
||||
Tooltip(self.btn_tr, _("Click to delete a Wireguard Tunnel\nSelect from the list!"), self.tooltip_state)
|
||||
Tooltip(self.btn_tr, Msg.TTIP["trash_tl"], self.tooltip_state)
|
||||
|
||||
# Button Export
|
||||
self.btn_exp = ttk.Button(self.lb_frame_btn_lbox, image=self.exp_pic,
|
||||
@ -255,9 +255,9 @@ class FrameWidgets(ttk.Frame):
|
||||
self.btn_exp.grid(column=0, row=3, padx=15, pady=8)
|
||||
|
||||
if self.l_box.size() == 0:
|
||||
Tooltip(self.btn_exp, _("No Tunnels in List for Export"), self.tooltip_state)
|
||||
Tooltip(self.btn_exp, Msg.TTIP["export_tl_info"], self.tooltip_state)
|
||||
else:
|
||||
Tooltip(self.btn_exp, _("Click to export all\nWireguard Tunnel to Zipfile"), self.tooltip_state)
|
||||
Tooltip(self.btn_exp, Msg.TTIP["export_tl"], self.tooltip_state)
|
||||
|
||||
# Label Entry
|
||||
self.lb_rename = ttk.Entry(self.lb_frame4, width=20)
|
||||
@ -266,9 +266,9 @@ class FrameWidgets(ttk.Frame):
|
||||
self.lb_rename.config(state="disable")
|
||||
|
||||
if self.l_box.size() != 0:
|
||||
Tooltip(self.lb_rename, _("To rename a tunnel, you need to\nselect a tunnel from the list"), self.tooltip_state)
|
||||
Tooltip(self.lb_rename, Msg.TTIP["rename_tl"], self.tooltip_state)
|
||||
else:
|
||||
Tooltip(self.lb_rename, _("To rename a tunnel, at least one must be in the list"), self.tooltip_state)
|
||||
Tooltip(self.lb_rename, Msg.TTIP["rename_tl_info"], self.tooltip_state)
|
||||
|
||||
# Button Rename
|
||||
self.btn_rename = ttk.Button(self.lb_frame4, text=_("Rename"), state="disable", command=self.tl_rename,
|
||||
@ -346,7 +346,7 @@ class FrameWidgets(ttk.Frame):
|
||||
# Create the update button
|
||||
self.update_btn = ttk.Menubutton(self.menu_frame, text=update_text)
|
||||
self.update_btn.grid(column=4, columnspan=3, row=0, padx=0)
|
||||
Tooltip(self.update_btn, _("Click to download new version"), self.tooltip_state)
|
||||
Tooltip(self.update_btn, Msg.TTIP["download"], self.tooltip_state)
|
||||
|
||||
self.download = tk.Menu(self, relief="flat")
|
||||
self.update_btn.configure(menu=self.download, style="Toolbutton")
|
||||
@ -644,12 +644,12 @@ class FrameWidgets(ttk.Frame):
|
||||
if self.l_box.size() == 0:
|
||||
self.wg_autostart.configure(state="disabled")
|
||||
self.lb_rename.configure(state="disabled")
|
||||
Tooltip(self.wg_autostart, _("You must have at least one\ntunnel in the list,to use the autostart")
|
||||
Tooltip(self.wg_autostart, Msg.TTIP["autostart_info"]
|
||||
, self.tooltip_state)
|
||||
|
||||
Tooltip(self.btn_exp, _("No Tunnels in List for Export"), self.tooltip_state)
|
||||
Tooltip(self.btn_stst, _("No tunnels to start in the list"), self.tooltip_state)
|
||||
Tooltip(self.lb_rename, _("To rename a tunnel, at least one must be in the list"), self.tooltip_state)
|
||||
Tooltip(self.btn_exp, Msg.TTIP["export_tl_info"], self.tooltip_state)
|
||||
Tooltip(self.btn_stst, Msg.TTIP["empty_list"], self.tooltip_state)
|
||||
Tooltip(self.lb_rename, Msg.TTIP["rename_tl_info"], self.tooltip_state)
|
||||
self.lb_rename.insert(0, _("Max. 12 characters!"))
|
||||
|
||||
if self.a != "" and self.a == select_tl:
|
||||
|
@ -158,6 +158,8 @@ class Msg:
|
||||
}
|
||||
TTIP: Dict[str, str] = {
|
||||
#Strings for Tooltips
|
||||
"settings": _("Click for Settings"),
|
||||
"import_tl": _("Click to import a Wireguard Tunnel"),
|
||||
"start_tl": _("Click to start selected Wireguard Tunnel"),
|
||||
"empty_list": _("No tunnels to start in the list"),
|
||||
"stop_tl": _("Click to stop selected Wireguard Tunnel"),
|
||||
@ -171,7 +173,8 @@ class Msg:
|
||||
"start_tl_info": _("Click to start selected Wireguard Tunnel"),
|
||||
"rename_tl_info": _("To rename a tunnel, at least one must be in the list"),
|
||||
"trash_tl_info": _("No tunnels to delete in the list"),
|
||||
"list_auto_info": _("To use the autostart, a tunnel must be selected from the list")
|
||||
"list_auto_info": _("To use the autostart, a tunnel must be selected from the list"),
|
||||
"download": _("Click to download new version")
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user