diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 08b14b8..210c0df 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,12 @@
-
+
+
+
+
+
+
@@ -453,7 +458,15 @@
1726777434040
-
+
+
+ 1726836930251
+
+
+
+ 1726836930251
+
+
@@ -494,7 +507,6 @@
-
@@ -519,6 +531,7 @@
-
+
+
\ No newline at end of file
diff --git a/wg_func.py b/wg_func.py
index eb341bf..bdbef79 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -3,7 +3,7 @@ import os
import shutil
import zipfile
from datetime import datetime
-from tkinter import filedialog, messagebox
+from tkinter import filedialog
import tkinter as tk
from pathlib import Path
from subprocess import check_call
@@ -38,6 +38,56 @@ def msg_window():
msg.winfo_toplevel()
+def msg_exp_successful_window():
+ msg = tk.Toplevel()
+ msg.resizable(width=False, height=False)
+ msg.x_width = 340
+ msg.y_height = 140
+ msg.title('Import error!')
+ msg.monitor_center_x = msg.winfo_screenwidth() / 2 - (msg.x_width / 2)
+ msg.monitor_center_y = msg.winfo_screenheight() / 2 - (msg.y_height / 2)
+ msg.geometry('%dx%d+%d+%d' % (msg.x_width, msg.y_height, msg.monitor_center_x, msg.monitor_center_y))
+ msg.columnconfigure(0, weight=1)
+ msg.configure(pady=20)
+ msg.warning = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/64/info.png')
+ msg.i_warning = tk.Label(msg, image=msg.warning)
+ msg.i_warning.grid(column=0, row=0)
+ label = tk.Label(msg, text='Your zip file is in home directory')
+ label.config(font=('Ubuntu', 11), padx=15, pady=15)
+ label.grid(column=1, row=0)
+ button = tk.Button(msg, text='OK', command=msg.destroy)
+ button.config(padx=15, pady=5)
+ button.grid(column=0, columnspan=2, row=1)
+ wg_icon_2 = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_vpn.png')
+ msg.iconphoto(True, wg_icon_2)
+ msg.winfo_toplevel()
+
+
+def msg_exp_fail_window():
+ msg = tk.Toplevel()
+ msg.resizable(width=False, height=False)
+ msg.x_width = 340
+ msg.y_height = 140
+ msg.title('Export error!')
+ msg.monitor_center_x = msg.winfo_screenwidth() / 2 - (msg.x_width / 2)
+ msg.monitor_center_y = msg.winfo_screenheight() / 2 - (msg.y_height / 2)
+ msg.geometry('%dx%d+%d+%d' % (msg.x_width, msg.y_height, msg.monitor_center_x, msg.monitor_center_y))
+ msg.columnconfigure(0, weight=1)
+ msg.configure(pady=20)
+ msg.warning = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/64/error.png')
+ msg.i_warning = tk.Label(msg, image=msg.warning)
+ msg.i_warning.grid(column=0, row=0)
+ label = tk.Label(msg, text='Export failed! Please try again')
+ label.config(font=('Ubuntu', 11), padx=15, pady=15)
+ label.grid(column=1, row=0)
+ button = tk.Button(msg, text='OK', command=msg.destroy)
+ button.config(padx=15, pady=5)
+ button.grid(column=0, columnspan=2, row=1)
+ wg_icon_2 = tk.PhotoImage(file=r'/usr/share/icons/wp-icons/48/wg_msg.png')
+ msg.iconphoto(True, wg_icon_2)
+ msg.winfo_toplevel()
+
+
class GreenLabel:
def __init__(self):
self.StrVar = None
@@ -306,9 +356,8 @@ class ExportTunnels:
shutil.make_archive(wg_tar, 'zip', p_to_conf)
with zipfile.ZipFile((wg_tar + '.zip'), 'r') as zf:
if len(zf.namelist()) != 0:
- messagebox.showinfo('Wire_py Export', 'Tarfile is in your Homedirectory')
+ msg_exp_successful_window()
else:
- messagebox.showerror('Wire_py Export', 'Tarfile is failed please resume Export')
+ msg_exp_fail_window()
except TypeError:
pass
-
diff --git a/wp-icons/128/info.png b/wp-icons/128/info.png
new file mode 100644
index 0000000..85cc8a9
Binary files /dev/null and b/wp-icons/128/info.png differ
diff --git a/wp-icons/256/info.png b/wp-icons/256/info.png
new file mode 100644
index 0000000..8d9037b
Binary files /dev/null and b/wp-icons/256/info.png differ
diff --git a/wp-icons/32/info.png b/wp-icons/32/info.png
new file mode 100644
index 0000000..0625334
Binary files /dev/null and b/wp-icons/32/info.png differ
diff --git a/wp-icons/48/info.png b/wp-icons/48/info.png
new file mode 100644
index 0000000..c8ce870
Binary files /dev/null and b/wp-icons/48/info.png differ
diff --git a/wp-icons/64/info.png b/wp-icons/64/info.png
new file mode 100644
index 0000000..cc9baa1
Binary files /dev/null and b/wp-icons/64/info.png differ