5 Commits

Author SHA1 Message Date
6faf65ad08 fix about icon 2025-07-09 17:47:12 +02:00
0d694adc2d update size and german translate file 2025-07-09 17:02:36 +02:00
ec76940dca fix f string in row 469 2025-07-09 12:11:31 +02:00
6242dd7b0d update size x and y 2025-07-09 11:10:09 +02:00
703d2dfc4a fix update icon path now direkt coded 2025-07-09 08:29:31 +02:00
5 changed files with 18 additions and 11 deletions

View File

@ -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

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.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"
# UI configuration # UI configuration
UI_CONFIG: Dict[str, Any] = { UI_CONFIG: Dict[str, Any] = {
"window_title2": "LogViewer", "window_title2": "LogViewer",
"window_size": (590, 450), "window_size": (590, 460),
"font_family": "Ubuntu", "font_family": "Ubuntu",
"font_size": 11, "font_size": 11,
"resizable_window": (True, True), "resizable_window": (True, True),
@ -66,10 +66,7 @@ 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,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)
@ -462,7 +466,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")],
) )