fix update icon path now direkt coded
This commit is contained in:
@ -6,6 +6,12 @@ Changelog for shared_libs
|
|||||||
bevore delete logfile.
|
bevore delete logfile.
|
||||||
|
|
||||||
|
|
||||||
|
### Added
|
||||||
|
09.07.2025
|
||||||
|
|
||||||
|
- fix new icon for install Update
|
||||||
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
29.06.2025
|
29.06.2025
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class AppConfig:
|
|||||||
|
|
||||||
# Updates
|
# Updates
|
||||||
# 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year
|
# 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year
|
||||||
VERSION: str = "v. 1.06.2925"
|
VERSION: str = "v. 1.07.0925"
|
||||||
UPDATE_URL: str = "https://git.ilunix.de/api/v1/repos/punix/shared_libs/releases"
|
UPDATE_URL: str = "https://git.ilunix.de/api/v1/repos/punix/shared_libs/releases"
|
||||||
DOWNLOAD_URL: str = "https://git.ilunix.de/punix/shared_libs/archive"
|
DOWNLOAD_URL: str = "https://git.ilunix.de/punix/shared_libs/archive"
|
||||||
|
|
||||||
@ -64,14 +64,6 @@ class AppConfig:
|
|||||||
"resizable_window": (True, True),
|
"resizable_window": (True, True),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Images and icons paths
|
|
||||||
IMAGE_PATHS: Dict[str, Path] = {
|
|
||||||
"icon_info": "/usr/share/icons/lx-icons/64/info.png",
|
|
||||||
"icon_error": "/usr/share/icons/lx-icons/64/error.png",
|
|
||||||
"icon_log": "/usr/share/icons/lx-icons/48/log.png",
|
|
||||||
"update": "/home/punix/Bilder/lx-icons/16/settings.png",
|
|
||||||
}
|
|
||||||
|
|
||||||
# System-dependent paths
|
# System-dependent paths
|
||||||
SYSTEM_PATHS: Dict[str, Path] = {
|
SYSTEM_PATHS: Dict[str, Path] = {
|
||||||
"tcl_path": "/usr/share/TK-Themes",
|
"tcl_path": "/usr/share/TK-Themes",
|
||||||
|
12
logviewer.py
12
logviewer.py
@ -4,6 +4,7 @@ import logging
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import TclError, filedialog, ttk
|
from tkinter import TclError, filedialog, ttk
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import subprocess
|
import subprocess
|
||||||
from functools import partial
|
from functools import partial
|
||||||
@ -45,11 +46,11 @@ class LogViewer(tk.Tk):
|
|||||||
theme = ConfigManager.get("theme")
|
theme = ConfigManager.get("theme")
|
||||||
ThemeManager.change_theme(self, theme)
|
ThemeManager.change_theme(self, theme)
|
||||||
LxTools.center_window_cross_platform(self, self.x_width, self.y_height)
|
LxTools.center_window_cross_platform(self, self.x_width, self.y_height)
|
||||||
self.createWidgets(_)
|
self.createWidgets(modul_name, _)
|
||||||
self.load_file(_, modul_name=modul_name)
|
self.load_file(_, modul_name=modul_name)
|
||||||
self.log_icon = tk.PhotoImage(file=modul_name.AppConfig.IMAGE_PATHS["icon_log"])
|
self.log_icon = tk.PhotoImage(file="/usr/share/icons/lx-icons/48/log.png")
|
||||||
self.update_icon = tk.PhotoImage(
|
self.update_icon = tk.PhotoImage(
|
||||||
file=modul_name.AppConfig.IMAGE_PATHS["update"]
|
file="/usr/share/icons/lx-icons/16/settings.png"
|
||||||
)
|
)
|
||||||
self.iconphoto(True, self.log_icon)
|
self.iconphoto(True, self.log_icon)
|
||||||
self.grid_rowconfigure(0, weight=1)
|
self.grid_rowconfigure(0, weight=1)
|
||||||
@ -170,6 +171,9 @@ class LogViewer(tk.Tk):
|
|||||||
|
|
||||||
def updater(self):
|
def updater(self):
|
||||||
"""Start the lxtools_installer"""
|
"""Start the lxtools_installer"""
|
||||||
|
tmp_dir = Path("/tmp/lxtools")
|
||||||
|
Path.mkdir(tmp_dir, exist_ok=True)
|
||||||
|
os.chdir(tmp_dir)
|
||||||
result = subprocess.run(["/usr/local/bin/lxtools_installer"], check=False)
|
result = subprocess.run(["/usr/local/bin/lxtools_installer"], check=False)
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
MessageDialog("error", result.stderr)
|
MessageDialog("error", result.stderr)
|
||||||
@ -332,7 +336,7 @@ class LogViewer(tk.Tk):
|
|||||||
# Update Menulfield
|
# Update Menulfield
|
||||||
self.settings.entryconfigure(2, label=self.theme_label.get())
|
self.settings.entryconfigure(2, label=self.theme_label.get())
|
||||||
|
|
||||||
def createWidgets(self, _):
|
def createWidgets(self, modul_name, _):
|
||||||
|
|
||||||
text_frame = ttk.Frame(self)
|
text_frame = ttk.Frame(self)
|
||||||
text_frame.grid(row=1, column=0, padx=5, pady=5, sticky=tk.NSEW)
|
text_frame.grid(row=1, column=0, padx=5, pady=5, sticky=tk.NSEW)
|
||||||
|
Reference in New Issue
Block a user