10 Commits

5 changed files with 18 additions and 11 deletions

View File

@ -6,6 +6,12 @@ Changelog for shared_libs
bevore delete logfile.
### Added
09.07.2025
- fix new icon for install Update
### Added
29.06.2025

View File

@ -67,7 +67,7 @@ class GiteaUpdate:
"""
try:
to_down: str = f"wget -qP {Path.home()} {" "} {urld}"
to_down: str = f"wget -qP {Path.home()} {' '} {urld}"
result: int = subprocess.call(to_down, shell=True)
if result == 0:
shutil.chown(f"{Path.home()}/{res}.zip", 1000, 1000)

Binary file not shown.

View File

@ -51,14 +51,14 @@ class AppConfig:
# Updates
# 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"
DOWNLOAD_URL: str = "https://git.ilunix.de/punix/shared_libs/archive"
# UI configuration
UI_CONFIG: Dict[str, Any] = {
"window_title2": "LogViewer",
"window_size": (590, 450),
"window_size": (590, 460),
"font_family": "Ubuntu",
"font_size": 11,
"resizable_window": (True, True),
@ -66,10 +66,7 @@ class AppConfig:
# 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

View File

@ -4,6 +4,7 @@ import logging
import tkinter as tk
from tkinter import TclError, filedialog, ttk
from pathlib import Path
import os
import webbrowser
import subprocess
from functools import partial
@ -45,11 +46,11 @@ class LogViewer(tk.Tk):
theme = ConfigManager.get("theme")
ThemeManager.change_theme(self, theme)
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.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(
file=modul_name.AppConfig.IMAGE_PATHS["update"]
file="/usr/share/icons/lx-icons/16/settings.png"
)
self.iconphoto(True, self.log_icon)
self.grid_rowconfigure(0, weight=1)
@ -170,6 +171,9 @@ class LogViewer(tk.Tk):
def updater(self):
"""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)
if result.returncode != 0:
MessageDialog("error", result.stderr)
@ -332,7 +336,7 @@ class LogViewer(tk.Tk):
# Update Menulfield
self.settings.entryconfigure(2, label=self.theme_label.get())
def createWidgets(self, _):
def createWidgets(self, modul_name, _):
text_frame = ttk.Frame(self)
text_frame.grid(row=1, column=0, padx=5, pady=5, sticky=tk.NSEW)
@ -462,7 +466,7 @@ class LogViewer(tk.Tk):
def directory_load(self, modul_name, _):
filepath = filedialog.askopenfilename(
initialdir=f"{Path.home() / ".local/share/lxlogs/"}",
initialdir=f"{Path.home() / '.local/share/lxlogs/'}",
title="Select a Logfile File",
filetypes=[("Logfiles", "*.log")],
)