6 Commits

5 changed files with 11 additions and 18 deletions

View File

@ -6,12 +6,6 @@ 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

View File

@ -67,7 +67,7 @@ class GiteaUpdate:
""" """
try: 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) result: int = subprocess.call(to_down, shell=True)
if result == 0: if result == 0:
shutil.chown(f"{Path.home()}/{res}.zip", 1000, 1000) shutil.chown(f"{Path.home()}/{res}.zip", 1000, 1000)

Binary file not shown.

View File

@ -51,14 +51,14 @@ 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.07.0925" VERSION: str = "v. 1.06.2925"
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"
# UI configuration # UI configuration
UI_CONFIG: Dict[str, Any] = { UI_CONFIG: Dict[str, Any] = {
"window_title2": "LogViewer", "window_title2": "LogViewer",
"window_size": (590, 460), "window_size": (590, 450),
"font_family": "Ubuntu", "font_family": "Ubuntu",
"font_size": 11, "font_size": 11,
"resizable_window": (True, True), "resizable_window": (True, True),
@ -66,7 +66,10 @@ class AppConfig:
# Images and icons paths # Images and icons paths
IMAGE_PATHS: Dict[str, Path] = { 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", "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

View File

@ -4,7 +4,6 @@ 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
@ -46,11 +45,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(modul_name, _) self.createWidgets(_)
self.load_file(_, modul_name=modul_name) self.load_file(_, modul_name=modul_name)
self.log_icon = tk.PhotoImage(file="/usr/share/icons/lx-icons/48/log.png") self.log_icon = tk.PhotoImage(file=modul_name.AppConfig.IMAGE_PATHS["icon_log"])
self.update_icon = tk.PhotoImage( self.update_icon = tk.PhotoImage(
file="/usr/share/icons/lx-icons/16/settings.png" file=modul_name.AppConfig.IMAGE_PATHS["update"]
) )
self.iconphoto(True, self.log_icon) self.iconphoto(True, self.log_icon)
self.grid_rowconfigure(0, weight=1) self.grid_rowconfigure(0, weight=1)
@ -171,9 +170,6 @@ 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)
@ -336,7 +332,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, modul_name, _): def createWidgets(self, _):
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)
@ -466,7 +462,7 @@ class LogViewer(tk.Tk):
def directory_load(self, modul_name, _): def directory_load(self, modul_name, _):
filepath = filedialog.askopenfilename( filepath = filedialog.askopenfilename(
initialdir=f"{Path.home() / '.local/share/lxlogs/'}", initialdir=f"{Path.home() / ".local/share/lxlogs/"}",
title="Select a Logfile File", title="Select a Logfile File",
filetypes=[("Logfiles", "*.log")], filetypes=[("Logfiles", "*.log")],
) )