Compare commits
4 Commits
2f5b6e5aac
...
1.06.2925
Author | SHA1 | Date | |
---|---|---|---|
a45cfb156b | |||
52f782b4e8 | |||
9a387dd801 | |||
7351100e55 |
12
Changelog
12
Changelog
@ -5,6 +5,18 @@ Changelog for shared_libs
|
||||
- add Info Window for user in delete logfile
|
||||
bevore delete logfile.
|
||||
|
||||
|
||||
### Added
|
||||
29.06.2025
|
||||
|
||||
- add new icon for install Update
|
||||
|
||||
- replace download with updater methode
|
||||
|
||||
- add methode for open lxtools_installer Appimage
|
||||
|
||||
- add german translation for logviewer
|
||||
|
||||
### Added
|
||||
15-06-2025
|
||||
|
||||
|
13
README.md
13
README.md
@ -4,9 +4,10 @@ Module Project for apps by git.ilunix.de
|
||||
Examples with a Theme from Projekt Wire-Py
|
||||
|
||||
# Screenshots
|
||||
[](https://fb.ilunix.de/share/KtaTPMMq)
|
||||
[](https://fb.ilunix.de/share/cRO_ksrM)
|
||||
[](https://fb.ilunix.de/share/1JEdSJcI)
|
||||
[](https://fb.ilunix.de/share/1XxNey7y7)
|
||||
[](https://fb.ilunix.de/share/4HCxiNwB)
|
||||
[](https://fb.ilunix.de/share/uui8b1xx)
|
||||
[](https://fb.ilunix.de/share/KtaTPMMq)
|
||||
[](https://fb.ilunix.de/share/cRO_ksrM)
|
||||
[](https://fb.ilunix.de/share/1JEdSJcI)
|
||||
[](https://fb.ilunix.de/share/1XxNey7y7)
|
||||
[](https://fb.ilunix.de/share/4HCxiNwB)
|
||||
[](https://fb.ilunix.de/share/uui8b1xx)
|
||||
[](https://fb.ilunix.de/share/54OM6wUC)
|
||||
|
BIN
languages/de/logviewer.mo
Normal file
BIN
languages/de/logviewer.mo
Normal file
Binary file not shown.
163
languages/de/logviewer.po
Normal file
163
languages/de/logviewer.po
Normal file
@ -0,0 +1,163 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR polunga40@unity-mail.de, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-06-29 17:25+0200\n"
|
||||
"PO-Revision-Date: 2025-06-29 18:00+0200\n"
|
||||
"Last-Translator: Désiré Werner Menrath <polunga40@unity-mail.de>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de_DE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
|
||||
#: gitea.py:127
|
||||
msgid "Download Successful"
|
||||
msgstr "Herunterladen erfolgreich"
|
||||
|
||||
#: gitea.py:128
|
||||
msgid "Your zip file is in home directory"
|
||||
msgstr "Ihre ZIP-Datei befindet sich im Home-Verzeichnis"
|
||||
|
||||
#: gitea.py:129
|
||||
msgid "Download error"
|
||||
msgstr "Fehler beim Herunterladen"
|
||||
|
||||
#: gitea.py:130
|
||||
msgid "Download failed! Please try again"
|
||||
msgstr "Herunterladen fehlgeschlagen! Bitte versuchen Sie es erneut."
|
||||
|
||||
#: gitea.py:131
|
||||
msgid "Download failed! No internet connection!"
|
||||
msgstr "Herunterladen fehlgeschlagen! Keine Internetverbindung!"
|
||||
|
||||
#: logviewer.py:102
|
||||
msgid "Load Log"
|
||||
msgstr "Logdatei laden"
|
||||
|
||||
#: logviewer.py:107
|
||||
msgid "Options"
|
||||
msgstr "Optionen"
|
||||
|
||||
#: logviewer.py:116
|
||||
msgid "Disable Updates"
|
||||
msgstr "Updates deaktivieren"
|
||||
|
||||
#: logviewer.py:149
|
||||
msgid "About"
|
||||
msgstr "Über"
|
||||
|
||||
#: logviewer.py:184
|
||||
msgid "Update search off"
|
||||
msgstr "Suche nach Updates ausgeschaltet"
|
||||
|
||||
#: logviewer.py:185
|
||||
msgid "Updates you have disabled"
|
||||
msgstr "Sie haben Updates deaktiviert"
|
||||
|
||||
#: logviewer.py:192
|
||||
msgid "No Server Connection!"
|
||||
msgstr "Keine Verbindung zum Server!"
|
||||
|
||||
#: logviewer.py:197
|
||||
msgid "Could not connect to update server"
|
||||
msgstr "Verbindung zum Update-Server nicht möglich"
|
||||
|
||||
#: logviewer.py:202
|
||||
msgid "No Updates"
|
||||
msgstr "Keine Updates verfügbar"
|
||||
|
||||
#: logviewer.py:203
|
||||
msgid "Congratulations! Wire-Py is up to date"
|
||||
msgstr "Glückwunsch! Wire-Py ist aktuell."
|
||||
|
||||
#: logviewer.py:223
|
||||
msgid "Click to install new version"
|
||||
msgstr "Klicken Sie, um die neue Version zu installieren"
|
||||
|
||||
#: logviewer.py:232
|
||||
msgid ""
|
||||
"Logviewer a simple Gui for View Logfiles.\n"
|
||||
"\n"
|
||||
"Logviewer is open source software written in Python.\n"
|
||||
"\n"
|
||||
"Email: polunga40@unity-mail.de also likes for donation.\n"
|
||||
"\n"
|
||||
"Use without warranty!\n"
|
||||
msgstr ""
|
||||
"Logviewer eine einfache GUI zur Anzeige von Protokolldateien.\n"
|
||||
"\n"
|
||||
"Logviewer ist Open-Source-Software, geschrieben in Python.\n"
|
||||
"\n"
|
||||
"E-Mail: polunga40@unity-mail.de (Spenden sind willkommen).\n"
|
||||
"\n"
|
||||
"Verwendung ohne Gewähr!\n"
|
||||
|
||||
#: logviewer.py:288
|
||||
msgid "Disable Tooltips"
|
||||
msgstr "Tooltips deaktivieren"
|
||||
|
||||
#: logviewer.py:291
|
||||
msgid "Enable Tooltips"
|
||||
msgstr "Tooltips aktivieren"
|
||||
|
||||
#: logviewer.py:319
|
||||
msgid "Dark"
|
||||
msgstr "Dunkel"
|
||||
|
||||
#: logviewer.py:321
|
||||
msgid "Light"
|
||||
msgstr "Hell"
|
||||
|
||||
#: logviewer.py:362
|
||||
msgid "Copy"
|
||||
msgstr "Kopieren"
|
||||
|
||||
#: logviewer.py:363
|
||||
msgid "Paste"
|
||||
msgstr "Einfügen"
|
||||
|
||||
#: logviewer.py:367
|
||||
msgid "Search"
|
||||
msgstr "Suchen"
|
||||
|
||||
#: logviewer.py:371
|
||||
msgid "Delete_Log"
|
||||
msgstr "Logdatei löschen"
|
||||
|
||||
#: logviewer.py:456
|
||||
msgid "A mistake occurred: {str(e)}"
|
||||
msgstr "Ein Fehler ist aufgetreten: {str(e)}"
|
||||
|
||||
#: logviewer.py:457
|
||||
msgid ""
|
||||
"A mistake occurred:\n"
|
||||
"{str(e)}\n"
|
||||
msgstr ""
|
||||
"Ein Fehler ist aufgetreten:\n"
|
||||
"{str(e)}\n"
|
||||
|
||||
#: logviewer.py:474
|
||||
#, python-brace-format
|
||||
msgid "A mistake occurred: {e}"
|
||||
msgstr "Ein Fehler ist aufgetreten: {e}"
|
||||
|
||||
#: logviewer.py:475
|
||||
#, python-brace-format
|
||||
msgid ""
|
||||
"A mistake occurred:\n"
|
||||
"{e}\n"
|
||||
msgstr ""
|
||||
"Ein Fehler ist aufgetreten:\n"
|
||||
"{e}\n"
|
||||
|
||||
#: logview_app_config.py:146
|
||||
msgid "Click for Settings"
|
||||
msgstr "Klick für Einstellungen"
|
@ -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.0325"
|
||||
VERSION: str = "v. 1.06.2925"
|
||||
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": (600, 383),
|
||||
"window_size": (590, 450),
|
||||
"font_family": "Ubuntu",
|
||||
"font_size": 11,
|
||||
"resizable_window": (True, True),
|
||||
@ -69,6 +69,7 @@ class AppConfig:
|
||||
"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
|
||||
|
33
logviewer.py
33
logviewer.py
@ -5,6 +5,7 @@ import tkinter as tk
|
||||
from tkinter import TclError, filedialog, ttk
|
||||
from pathlib import Path
|
||||
import webbrowser
|
||||
import subprocess
|
||||
from functools import partial
|
||||
from shared_libs.gitea import GiteaUpdate
|
||||
from shared_libs.message import MessageDialog
|
||||
@ -47,6 +48,9 @@ class LogViewer(tk.Tk):
|
||||
self.createWidgets(_)
|
||||
self.load_file(_, modul_name=modul_name)
|
||||
self.log_icon = tk.PhotoImage(file=modul_name.AppConfig.IMAGE_PATHS["icon_log"])
|
||||
self.update_icon = tk.PhotoImage(
|
||||
file=modul_name.AppConfig.IMAGE_PATHS["update"]
|
||||
)
|
||||
self.iconphoto(True, self.log_icon)
|
||||
self.grid_rowconfigure(0, weight=1)
|
||||
self.grid_rowconfigure(1, weight=1)
|
||||
@ -164,6 +168,12 @@ class LogViewer(tk.Tk):
|
||||
else:
|
||||
self.updates_lb.grid_remove()
|
||||
|
||||
def updater(self):
|
||||
"""Start the lxtools_installer"""
|
||||
result = subprocess.run(["/usr/local/bin/lxtools_installer"], check=False)
|
||||
if result.returncode != 0:
|
||||
MessageDialog("error", result.stderr)
|
||||
|
||||
# Update the labels based on the result
|
||||
def update_ui_for_update(self, res, modul_name, _):
|
||||
"""Update UI elements based on an update check result"""
|
||||
@ -200,25 +210,20 @@ class LogViewer(tk.Tk):
|
||||
|
||||
else:
|
||||
self.set_update.set(value=0)
|
||||
update_text = f"Update {res} {_('available!')}"
|
||||
|
||||
# Clear the label text since we'll show the button instead
|
||||
self.update_label.set("")
|
||||
|
||||
# Create the update button
|
||||
self.update_btn = ttk.Menubutton(self.menu_frame, text=update_text)
|
||||
self.update_btn = ttk.Button(
|
||||
self.menu_frame,
|
||||
image=self.update_icon,
|
||||
style="Toolbutton",
|
||||
command=self.updater,
|
||||
)
|
||||
self.update_btn.grid(column=5, row=0, padx=0)
|
||||
Tooltip(
|
||||
self.update_btn, _("Click to download new version"), self.tooltip_state
|
||||
)
|
||||
|
||||
self.download = tk.Menu(self, relief="flat")
|
||||
self.update_btn.configure(menu=self.download, style="Toolbutton")
|
||||
self.download.add_command(
|
||||
label=_("Download"),
|
||||
command=lambda: GiteaUpdate.download(
|
||||
f"{modul_name.AppConfig.DOWNLOAD_URL}/{res}.zip", res
|
||||
),
|
||||
self.update_btn, _("Click to install new version"), self.tooltip_state
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
@ -362,11 +367,11 @@ class LogViewer(tk.Tk):
|
||||
self.text_area.bind("<Button-3>", self.show_context_menu)
|
||||
self._entry.bind("<Button-3>", self.show_context_menu)
|
||||
|
||||
search_button = ttk.Button(next_frame, text="Search", command=self._onFind)
|
||||
search_button = ttk.Button(next_frame, text=_("Search"), command=self._onFind)
|
||||
search_button.grid(row=0, column=0, padx=5, pady=5, sticky=tk.EW)
|
||||
|
||||
delete_button = ttk.Button(
|
||||
next_frame, text="Delete_Log", command=self.delete_file
|
||||
next_frame, text=_("Delete_Log"), command=self.delete_file
|
||||
)
|
||||
delete_button.grid(row=0, column=2, padx=5, pady=5, sticky=tk.EW)
|
||||
|
||||
|
@ -129,7 +129,7 @@ class MessageDialog:
|
||||
self.window = tk.Toplevel(master)
|
||||
self.window.grab_set()
|
||||
self.window.resizable(False, False)
|
||||
ttk.Style().configure("TButton", font=("Helvetica", 11), padding=5)
|
||||
ttk.Style().configure("TButton")
|
||||
self.buttons_widgets = []
|
||||
self.current_button_index = 0
|
||||
self._load_icons()
|
||||
|
Reference in New Issue
Block a user