Installer now with query and remove

icons merged
This commit is contained in:
2025-04-09 08:08:48 +02:00
parent 5302aae807
commit 9f3f0246b4
51 changed files with 166 additions and 119 deletions

View File

@ -25,7 +25,7 @@ wg_tips = Tipi.if_tip(wg_set)
dirname = Path('/tmp/tlecdcwg/')
''' 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year '''
version = 'v. 2.04.0725'
version = 'v. 2.04.0925'
res = GiteaUpdate.api_down('https://git.ilunix.de/api/v1/repos/punix/Wire-Py/releases', version)
@ -90,7 +90,7 @@ class Wirepy(tk.Tk):
self.tk.call('set_theme', 'dark')
''' Load the image file from disk. '''
self.wg_icon = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_vpn.png')
self.wg_icon = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_vpn.png')
''' Set it as the window icon '''
self.iconphoto(True, self.wg_icon)
@ -108,14 +108,14 @@ class FrameWidgets(ttk.Frame):
self.dns = None
self.address = None
self.auto_con = None
self.wg_vpn_start = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_vpn-start.png')
self.wg_vpn_stop = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_vpn-stop.png')
self.imp_pic = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_import.png')
self.tr_pic = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_trash.png')
self.exp_pic = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_export.png')
self.wg_vpn_start = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_vpn-start.png')
self.wg_vpn_stop = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_vpn-stop.png')
self.imp_pic = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_import.png')
self.tr_pic = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_trash.png')
self.exp_pic = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_export.png')
self.warning_pic = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/64/error.png')
self.wg_vpn_start = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_vpn-start.png')
self.wg_vpn_stop = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_vpn-stop.png')
self.wg_vpn_start = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_vpn-start.png')
self.wg_vpn_stop = tk.PhotoImage(file=r'/usr/share/icons/lx-icons/48/wg_vpn-stop.png')
''' Set on or off in file '''
@ -180,8 +180,8 @@ class FrameWidgets(ttk.Frame):
webbrowser.open('https://git.ilunix.de/punix/Wire-Py')
''' img_w, img_i, w_title, w_txt , txt2, com hand over '''
iw = r'/usr/share/icons/wp-icons/48/wg_vpn.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
iw = r'/usr/share/icons/lx-icons/48/wg_vpn.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Info')
msg_t = (_('Wire-Py a simple Wireguard Gui for Linux systems.\n\n'
'Wire-Py is open source software written in Python.\n\n'
@ -310,9 +310,9 @@ class FrameWidgets(ttk.Frame):
command=lambda: GiteaUpdate.download(f'https://git.ilunix.de/punix'
f'/Wire-Py/archive/'
f'{res}.zip', r'/usr/'
r'share/icons/wp-icons'
r'share/icons/lx-icons'
r'/48/wg_vpn.png',
r'/usr/share/icons/wp-icons'
r'/usr/share/icons/lx-icons'
r'/48/wg_msg.png', res))
''' Show active Tunnel '''
@ -527,7 +527,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Select tunnel')
msg_t = _('Please select a tunnel from the list')
msg_window(iw, ii, wt, msg_t)
@ -536,7 +536,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Select tunnel')
msg_t = _('Please first import tunnel')
msg_window(iw, ii, wt, msg_t)
@ -642,7 +642,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Renaming not possible')
msg_t = _('The new name may contain only 12 characters')
msg_window(iw, ii, wt, msg_t)
@ -651,7 +651,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Renaming not possible')
msg_t = _('At least one character must be entered')
msg_window(iw, ii, wt, msg_t)
@ -660,7 +660,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Renaming not possible')
msg_t = _('No valid sign. These must not be used.\nBlank, Slash, Backslash and { }\n')
msg_window(iw, ii, wt, msg_t)
@ -701,7 +701,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Renaming not possible')
msg_t = _('Please select a tunnel from the list')
msg_window(iw, ii, wt, msg_t)
@ -801,7 +801,7 @@ class FrameWidgets(ttk.Frame):
if pre_key in p_key or pre_key + '\n' in p_key:
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/error.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Import Error')
msg_t = _('Tunnel already available!\nPlease use another file for import')
msg_window(iw, ii, wt, msg_t)
@ -925,7 +925,7 @@ class FrameWidgets(ttk.Frame):
if 'PrivateKey = ' and 'Endpoint = ' not in read:
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/error.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Import Error')
msg_t = _('Oh... no valid Wireguard File!\nPlease select a valid Wireguard File')
msg_window(iw, ii, wt, msg_t)
@ -1147,7 +1147,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Select tunnel')
msg_t = _('Please select a tunnel from the list')
msg_window(iw, ii, wt, msg_t)
@ -1156,7 +1156,7 @@ class FrameWidgets(ttk.Frame):
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/lx-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
ii = r'/usr/share/icons/lx-icons/48/wg_msg.png'
wt = _('Select tunnel')
msg_t = _('Please first import tunnel')
msg_window(iw, ii, wt, msg_t)