add new modul MessageDialog and replace old message dialog
This commit is contained in:
22
gitea.py
22
gitea.py
@@ -6,6 +6,7 @@ from pathlib import Path
|
||||
import subprocess
|
||||
import shutil
|
||||
from shared_libs.common_tools import LxTools
|
||||
from shared_libs.message import MessageDialog
|
||||
|
||||
|
||||
class GiteaUpdate:
|
||||
@@ -72,29 +73,18 @@ class GiteaUpdate:
|
||||
if result == 0:
|
||||
shutil.chown(f"{Path.home()}/{res}.zip", 1000, 1000)
|
||||
|
||||
LxTools.msg_window(
|
||||
AppConfig.IMAGE_PATHS["icon_info"],
|
||||
AppConfig.IMAGE_PATHS["icon_download"],
|
||||
Msg.STR["title"],
|
||||
Msg.STR["ok_message"],
|
||||
)
|
||||
MessageDialog("info", text=Msg.STR["ok_message"])
|
||||
|
||||
else:
|
||||
|
||||
LxTools.msg_window(
|
||||
AppConfig.IMAGE_PATHS["icon_error"],
|
||||
AppConfig.IMAGE_PATHS["icon_download_error"],
|
||||
Msg.STR["error_title"],
|
||||
Msg.STR["error_massage"],
|
||||
MessageDialog(
|
||||
"error", text=Msg.STR["error_message"], title=Msg.STR["error_title"]
|
||||
)
|
||||
|
||||
except subprocess.CalledProcessError:
|
||||
|
||||
LxTools.msg_window(
|
||||
AppConfig.IMAGE_PATHS["icon_error"],
|
||||
AppConfig.IMAGE_PATHS["icon_msg"],
|
||||
Msg.STR["error_title"],
|
||||
Msg.STR["error_no_internet"],
|
||||
MessageDialog(
|
||||
"error", text=Msg.STR["error_no_internet"], title=Msg.STR["error_title"]
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user