34 Commits
Author SHA1 Message Date
thooge 72571ede53 Webgui code improvements for dropdown handling 2026-10-01 18:10:57 +02:00
thooge 131af7d9e7 Work on native gui. Display records and add missing tasks and measurements. 2026-09-30 16:18:44 +02:00
thooge c3109b9d2a Fixed console password utility ymspass.py 2026-09-26 09:08:10 +02:00
thooge 99df0287be Added custom properties and backup settings 2026-09-25 17:36:11 +02:00
thooge 53ea5af9e7 Improve file access rights in webgui 2026-09-24 09:17:41 +02:00
thooge 5dcda3fe81 Fix debian packaging for native gui 2026-09-23 07:44:05 +02:00
thooge f6b37c9f26 Fixed generic data and added english version 2026-09-22 17:51:00 +02:00
thooge c5dff82da7 Added missing debian changelog 2026-09-22 17:26:05 +02:00
thooge d7e2ffdace Fix remarks display in webgui edit forms 2026-09-22 12:38:17 +02:00
thooge ed229ac7c7 Fix initial config creation 2026-09-22 10:20:22 +02:00
thooge 0adb07d75b Work on native gui: list views for objects; set version to 0.2.2 2026-09-21 19:07:59 +02:00
thooge d61faf2e71 Fix install script and add useful generic data 2026-09-21 09:32:56 +02:00
thooge 397d2de94f Fixed typo in webgui db.inc 2026-09-20 09:28:02 +02:00
thooge 5fd6c68b4f Added position to equipment 2026-09-20 09:19:18 +02:00
thooge 2fc74c0677 Fixes for webgui and more native gui development 2026-09-16 19:07:10 +02:00
thooge 9b45fd3700 Webgui: improve box, maintenance and date handling 2026-09-16 06:12:50 +02:00
thooge a76848e1da Box improvement and some experimental signalk code in webgui 2026-09-15 08:42:56 +02:00
thooge 57c42d1398 Some database improvements and associated changes in webgui 2026-09-14 10:12:32 +02:00
thooge 2250fb9743 Native gui: ongoing work, cables and fuses 2026-09-13 17:19:37 +02:00
thooge d72147c012 Native gui: implement data lists for all modules 2026-09-12 19:36:03 +02:00
thooge 4bc8dd8280 Some improvements and fixes for webgui 2026-09-12 11:05:09 +02:00
thooge 82dea5800d Work on native gui base features 2026-09-09 15:56:34 +02:00
thooge 25505757a6 Added missing view files to native gui 2026-09-09 12:25:16 +02:00
thooge b21a6beffd Work on native gui: views and database model 2026-09-09 12:20:57 +02:00
thooge 66f017567e Improve debian packet description and Makefile 2026-08-30 19:29:56 +02:00
thooge 4f5c8b0f0a Fix table cable and some more sample data 2026-08-29 14:48:55 +02:00
thooge 125a7bba56 Webgui: fix and improve cables and fuses 2026-08-29 14:27:16 +02:00
thooge ac4b994398 Debian packaging add missing files and create db user 2026-08-28 20:19:36 +02:00
thooge 1bb98f2515 Prepare optional webgui setup (Apache, nginx, lighttpd) 2026-08-28 20:00:10 +02:00
thooge 93095c630c More work on Debian packaging 2026-08-28 18:27:38 +02:00
thooge c549f7b131 Replace @PREFIX@ in idesktop link 2026-08-28 17:21:47 +02:00
thooge 3072ef1a9c Replace @PREFIX@ in desktop entry 2026-08-28 15:35:15 +02:00
thooge 52d7ee4ba1 Update build and translation handling 2026-08-28 14:50:11 +02:00
thooge 8d2fa0be77 Add initial Debian packaging 2026-08-28 14:10:46 +02:00
122 changed files with 20055 additions and 3278 deletions
+12 -1
View File
@@ -1,5 +1,16 @@
*~
__pycache__/
compare_*
*.txt
*.bak
*.pot
*.mo
compare_*
# Debian package build artifacts
/debian/.debhelper/
/debian/debhelper-build-stamp
/debian/files
/debian/*.debhelper
/debian/*.debhelper.log
/debian/*.substvars
/debian/yms/
+16
View File
@@ -1,6 +1,22 @@
CHANGELOG
=========
0.2.2 - 2026-09-21
------------------
* native gui: prepared list views for main objects
* added position to equipment
* box improved with dimensions, net weight and price
* experimental signalk integration
* added config for currency symbol support
* database prepared for lazy record locking feature
* some small database improvements
* webgui: some improvements and fixes
* work on native gui: display data lists
* prepare dynamic language support for webgui
* improve image uploading and scaling code
* added date formatting code
0.2.1 - 2026-08-28
------------------
+10 -8
View File
@@ -14,6 +14,8 @@ Yacht Management Software (YMS) Installation
1.2 Native GUI
- Python GTK3
- python3-gi
- python3-fitz
- python3-pyudev
- gir1.2-gtk-3.0
- gir1.2-rsvg-2.0
@@ -62,10 +64,10 @@ Optional import some sample data
4. Initialize document storage
Customize path and access rights to your needs
mkdir /var/local/yms
mkdir /var/local/yms/thumb
chown -R www-data /var/local/yms
chmod -R 750 /var/local/yms
mkdir /var/local/lib/yms
mkdir /var/local/lib/yms/thumb
chown -R www-data /var/local/lib/yms
chmod -R 750 /var/local/lib/yms
To grant access for the local gui the directory has to be writeable by a special
group (here as example 'yms'). The user which runs the local gui (here
@@ -75,11 +77,11 @@ group (here as example 'yms'). The user which runs the local gui (here
groupadd yms
usermod -aG yms www-data
usermod -aG yms guiuser
chgrp yms /var/local/yms
chgrp yms /var/local/yms/thumb
chmod -R 770 /var/local/yms
chgrp yms /var/local/lib/yms
chgrp yms /var/local/lib/yms/thumb
chmod -R 770 /var/local/lib/yms
4. Setup local GUI
5. Setup local GUI
Create a local database user with same name as your computer user and allow
database access with current unix credentials. E.g if your current unix user
+38 -2
View File
@@ -1,9 +1,34 @@
# Translation helper
# Targets
.PHONY: all prepare translation orig deb clean
# Package information
VERSION := $(shell dpkg-parsechangelog -S Version | sed 's/-.*//')
PACKAGE := yms
# Default target
all: prepare
# Debian source archive
orig:
git archive \
--format=tar \
--prefix=$(PACKAGE)-$(VERSION)/ \
HEAD \
':(exclude)debian' \
':(exclude)locale/*.pot' \
':(exclude)locale/de/LC_MESSAGES' \
| xz -9 > ../$(PACKAGE)_$(VERSION).orig.tar.xz
# Debian package
deb: orig
dpkg-buildpackage -us -uc
# Translation files
prepare: ymsgui.py yms/*.py yms/ui/*.ui
xgettext -L Python -o locale/program.pot ymsgui.py yms/*.py
xgettext -L Python -o locale/views.pot ymsgui.py yms/view/*.py
xgettext -L Glade -o locale/ui.pot yms/ui/*.ui
msgcat -o locale/combined.pot locale/program.pot locale/ui.pot
msgcat -o locale/combined.pot locale/program.pot locale/views.pot locale/ui.pot
msgmerge -U locale/de.po locale/combined.pot
translation: locale/de/LC_MESSAGES/ymsgui.mo
@@ -11,3 +36,14 @@ translation: locale/de/LC_MESSAGES/ymsgui.mo
locale/de/LC_MESSAGES/ymsgui.mo: locale/de.po
mkdir -p locale/de/LC_MESSAGES
msgfmt locale/de.po -o locale/de/LC_MESSAGES/ymsgui.mo
# Clean generated files
clean:
find . -type d -name "__pycache__" -prune -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
rm -f locale/program.pot
rm -f locale/views.pot
rm -f locale/ui.pot
rm -f locale/combined.pot
rm -f locale/de/LC_MESSAGES/ymsgui.mo
dh_clean
+4 -2
View File
@@ -24,6 +24,8 @@ For users using idesktop there is a prepared link file "yms.lnk".
Copy it to your private .idesktop directory to create a
desktop link.
For further information go to https://computerclub.hoogi.de/yms
(currently german only)
For further information go to the international project site:
https://yms.hoogi.de/yms
Documentation in german language is available at:
https://computerclub.hoogi.de/yms
+13
View File
@@ -0,0 +1,13 @@
Alias /yms /usr/share/yms/webgui
<Directory /usr/share/yms/webgui>
Options FollowSymLinks
AllowOverride None
Require all granted
<FilesMatch "\.inc$">
Require all denied
</FilesMatch>
DirectoryIndex index.php
</Directory>
+15
View File
@@ -0,0 +1,15 @@
location ^~ /yms/ {
alias /usr/share/yms/webgui/;
index index.php;
}
location ~ ^/yms/.*\.inc$ {
deny all;
}
location ~ ^/yms/(.+\.php)$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/share/yms/webgui/$1;
fastcgi_param SCRIPT_NAME /yms/$1;
fastcgi_pass unix:@PHP_FPM_SOCKET@;
}
+167
View File
@@ -0,0 +1,167 @@
/* Generic data suitable for all kind of boats
* SPDX-License-Identifier: WTFPL
Add this data additionally after applying minmal.sql
*/
INSERT INTO user (userid, login, pass, displayname, role) VALUES
(2, 'helmsman', '$2y$10$LFl2jvrt2kB.c2KXBLaCI.RF2XAGNmFsoRc.V2tzLKrfCPiBCbI0e', 'Helmsman', 'helmsman'),
(3, 'sailor', '$2y$10$H5ZKd9r3KLAzI7W5u3ocgOCcXF4aDgjMAFYCzVC9Q9/Q9BqAV0MKS', 'Sailor', 'sailor');
INSERT INTO vessel (vid, vesselname, model, loa, lwl, beam, draught, displacement, ballast) VALUES
(1, 'Generic vessel', 'Generic model', 10.0, 9.5, 3.0, 1.8, 4000, 1200);
INSERT INTO storage (sid, vid, sname, stype, x, y, z, remarks) VALUES
(0, 1, 'An Bord', 0, 0, 0, 0, 'Alles wo der Ort nicht spezifiziert werden kann');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(1, 1, 'Mono'),
(1, 2, 'Katamaran'),
(1, 3, 'Trimaran');
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 4, 'Dienstleister', NULL), -- Service
(2, 5, 'Segelmacher', NULL), -- Sailmaker
(2, 6, 'Yachthafen', NULL); -- Marina
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(3, 3, 'Bilge', NULL),
(3, 4, 'Schwalbennest', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(4, 1, 'Rumpf'),
(4, 2, 'Deck'),
(4, 3, 'Rigg'),
(4, 4, 'Segel'),
(4, 5, 'Motor'),
(4, 6, 'Elektrik'),
(4, 7, 'Elektronik'),
(4, 8, 'Navigation'),
(4, 9, 'Pantry'),
(4, 10, 'Solar'),
(4, 11, 'Sicherheit'),
(4, 12, 'Laufendes Gut');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(5, 1, 'Allgemein'),
(5, 2, 'Frischware'),
(5, 3, 'Trockenware'),
(5, 4, 'Konserven'),
(5, 5, 'Gefriergetrocknet'),
(5, 6, 'Snacks (süß)'),
(5, 7, 'Snacks (salzig)'),
(5, 8, 'Getränke');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(6, 1, 'kg', 'kg'),
(6, 2, 'Liter', 'L'),
(6, 3, 'Stück', 'St'),
(6, 4, 'Packung', 'Pkg'),
(6, 5, 'Dose', 'Ds'),
(6, 6, 'Flasche', 'Fl'),
(6, 7, 'Tüte', 'Tue'),
(6, 8, 'Tafel', 'Ta'),
(6, 9, 'Glas', 'Gl');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(7, 1, 'ATO/ATC-Stecksicherung', 'ATO'),
(7, 2, 'MAXI-Stecksicherung', 'Max'),
(7, 3, 'MIDI/AMI-Sicherung', 'MIDI'),
(7, 4, 'MEGA/AMG-Sicherung', 'MEGA'),
(7, 5, 'MRBF-Sicherung', 'MRBF'),
(7, 6, 'ANL-Sicherung', 'ANL'),
(7, 7, 'Class-T-Sicherung', 'Cl-T'),
(7, 8, 'Feinsicherung 5×20 mm', 'Fein'),
(7, 9, 'Glassicherung inline', 'Glas'),
(7, 10, 'Automat / Leitungsschutzschalter', 'Auto'),
(7, 11, 'Torpedosicherung', 'Torp'),
(7, 12, 'Streifensicherung', 'Str');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(8, 1, 'Millimeter', 'mm'),
(8, 2, 'Zentimeter', 'cm'),
(8, 3, 'Meter', 'm'),
(8, 4, 'Gramm', 'g'),
(8, 5, 'Kilogramm', 'kg'),
(8, 6, 'Watt', 'W'),
(8, 7, 'Kilowatt', 'kW'),
(8, 8, 'Ampere', 'A');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(9, 1, 'Plastikbox, klein'),
(9, 2, 'Plastikbox, groß'),
(9, 3, 'Sortimentskasten'),
(9, 4, 'Werkzeugkiste');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(11, 1, 'Einzelader'),
(11, 2, 'Steuerleitung'),
(11, 3, 'Datenkabel'),
(11, 4, 'Netzwerkkabel'),
(11, 5, 'Koaxialkabel'),
(11, 6, 'Antennenkabel'),
(11, 7, 'Lautsprecherkabel'),
(11, 8, 'Mikrofonkabel'),
(11, 9, 'Batteriekabel'),
(11, 10, 'Solarkabel'),
(11, 11, 'Gummileitung'),
(11, 12, 'Flachbandkabel'),
(11, 13, 'Telefonkabel'),
(11, 14, 'NMEA-Kabel'),
(11, 15, 'CAN-Bus-Kabel'),
(11, 16, 'USB-Kabel');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(12, 1, 'H05V-K'),
(12, 2, 'H07V-K'),
(12, 3, 'H05VV-F'),
(12, 4, 'H07RN-F'),
(12, 5, 'LiYY'),
(12, 6, 'LiYCY'),
(12, 7, 'LiYCY-TP'),
(12, 8, 'Cat 5e'),
(12, 9, 'Cat 6'),
(12, 10, 'RG-58'),
(12, 11, 'RG-213'),
(12, 12, 'RG-316'),
(12, 13, 'H-155'),
(12, 14, 'Aircell 5'),
(12, 15, 'Aircell 7'),
(12, 16, 'Ecoflex 10');
/* supplier */
INSERT INTO company (comptype, compname, street, zip, city, country, phone, email, web) VALUES
(1, 'Compass24', NULL, NULL, 'Ascheberg', 'Deutschland', NULL, NULL, 'compass24.de'),
(1, 'Gründl', NULL, NULL, NULL, 'Deutschland', NULL, NULL, 'gruendl.de'),
(1, 'KlabauterShop', NULL, NULL, NULL, 'Deutschland', NULL, 'info@klabautershop.de', 'klabautershop.de'),
(1, 'SVB', NULL, NULL, 'Bremen', 'Deutschland', NULL, NULL, 'svb.de'),
(1, 'Toplicht', 'Notkestraße 97', '22607', 'Hamburg', 'Deutschland', '040 8890100', 'toplicht@toplicht.de', 'toplicht.de');
/* manufacturer */
INSERT INTO company (comptype, compname, street, zip, city, country, contact, phone, email, web) VALUES
(2, 'Airmar', NULL, NULL, NULL, 'USA', 'Sales', NULL, 'sales@airmar.com', 'airmar.com'),
(2, 'B&G', 'Marienthaler Str. 17', '24340', 'Eckernförde', 'Deutschland', 'Sales', '+49 4351 883290', 'sales.de@navico.com', 'bandg.com'),
(2, 'Blue Sea Systems', 'N85 W12545 Westbrook Crossing', '53051', 'Menomonee Falls', 'USA', 'Customer Service', '+1 800 307 6702', NULL, 'bluesea.com'),
(2, 'Dometic', 'Hemvärnsgatan 15', '171 54', 'Solna', 'Schweden', 'Customer Service', '+49 511 474046-400', 'contact.eu@dometic.com', 'dometic.com'),
(2, 'Garmin', 'Parkring 35', '85748', 'Garching', 'Deutschland', 'Zentrale', '+49 89 541999-700', 'impressum@garmin.de', 'garmin.com'),
(2, 'Harken', NULL, NULL, 'Pewaukee', 'USA', 'Customer Service', NULL, NULL, 'harken.com'),
(2, 'Hella Marine', NULL, NULL, 'Auckland', 'Neuseeland', 'Marine', NULL, NULL, 'hellamarine.com'),
(2, 'Icom', NULL, NULL, NULL, 'Japan', 'Marine', NULL, NULL, 'icomjapan.com'),
(2, 'Isotherm', NULL, NULL, NULL, 'Italien', 'Marine', NULL, NULL, 'indelwebastomarine.com'),
(2, 'Jabsco', '301 Water Street SE, Suite 200', '20003', 'Washington', 'USA', 'Xylem', '+1 978 281 0440', NULL, 'xylem.com'),
(2, 'Johnson Pump', NULL, NULL, NULL, 'Schweden', 'Marine', NULL, NULL, 'johnson-pump.com'),
(2, 'Lewmar', 'Southmoor Lane', 'PO9 1JJ', 'Havant', 'Vereinigtes Königreich', 'Customer Service', '+44 23 9247 1841', 'info@lewmar.com', 'lewmar.com'),
(2, 'Lofrans', 'Via Leonardo Da Vinci 6', '20040', 'Cambiago (MI)', 'Italien', 'Customer Service', '+39 02 36640684', NULL, 'lofrans.it'),
(2, 'Mastervolt', 'Snijdersbergweg 93', '1105 AN', 'Amsterdam', 'Niederlande', 'Customer Service', '+31 20 3422100', 'info.emea@OneASG.com', 'mastervolt.com'),
(2, 'Plastimo', NULL, NULL, 'Lorient', 'Frankreich', 'Marine', NULL, NULL, 'plastimo.com'),
(2, 'Quick', 'Via Piangipane 120/A', '48124', 'Piangipane (RA)', 'Italien', 'Headquarters', '+39 0544 415061', 'quick@quickitaly.com', 'quickitaly.com'),
(2, 'Raymarine', 'Atlantic-Haus, Zirkusweg 1', '20359', 'Hamburg', 'Deutschland', 'Support', '+49 40 2378080', NULL, 'raymarine.com'),
(2, 'Ronstan', NULL, NULL, 'Melbourne', 'Australien', 'Marine', NULL, NULL, 'ronstan.com'),
(2, 'Selden', 'Redegatan 11', '421 21', 'Västra Frölunda', 'Schweden', 'Headquarters', '+46 31 696900', 'info@seldenmast.com', 'seldenmast.com'),
(2, 'Simrad', NULL, NULL, NULL, 'Norwegen', 'Marine', NULL, NULL, 'simrad-yachting.com'),
(2, 'Spinlock', 'Birmingham Road', 'PO31 7BH', 'Cowes', 'Vereinigtes Königreich', 'Customer Service', '+44 1983 295555', NULL, 'spinlock.co.uk'),
(2, 'Torqeedo', NULL, NULL, NULL, 'Deutschland', 'Marine', NULL, NULL, 'torqeedo.com'),
(2, 'Vetus', 'Havenstraat 11', '3115 HC', 'Schiedam', 'Niederlande', 'Headquarters', '+31 884 884700', 'info@vetus.com', 'vetus.com'),
(2, 'Victron Energy', 'De Paal 35', '1351 JG', 'Almere', 'Niederlande', 'Headquarters', NULL, NULL, 'victronenergy.com'),
(2, 'Whale', NULL, NULL, NULL, 'Vereinigtes Königreich', 'Marine', NULL, NULL, 'whalepumps.com');
+167
View File
@@ -0,0 +1,167 @@
/* Generic data suitable for all kind of boats
* SPDX-License-Identifier: WTFPL
Add this data additionally after applying minmal.sql
*/
INSERT INTO user (userid, login, pass, displayname, role) VALUES
(2, 'helmsman', '$2y$10$LFl2jvrt2kB.c2KXBLaCI.RF2XAGNmFsoRc.V2tzLKrfCPiBCbI0e', 'Helmsman', 'helmsman'),
(3, 'sailor', '$2y$10$H5ZKd9r3KLAzI7W5u3ocgOCcXF4aDgjMAFYCzVC9Q9/Q9BqAV0MKS', 'Sailor', 'sailor');
INSERT INTO vessel (vid, vesselname, model, loa, lwl, beam, draught, displacement, ballast) VALUES
(1, 'Generic vessel', 'Generic model', 10.0, 9.5, 3.0, 1.8, 4000, 1200);
INSERT INTO storage (sid, vid, sname, stype, x, y, z, remarks) VALUES
(0, 1, 'An Bord', 0, 0, 0, 0, 'Alles wo der Ort nicht spezifiziert werden kann');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(1, 1, 'Monohull'),
(1, 2, 'Catamaran'),
(1, 3, 'Trimaran');
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 4, 'Service', NULL),
(2, 5, 'Sailmaker', NULL),
(2, 6, 'Marina', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(3, 3, 'Bilge', NULL),
(3, 4, 'Quarter Berth', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(4, 1, 'Hull'),
(4, 2, 'Deck'),
(4, 3, 'Rigging'),
(4, 4, 'Sails'),
(4, 5, 'Eingine'),
(4, 6, 'Electrical'),
(4, 7, 'Electronics'),
(4, 8, 'Navigation'),
(4, 9, 'Galley'),
(4, 10, 'Solar'),
(4, 11, 'Safety'),
(4, 12, 'Running Rigging');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(5, 1, 'General'),
(5, 2, 'Drinks'),
(5, 3, 'Sweets'),
(5, 4, 'Tinned Food'),
(5, 5, 'Fresh Food'),
(5, 6, 'Dry Goods'),
(5, 7, 'Freeze-Dried Food'),
(5, 8, 'Savoury Snacks');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(6, 1, 'kg', 'kg'),
(6, 2, 'Litre', 'L'),
(6, 3, 'Piece', 'pc'),
(6, 4, 'Pack', 'pk'),
(6, 5, 'Tin', 'tin'),
(6, 6, 'Bottle', 'btl'),
(6, 7, 'Bag', 'bag'),
(6, 8, 'Bar', 'bar'),
(6, 9, 'Jar', 'jar');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(7, 1, 'ATO/ATC blade fuse', 'ATO'),
(7, 2, 'MAXI blade fuse', 'Max'),
(7, 3, 'MIDI/AMI fuse', 'MIDI'),
(7, 4, 'MEGA/AMG fuse', 'MEGA'),
(7, 5, 'MRBF fuse', 'MRBF'),
(7, 6, 'ANL fuse', 'ANL'),
(7, 7, 'Class-T fuse', 'Cl-T'),
(7, 8, '5×20 mm cartridge fuse', 'Cart'),
(7, 9, 'Glass inline fuse', 'Glas'),
(7, 10, 'Circuit breaker', 'Auto'),
(7, 11, 'Torpedo fuse', 'Torp'),
(7, 12, 'Strip fuse', 'Str');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(8, 1, 'mm', 'Millimetre'),
(8, 2, 'cm', 'Centimetre'),
(8, 3, 'g', 'Gram'),
(8, 4, 'kg', 'Kilogram'),
(8, 5, 'm', 'Metre'),
(8, 6, 'kW', 'Kilowatt'),
(8, 7, 'A', 'Ampere'),
(8, 8, 'L', 'Litre');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(9, 1, 'Small Plastic Box'),
(9, 2, 'Large Plastic Box'),
(9, 3, 'Parts Organiser'),
(9, 4, 'Toolbox');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(11, 1, 'Single-core cable'),
(11, 2, 'Control cable'),
(11, 3, 'Data cable'),
(11, 4, 'Network cable'),
(11, 5, 'Coaxial cable'),
(11, 6, 'Aerial cable'),
(11, 7, 'Speaker cable'),
(11, 8, 'Microphone cable'),
(11, 9, 'Battery cable'),
(11, 10, 'Solar cable'),
(11, 11, 'Rubber cable'),
(11, 12, 'Ribbon cable'),
(11, 13, 'Telephone cable'),
(11, 14, 'NMEA cable'),
(11, 15, 'CAN bus cable'),
(11, 16, 'USB cable');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(12, 1, 'H05V-K'),
(12, 2, 'H07V-K'),
(12, 3, 'H05VV-F'),
(12, 4, 'H07RN-F'),
(12, 5, 'LiYY'),
(12, 6, 'LiYCY'),
(12, 7, 'LiYCY-TP'),
(12, 8, 'Cat 5e'),
(12, 9, 'Cat 6'),
(12, 10, 'RG-58'),
(12, 11, 'RG-213'),
(12, 12, 'RG-316'),
(12, 13, 'H-155'),
(12, 14, 'Aircell 5'),
(12, 15, 'Aircell 7'),
(12, 16, 'Ecoflex 10');
/* supplier */
INSERT INTO company (comptype, compname, street, zip, city, country, phone, email, web) VALUES
(1, 'Compass24', NULL, NULL, 'Ascheberg', 'Deutschland', NULL, NULL, 'compass24.de'),
(1, 'Gründl', NULL, NULL, NULL, 'Deutschland', NULL, NULL, 'gruendl.de'),
(1, 'KlabauterShop', NULL, NULL, NULL, 'Deutschland', NULL, 'info@klabautershop.de', 'klabautershop.de'),
(1, 'SVB', NULL, NULL, 'Bremen', 'Deutschland', NULL, NULL, 'svb.de'),
(1, 'Toplicht', 'Notkestraße 97', '22607', 'Hamburg', 'Deutschland', '040 8890100', 'toplicht@toplicht.de', 'toplicht.de');
/* manufacturer */
INSERT INTO company (comptype, compname, street, zip, city, country, contact, phone, email, web) VALUES
(2, 'Airmar', NULL, NULL, NULL, 'USA', 'Sales', NULL, 'sales@airmar.com', 'airmar.com'),
(2, 'B&G', 'Marienthaler Str. 17', '24340', 'Eckernförde', 'Deutschland', 'Sales', '+49 4351 883290', 'sales.de@navico.com', 'bandg.com'),
(2, 'Blue Sea Systems', 'N85 W12545 Westbrook Crossing', '53051', 'Menomonee Falls', 'USA', 'Customer Service', '+1 800 307 6702', NULL, 'bluesea.com'),
(2, 'Dometic', 'Hemvärnsgatan 15', '171 54', 'Solna', 'Schweden', 'Customer Service', '+49 511 474046-400', 'contact.eu@dometic.com', 'dometic.com'),
(2, 'Garmin', 'Parkring 35', '85748', 'Garching', 'Deutschland', 'Zentrale', '+49 89 541999-700', 'impressum@garmin.de', 'garmin.com'),
(2, 'Harken', NULL, NULL, 'Pewaukee', 'USA', 'Customer Service', NULL, NULL, 'harken.com'),
(2, 'Hella Marine', NULL, NULL, 'Auckland', 'Neuseeland', 'Marine', NULL, NULL, 'hellamarine.com'),
(2, 'Icom', NULL, NULL, NULL, 'Japan', 'Marine', NULL, NULL, 'icomjapan.com'),
(2, 'Isotherm', NULL, NULL, NULL, 'Italien', 'Marine', NULL, NULL, 'indelwebastomarine.com'),
(2, 'Jabsco', '301 Water Street SE, Suite 200', '20003', 'Washington', 'USA', 'Xylem', '+1 978 281 0440', NULL, 'xylem.com'),
(2, 'Johnson Pump', NULL, NULL, NULL, 'Schweden', 'Marine', NULL, NULL, 'johnson-pump.com'),
(2, 'Lewmar', 'Southmoor Lane', 'PO9 1JJ', 'Havant', 'Vereinigtes Königreich', 'Customer Service', '+44 23 9247 1841', 'info@lewmar.com', 'lewmar.com'),
(2, 'Lofrans', 'Via Leonardo Da Vinci 6', '20040', 'Cambiago (MI)', 'Italien', 'Customer Service', '+39 02 36640684', NULL, 'lofrans.it'),
(2, 'Mastervolt', 'Snijdersbergweg 93', '1105 AN', 'Amsterdam', 'Niederlande', 'Customer Service', '+31 20 3422100', 'info.emea@OneASG.com', 'mastervolt.com'),
(2, 'Plastimo', NULL, NULL, 'Lorient', 'Frankreich', 'Marine', NULL, NULL, 'plastimo.com'),
(2, 'Quick', 'Via Piangipane 120/A', '48124', 'Piangipane (RA)', 'Italien', 'Headquarters', '+39 0544 415061', 'quick@quickitaly.com', 'quickitaly.com'),
(2, 'Raymarine', 'Atlantic-Haus, Zirkusweg 1', '20359', 'Hamburg', 'Deutschland', 'Support', '+49 40 2378080', NULL, 'raymarine.com'),
(2, 'Ronstan', NULL, NULL, 'Melbourne', 'Australien', 'Marine', NULL, NULL, 'ronstan.com'),
(2, 'Selden', 'Redegatan 11', '421 21', 'Västra Frölunda', 'Schweden', 'Headquarters', '+46 31 696900', 'info@seldenmast.com', 'seldenmast.com'),
(2, 'Simrad', NULL, NULL, NULL, 'Norwegen', 'Marine', NULL, NULL, 'simrad-yachting.com'),
(2, 'Spinlock', 'Birmingham Road', 'PO31 7BH', 'Cowes', 'Vereinigtes Königreich', 'Customer Service', '+44 1983 295555', NULL, 'spinlock.co.uk'),
(2, 'Torqeedo', NULL, NULL, NULL, 'Deutschland', 'Marine', NULL, NULL, 'torqeedo.com'),
(2, 'Vetus', 'Havenstraat 11', '3115 HC', 'Schiedam', 'Niederlande', 'Headquarters', '+31 884 884700', 'info@vetus.com', 'vetus.com'),
(2, 'Victron Energy', 'De Paal 35', '1351 JG', 'Almere', 'Niederlande', 'Headquarters', NULL, NULL, 'victronenergy.com'),
(2, 'Whale', NULL, NULL, NULL, 'Vereinigtes Königreich', 'Marine', NULL, NULL, 'whalepumps.com');
+128 -34
View File
@@ -3,10 +3,12 @@
/* MariaDB Scheme
Version: 1 */
/* TODO
/* REMARKS
- there are by design no created_at, updated_at, updates_by or similar fields
TODO
- check all values if unsigned can be used or not
- implement foreign keys where missing and possible
- add referential actions where appropriate
- add referential actions where appropriate
- rename provisions to provision(?)
- review defaults
*/
@@ -66,6 +68,7 @@ CREATE TABLE dropdown (
PRIMARY KEY (ddid, ddval)
) ENGINE=InnoDB;
/* compid is signed because negative values needed for special purpose */
CREATE TABLE company (
compid smallint(6) NOT NULL AUTO_INCREMENT,
compname varchar(60) NOT NULL,
@@ -94,6 +97,7 @@ CREATE TABLE vessel (
vesselname varchar(40) NOT NULL,
model varchar(20) DEFAULT NULL,
shipyard smallint(6) DEFAULT NULL,
year_built year DEFAULT NULL,
loa float(4,2) UNSIGNED DEFAULT NULL,
lwl float(4,2) UNSIGNED DEFAULT NULL,
beam float(4,2) UNSIGNED DEFAULT NULL,
@@ -109,6 +113,7 @@ CREATE TABLE vessel (
PRIMARY KEY (vid),
FOREIGN KEY fk_vessel_shipyard (shipyard)
REFERENCES company(compid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
CREATE TABLE storage (
@@ -117,7 +122,7 @@ CREATE TABLE storage (
sname varchar(40) NOT NULL,
stype tinyint(3) NOT NULL DEFAULT 0, -- ddid=3
capacity smallint(6) DEFAULT NULL,
capaunit enum('kg','l') DEFAULT NULL,
capaunit enum('kg','l','pcs') DEFAULT NULL,
x smallint(6) UNSIGNED NOT NULL DEFAULT 0,
y smallint(6) NOT NULL DEFAULT 0,
z smallint(6) NOT NULL DEFAULT 0,
@@ -130,13 +135,15 @@ CREATE TABLE storage (
PRIMARY KEY (sid),
FOREIGN KEY fk_storage_vessel (vid)
REFERENCES vessel(vid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* intentionally after storage creation */
ALTER TABLE vessel
ADD CONSTRAINT fk_vessel_storage
FOREIGN KEY (sid_default)
REFERENCES storage(sid);
REFERENCES storage(sid)
ON DELETE RESTRICT;
CREATE TABLE tag (
tagid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -152,13 +159,14 @@ CREATE TABLE tagref (
objid int(10) UNSIGNED NOT NULL,
objtype enum('equip','inv','prov','doc', 'proj', 'task', 'maint') NOT NULL,
PRIMARY KEY (tagid, objid, objtype),
INDEX ix_tagref_obj (objid, objtype),
FOREIGN KEY fk_tagref_tag (tagid)
REFERENCES tag(tagid)
ON DELETE CASCADE
) ENGINE=InnoDB;
/* TODO Boxes can be nested via parent
TODO boxsize: (LxWxH) in cm? */
/* TODO Boxes can be nested via parent,
very low priority because perhaps rarely used */
CREATE TABLE box (
boxid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
sid smallint(6) UNSIGNED NOT NULL,
@@ -168,11 +176,20 @@ CREATE TABLE box (
color char(6) DEFAULT NULL,
content varchar(60) DEFAULT NULL,
weight float(5,2) UNSIGNED DEFAULT NULL,
weight_net float(5,2) UNSIGNED DEFAULT NULL,
wx smallint(6) UNSIGNED NOT NULL DEFAULT 0, -- length
wy smallint(6) UNSIGNED NOT NULL DEFAULT 0, -- width
wz smallint(6) UNSIGNED NOT NULL DEFAULT 0, -- height
price decimal(12,2) DEFAULT NULL,
remarks varchar(150) DEFAULT NULL,
PRIMARY KEY (boxid),
INDEX ix_label (label),
FOREIGN KEY fk_box_storage (sid)
REFERENCES storage(sid)
ON DELETE RESTRICT,
FOREIGN KEY fk_box_parent (parent)
REFERENCES box(boxid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
CREATE TABLE equipment (
@@ -188,6 +205,9 @@ CREATE TABLE equipment (
purchdate date DEFAULT NULL,
price decimal(12,2) DEFAULT NULL,
weight float(5,2) UNSIGNED DEFAULT NULL,
x smallint(6) UNSIGNED NOT NULL DEFAULT 0,
y smallint(6) NOT NULL DEFAULT 0,
z smallint(6) NOT NULL DEFAULT 0,
remarks varchar(150) DEFAULT NULL,
flags set('ordered','removed','deleted') DEFAULT NULL,
PRIMARY KEY(eid),
@@ -196,16 +216,25 @@ CREATE TABLE equipment (
ON DELETE RESTRICT,
FOREIGN KEY fk_equipment_supplier (supplier)
REFERENCES company(compid)
ON DELETE RESTRICT
ON DELETE RESTRICT,
FOREIGN KEY fk_equipment_manufacturer (manufacturer)
REFERENCES company(compid)
ON DELETE RESTRICT,
CONSTRAINT chk_equipment_pos CHECK (
(x IS NULL AND y IS NULL AND z IS NULL)
OR
(x IS NOT NULL AND y IS NOT NULL AND z IS NOT NULL)
)
) ENGINE=InnoDB;
CREATE TABLE inventory (
invid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
invname varchar(80) NOT NULL,
icat tinyint(3) DEFAULT NULL,
conttype enum('storage','box') NOT NULL DEFAULT 'storage',
sid smallint(6) UNSIGNED DEFAULT NULL,
boxid smallint(6) UNSIGNED DEFAULT NULL,
eid smallint(6) UNSIGNED DEFAULT NULL,
eid smallint(6) UNSIGNED DEFAULT NULL, -- spare part reference to equipment
number smallint(6) UNSIGNED NOT NULL DEFAULT 1,
weight float(5,2) UNSIGNED DEFAULT NULL,
price decimal(12,2) DEFAULT NULL,
@@ -216,12 +245,15 @@ CREATE TABLE inventory (
PRIMARY KEY (invid),
INDEX ix_invname (invname),
FOREIGN KEY fk_inventory_storage (sid)
REFERENCES storage(sid),
REFERENCES storage(sid)
ON DELETE RESTRICT,
FOREIGN KEY fk_inventory_box (boxid)
REFERENCES box(boxid),
REFERENCES box(boxid)
ON DELETE RESTRICT,
FOREIGN KEY fk_inventory_equipment (eid)
REFERENCES equipment(eid),
CHECK (
REFERENCES equipment(eid)
ON DELETE RESTRICT,
CONSTRAINT chk_inventory_stor CHECK (
(sid IS NOT NULL AND boxid IS NULL)
OR
(sid IS NULL AND boxid IS NOT NULL)
@@ -232,9 +264,10 @@ CREATE TABLE cable (
cableid smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
vid smallint(6) NOT NULL DEFAULT 1,
cablename varchar(80) NOT NULL,
cabletype varchar(40) DEFAULT NULL, -- e.g. H07RN-F
cabletype tinyint(3) DEFAULT NULL, -- from dropdown id 11 e.g. antenna cable
techname tinyint(3) DEFAULT NULL, -- from dropdown id 12 e.g. H07RN-F
length float(5,2) UNSIGNED NOT NULL DEFAULT 0, -- total length in m
conductors TINYINT(3) UNSIGNED NOT NULL DEFAULT 1,
conductors tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
diameter float(5,2) UNSIGNED DEFAULT NULL, -- outer diameter in mm
xsection float(5,2) UNSIGNED DEFAULT NULL, -- cross section in mm²
weight float(5,2) UNSIGNED DEFAULT NULL, -- kg/meter
@@ -246,11 +279,14 @@ CREATE TABLE cable (
PRIMARY KEY (cableid),
INDEX ix_cablename (vid, cablename),
FOREIGN KEY fk_cable_vessel (vid)
REFERENCES vessel(vid),
REFERENCES vessel(vid)
ON DELETE RESTRICT,
FOREIGN KEY fk_cable_supplier (supplier)
REFERENCES company(compid),
REFERENCES company(compid)
ON DELETE RESTRICT,
FOREIGN KEY fk_cable_manufacturer (manufacturer)
REFERENCES company(compid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
CREATE table fuse (
@@ -267,11 +303,14 @@ CREATE table fuse (
PRIMARY KEY (fuseid),
UNIQUE INDEX ix_fusenumber (vid, fnumber),
FOREIGN KEY fk_fuse_vessel (vid)
REFERENCES vessel(vid),
REFERENCES vessel(vid)
ON DELETE RESTRICT,
FOREIGN KEY fk_fuse_cable (cableid)
REFERENCES cable(cableid),
REFERENCES cable(cableid)
ON DELETE RESTRICT,
FOREIGN KEY fk_fuse_equipment (eid)
REFERENCES equipment(eid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
-- change vals to decimal(12,4)?
@@ -287,12 +326,15 @@ CREATE TABLE measurement (
unit tinyint(3) NOT NULL DEFAULT 1,
accuracy enum('unknown','precise','normal','rough','estimated') NOT NULL DEFAULT 'unknown',
mdate date DEFAULT NULL,
mcat tinyint(3) DEFAULT NULL,
note varchar(80) DEFAULT NULL,
PRIMARY KEY (mid),
FOREIGN KEY fk_measurement_vessel (vid)
REFERENCES vessel(vid),
REFERENCES vessel(vid)
ON DELETE RESTRICT,
FOREIGN KEY fk_measurement_equipment (eid)
REFERENCES equipment(eid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
CREATE TABLE provisions (
@@ -313,9 +355,11 @@ CREATE TABLE provisions (
remarks varchar(150) DEFAULT NULL,
PRIMARY KEY (provid),
FOREIGN KEY fk_provisions_storage (sid)
REFERENCES storage(sid),
REFERENCES storage(sid)
ON DELETE RESTRICT,
FOREIGN KEY fk_provisions_box (boxid)
REFERENCES box(boxid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* TODO
@@ -343,19 +387,19 @@ CREATE TABLE document (
CREATE TABLE docref (
drid int(10) NOT NULL AUTO_INCREMENT,
reftype enum('vessel','box','equipment','project','task','user','company') NOT NULL DEFAULT 'vessel',
reftype enum('vessel','box','equipment','project','maint', 'task','user','company') NOT NULL DEFAULT 'vessel',
docid smallint(6) NOT NULL,
refid int(10) NOT NULL,
PRIMARY KEY (drid),
UNIQUE INDEX ix_docref (docid, refid, reftype),
INDEX ix_docref_ref (refid, reftype),
FOREIGN KEY fk_docref_doc (docid)
REFERENCES document (docid)
ON DELETE RESTRICT
ON UPDATE CASCADE
ON DELETE CASCADE
) ENGINE=InnoDB;
/* TODO optional fields: plan date, target date, completion date
interval_hours, last_hours
/* TODO optional fields: target date?
responsible?
signalk: operating hours current vs maint every n operating hours in separate
*/
CREATE TABLE maintenance (
@@ -372,13 +416,14 @@ CREATE TABLE maintenance (
maintstate enum('new','plan','ongoing','done') NOT NULL DEFAULT 'new',
PRIMARY KEY (maintid),
FOREIGN KEY fk_maintenance_vessel (vid)
REFERENCES vessel(vid),
REFERENCES vessel(vid)
ON DELETE RESTRICT,
FOREIGN KEY fk_maintenance_equipment (eid)
REFERENCES equipment(eid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* TODO? time recording */
/* TODO time recording? */
CREATE TABLE project (
projid smallint(6) NOT NULL AUTO_INCREMENT,
projname varchar(40) NOT NULL,
@@ -392,9 +437,11 @@ CREATE TABLE project (
projstate enum('new','plan','ongoing','paused','finished') NOT NULL DEFAULT 'new',
PRIMARY KEY (projid),
FOREIGN KEY fk_project_vessel (vid)
REFERENCES vessel(vid),
REFERENCES vessel(vid)
ON DELETE RESTRICT,
FOREIGN KEY fk_project_user (responsible)
REFERENCES user(userid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* TODO executed_by : company or user? or both? */
@@ -411,13 +458,17 @@ CREATE TABLE task (
started datetime DEFAULT NULL,
finished datetime DEFAULT NULL,
responsible smallint(6) NOT NULL,
remarks varchar(150) DEFAULT NULL,
PRIMARY KEY (taskid),
FOREIGN KEY fk_task_user (responsible)
REFERENCES user(userid),
REFERENCES user(userid)
ON DELETE RESTRICT,
FOREIGN KEY fk_task_vessel (vid)
REFERENCES vessel(vid),
REFERENCES vessel(vid)
ON DELETE RESTRICT,
FOREIGN KEY fk_task_project (projid)
REFERENCES project(projid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* Notes can be assigned to tasks, maintenances and equipment */
@@ -426,9 +477,26 @@ CREATE TABLE note (
notetype enum('task','maint','equip') NOT NULL DEFAULT 'task',
refid int(10) NOT NULL,
annotation text NOT NULL,
PRIMARY KEY (noteid)
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_by smallint(6) DEFAULT NULL,
PRIMARY KEY (noteid),
FOREIGN KEY fk_note_user (created_by)
REFERENCES user(userid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* generic key value store for main objects */
CREATE TABLE property (
propid int(10) NOT NULL AUTO_INCREMENT,
objid int(10) UNSIGNED NOT NULL,
objtype enum('vessel','equip','inv','proj','maint'),
keyname varchar(32) NOT NULL,
valstr varchar(200) DEFAULT NULL,
valint int(10) DEFAULT NULL,
PRIMARY KEY (propid),
INDEX ix_prop_obj (objid, objtype)
);
CREATE TABLE checklist (
clid smallint(6) NOT NULL AUTO_INCREMENT,
title varchar(30) NOT NULL,
@@ -437,6 +505,7 @@ CREATE TABLE checklist (
PRIMARY KEY (clid),
FOREIGN KEY fk_checklist_parent (parent)
REFERENCES checklist(clid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
CREATE TABLE checkgroup (
@@ -453,6 +522,7 @@ CREATE TABLE checkitem (
PRIMARY KEY (checkid),
FOREIGN KEY fk_checkitem_group (groupid)
REFERENCES checkgroup(groupid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
CREATE TABLE checkref (
@@ -468,7 +538,7 @@ CREATE TABLE checkref (
ON DELETE CASCADE
) ENGINE=InnoDB;
/* Expansion for future use: signalk mapping (just an idea) */
/* Expansion for future use: signalk mapping (experimental) */
CREATE TABLE signalk (
skid int(10) NOT NULL AUTO_INCREMENT,
vid smallint(6) NOT NULL,
@@ -476,9 +546,33 @@ CREATE TABLE signalk (
objid int(10) NOT NULL,
datatype enum('engine_hours','tank_level') NOT NULL,
skpath varchar(255) NOT NULL,
mid smallint(6) DEFAULT NULL,
PRIMARY KEY (skid),
UNIQUE KEY ix_signalk
(vid, objtype, objid, datatype),
FOREIGN KEY fk_signalk_vessel (vid)
REFERENCES vessel(vid)
ON DELETE RESTRICT
) ENGINE=InnoDB;
/* Token
- Python: secrets.token_hex(8)
- PHP: bin2hex(random_bytes(8)) */
CREATE TABLE recordlock (
lock_table varchar(40) NOT NULL,
lock_key int(10) NOT NULL,
token varchar(16) NOT NULL,
userid smallint(6) NOT NULL,
created_at timestamp NOT NULL DEFAULT current_timestamp,
last_seen timestamp NOT NULL DEFAULT current_timestamp,
PRIMARY KEY (lock_table, lock_key),
UNIQUE KEY ix_lock_token (token)
) ENGINE=MEMORY;
/* Use with: UPDATE revision SET changed=CURRENT_TIMESTAMP WHERE revid=? */
CREATE TABLE revision (
revid smallint(6) UNSIGNED NOT NULL,
changed timestamp NOT NULL,
PRIMARY KEY (revid),
INDEX ix_revision_ts (changed) -- for select by timestamp
) ENGINE=MEMORY;
+30
View File
@@ -0,0 +1,30 @@
INSERT INTO measurement (mname, val1, accuracy) VALUES
('SA - Segelflaeche', 0, 'unknown'),
('P - Großsegel-Vorliek', 0, 'unknown'),
('E - Großsegel-Unterliek', 0, 'unknown'),
('I - Höhe des Vorsegeldreiecks', 0, 'unknown'),
('J - Basis des Vorsegeldreiecks', 0, 'unknown'),
('ISP - Höhe des Spinnakerfalls', 0, 'unknown'),
('SPL - Länge des Spinnakerbaums', 0, 'unknown'),
('TPS - Abstand Tackpunkt - Mast', 0, 'unknown'),
('FL - Vorstaglänge', 0, 'unknown'),
('IG - Höhe des inneren Vorsegelfalls', 0, 'unknown'),
('JH - Höhe des Vorsegelfalls', 0, 'unknown'),
('BAS - Großbaumhöhe', 0, 'unknown'),
('LP - Abstand Schothorn - Vorliek Fock', 0, 'unknown'),
('LPG - Abstand Schothorn Vorliek Genua', 0, 'unknown'),
('MW - Großsegelbreite', 0, 'unknown')
('MUW - Obere Großsegelbreite', 0, 'unknown')
('MTW - Großsegelbreite am Kopf', 0, 'unknown')
('MGU - Großsegel oberer Meßpunkt', 0, 'unknown')
('MGM - Großsegel mittlerer Meßpunkt', 0, 'unknown')
('MGL - Großsegel unterer Meßpunkt', 0, 'unknown')
('SHW - Halbe Spinnakerbreite', 0, 'unknown')
('SMG - Spinnaker Mid-Girth', 0, 'unknown')
('SFL - Spinnaker-Unterliekslänge', 0, 'unknown')
('LOA - Länge ueber alles', 0, 'unknown')
('LWL - Wasserlinienlänge', 0, 'unknown')
('BOA - Grösste Breite', 0, 'unknown')
('BWL - Breite an der Wasserlinie', 0, 'unknown')
('D - Tiefgang', 0, 'unknown')
('DISP - Verdrängung', 0, 'unknown');
+36 -19
View File
@@ -11,18 +11,28 @@ UPDATE user SET userid=0 WHERE userid=1;
INSERT INTO user (userid, login, pass, displayname, role) VALUES
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');
INSERT INTO settings (userid, sno, valint) VALUES
(0, 0, 1), -- Database schema version
(0, 1, 0), -- No vessel assignment to SYSTEM
(1, 1, 0), -- No vessel assignment to user "captain"
(0, 20, 1280), -- Image width limit
(0, 21, 1024); -- Image height limit
INSERT INTO settings (userid, sno, valint, valstr) VALUES
(0, 0, 1, NULL), -- Database schema version
(0, 1, 0, NULL), -- No vessel assignment to SYSTEM
(1, 1, 0, NULL), -- No vessel assignment to user "captain"
(0, 20, 1280, NULL), -- Image width limit
(0, 21, 1024, NULL), -- Image height limit
(0, 4, NULL, '€'), -- Currency symbol
(0, 5, 0, 'http://127.0.0.1:3000'), -- Signal K: to enable set valint=1
(0, 6, 0, 'localhost:2597'); -- NMEA2000 (for future use)
/* setting descriptions */
INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 0, 'database schema version'),
(-1, 1, 'vessel id'),
(-1, 2, 'date format'),
(-1, 3, 'user menu'),
(-1, 4, 'currency symbol e.g. €, $, £, ¥'),
(-1, 5, 'signalk connection'),
(-1, 6, 'nmea2000 connection'),
(-1, 7, 'usb backup device serial'),
(-1, 8, 'usb backup partition uuid'),
(-1, 9, 'last backup'),
(-1, 10, 'rows in table'),
(-1, 20, 'maximum image width'),
(-1, 21, 'maximum image height'),
@@ -54,19 +64,23 @@ INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 212, 'fuse filter json');
/* List of lists is always required */
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(0, 0, 'Liste der Listen'),
(0, 1, 'Rumpftypen'),
(0, 2, 'Firmentypen'),
(0, 3, 'Stauraumtypen'),
(0, 4, 'Ausrüstungskategorien'),
(0, 5, 'Proviantkategorien'),
(0, 6, 'Provianteinheiten'),
(0, 7, 'Sicherungstypen'),
(0, 8, 'Einheiten'),
(0, 9, 'Kistentypen'),
(0, 10, 'Sicherungsblöcke'), -- fuse locations
(0, 11, 'Kabeltypen');
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(0, 0, 'Liste der Listen', NULL),
(0, 1, 'Rumpftypen', NULL),
(0, 2, 'Firmentypen', NULL),
(0, 3, 'Stauraumtypen', NULL),
(0, 4, 'Ausrüstungskategorien', NULL),
(0, 5, 'Proviantkategorien', NULL),
(0, 6, 'Provianteinheiten', NULL),
(0, 7, 'Sicherungstypen', NULL),
(0, 8, 'Einheiten', NULL),
(0, 9, 'Kistentypen', NULL),
(0, 10, 'Sicherungsblöcke', NULL), -- fuse locations
(0, 11, 'Kabeltypen', NULL),
(0, 12, 'Technische Kabel-Bezeichnung', NULL),
(0, 13, 'Inventarkategorien', NULL),
(0, 14, 'BBN vessel.data Felder', 'locked'),
(0, 15, 'Messungskategorien', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 1, 'Lieferant', 'fixed'),
@@ -78,3 +92,6 @@ INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(3, 0, 'Stauraum allgemein', 'fixed'),
(3, 1, 'Tank', 'fixed'),
(3, 2, 'Extern', 'fixed'); -- not on board
INSERT INTO company (compid, compname, comptype) VALUES
(-3, 'Eigenbau', 3);
+35 -19
View File
@@ -11,18 +11,27 @@ UPDATE user SET userid=0 WHERE userid=1;
INSERT INTO user (userid, login, pass, displayname, role) VALUES
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');
INSERT INTO settings (userid, sno, valint) VALUES
(0, 0, 1), -- Database schema version
(0, 1, 0), -- No vessel assignment to SYSTEM
(1, 1, 0), -- No vessel assignment to user "captain"
(0, 20, 1280), -- Image width limit
(0, 21, 1024); -- Image height limit
INSERT INTO settings (userid, sno, valint, valstr) VALUES
(0, 0, 1, NULL), -- Database schema version
(0, 1, 0, NULL), -- No vessel assignment to SYSTEM
(1, 1, 0, NULL), -- No vessel assignment to user "captain"
(0, 20, 1280, NULL), -- Image width limit
(0, 21, 1024, NULL), -- Image height limit
(0, 4, NULL, '€'), -- Currency symbol
(0, 5, 0, 'http://127.0.0.1:3000'), -- Signal K: to enable set valint=1
(0, 6, 0, 'localhost:2597'); -- NMEA2000 (for future use)
/* setting descriptions */
INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 1, 'vessel id'),
(-1, 2, 'date format'),
(-1, 3, 'user menu'),
(-1, 4, 'currency symbol e.g. €, $, £, ¥'),
(-1, 5, 'signalk connection'),
(-1, 6, 'nmea2000 connection'),
(-1, 7, 'usb backup device serial'),
(-1, 8, 'usb backup partition uuid'),
(-1, 9, 'last backup'),
(-1, 10, 'rows in table'),
(-1, 20, 'maximum image width'),
(-1, 21, 'maximum image height'),
@@ -54,19 +63,23 @@ INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 212, 'fuse filter json');
/* List of lists is always required */
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(0, 0, 'list of lists'),
(0, 1, 'hull type'),
(0, 2, 'company type'),
(0, 3, 'storage type'),
(0, 4, 'equipment category'),
(0, 5, 'provision category'),
(0, 6, 'provision unit'),
(0, 7, 'fuse type'),
(0, 8 , 'unit');
(0, 9, 'box types'),
(0.10, 'fuse blocks'),
(0,11, 'cable types');
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(0, 0, 'list of lists', NULL),
(0, 1, 'hull type', NULL),
(0, 2, 'company type', NULL),
(0, 3, 'storage type', NULL),
(0, 4, 'equipment category', NULL),
(0, 5, 'provision category', NULL),
(0, 6, 'provision unit', NULL),
(0, 7, 'fuse type', NULL),
(0, 8, 'unit', NULL),
(0, 9, 'box types', NULL),
(0, 10, 'fuse blocks', NULL),
(0, 11, 'cable types', NULL),
(0, 12, 'cable desc. technical', NULL),
(0, 13, 'inventory category', NULL),
(0, 14, 'BBN vessel.data fields', 'locked'),
(0, 15, 'measurement category', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 1, 'Supplier', 'fixed'),
@@ -78,3 +91,6 @@ INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(3, 0, 'Generic storage', 'fixed'),
(3, 1, 'Tank', 'fixed'),
(3, 2, 'External', 'fixed');
INSERT INTO company (compid, compname, comptype) VALUES
(-3, 'Custom built', 3);
+44
View File
@@ -85,6 +85,50 @@ INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(9, 3, 'Sortimentskasten'),
(9, 4, 'Werkzeugkiste');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(10, 1, 'Kabel-Inline'),
(10, 2, 'BlueSea innen'),
(10, 3, 'Bluesea außen'),
(10, 4, 'Panel 1 (STV 103)'),
(10, 5, 'Panel 2 (STV 108)'),
(10, 6, 'Reihenklemme 1'),
(10, 7, 'Reihenklemme 2');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(11, 1, 'Einzelader'),
(11, 2, 'Steuerleitung'),
(11, 3, 'Datenkabel'),
(11, 4, 'Netzwerkkabel'),
(11, 5, 'Koaxialkabel'),
(11, 6, 'Antennenkabel'),
(11, 7, 'Lautsprecherkabel'),
(11, 8, 'Mikrofonkabel'),
(11, 9, 'Batteriekabel'),
(11, 10, 'Solarkabel'),
(11, 11, 'Gummileitung'),
(11, 12, 'Flachbandkabel'),
(11, 13, 'Telefonkabel'),
(11, 14, 'NMEA-Kabel'),
(11, 15, 'CAN-Bus-Kabel'),
(11, 16, 'USB-Kabel');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(12, 1, 'H05V-K'),
(12, 2, 'H07V-K'),
(12, 3, 'H05VV-F'),
(12, 4, 'H07RN-F'),
(12, 5, 'LiYY'),
(12, 6, 'LiYCY'),
(12, 7, 'LiYCY-TP'),
(12, 8, 'Cat 5e'),
(12, 9, 'Cat 6'),
(12, 10, 'RG-58'),
(12, 11, 'RG-213'),
(12, 12, 'RG-316'),
(12, 13, 'H-155'),
(12, 14, 'Aircell 5'),
(12, 15, 'Aircell 7'),
(12, 16, 'Ecoflex 10');
INSERT INTO storage (sid, vid, sname, stype, x, y, z, remarks) VALUES
(0, 1, 'An Bord', 0, 0, 0, 0, 'Alles wo der Ort nicht spezifiziert werden kann');
+116
View File
@@ -0,0 +1,116 @@
/* Generic data suitable for all kind of boats
* SPDX-License-Identifier: WTFPL
*/
-- minimal vessel
INSERT INTO vessel (vid, vesselname) VALUES (1, 'Generic vessel');
INSERT INTO user (userid, login, pass, displayname, role) VALUES
(2, 'helmsman', '$2y$10$4keuVm.WD/JeRmAqp2h4MeSxxKITsKv2q07XZrxPUuT/V80CTPbje', 'Helmsman', 'helmsman'),
(3, 'sailor', '$2y$10$4keuVm.WD/JeRmAqp2h4MeSxxKITsKv2q07XZrxPUuT/V80CTPbje', 'Sailor', 'sailor');
INSERT INTO settings (userid, sno, valint) VALUES
(2, 1, 1), -- Vessel 1 for helmsman
(3, 1, 1); -- Vessel 1 for sailor
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(1, 1, 'Monohull'),
(1, 2, 'Catamaran'),
(1, 3, 'Trimaran');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(2, 4, 'Service'),
(2, 5, 'Sailmaker'),
(2, 6, 'Marina');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(3, 3, 'Bilge'),
(3, 4, 'Quarter Berth');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(4, 1, 'Hull'),
(4, 2, 'Deck'),
(4, 3, 'Rigging'),
(4, 4, 'Sails'),
(4, 5, 'Engine'),
(4, 6, 'Electrical'),
(4, 7, 'Electronics'),
(4, 8, 'Navigation'),
(4, 9, 'Galley'),
(4, 10, 'Solar'),
(4, 11, 'Safety'),
(4, 12, 'Running Rigging');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(5, 1, 'General'),
(5, 2, 'Drinks'),
(5, 3, 'Sweets'),
(5, 4, 'Tinned Food'),
(5, 5, 'Fresh Food'),
(5, 6, 'Dry Goods'),
(5, 7, 'Freeze-Dried Food'),
(5, 8, 'Savoury Snacks');
INSERT INTO dropdown (ddid, ddval, ddtext, ddshort) VALUES
(6, 1, 'kg', 'kg'),
(6, 2, 'Litre', 'L'),
(6, 3, 'Piece', 'pc'),
(6, 4, 'Pack', 'pk'),
(6, 5, 'Tin', 'tin'),
(6, 6, 'Bottle', 'btl'),
(6, 7, 'Bag', 'bag'),
(6, 8, 'Bar', 'bar'),
(6, 9, 'Jar', 'jar');
INSERT INTO dropdown (ddid, ddval, ddshort, ddtext) VALUES
(8, 1, 'mm', 'Millimetre'),
(8, 2, 'cm', 'Centimetre'),
(8, 3, 'g', 'Gram'),
(8, 4, 'kg', 'Kilogram'),
(8, 5, 'm', 'Metre'),
(8, 6, 'kW', 'Kilowatt'),
(8, 7, 'A', 'Ampere'),
(8, 8, 'L', 'Litre');
-- TODO add inch, feet, ...
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(9, 1, 'Small Plastic Box'),
(9, 2, 'Large Plastic Box'),
(9, 3, 'Parts Organiser'),
(9, 4, 'Toolbox');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(11, 1, 'Single-Core Cable'),
(11, 2, 'Control Cable'),
(11, 3, 'Data Cable'),
(11, 4, 'Network Cable'),
(11, 5, 'Coaxial Cable'),
(11, 6, 'Aerial Cable'),
(11, 7, 'Speaker Cable'),
(11, 8, 'Microphone Cable'),
(11, 9, 'Battery Cable'),
(11, 10, 'Solar Cable'),
(11, 11, 'Rubber Cable'),
(11, 12, 'Ribbon Cable'),
(11, 13, 'Telephone Cable'),
(11, 14, 'NMEA Cable'),
(11, 15, 'CAN Bus Cable'),
(11, 16, 'USB Cable');
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(12, 1, 'H05V-K'),
(12, 2, 'H07V-K'),
(12, 3, 'H05VV-F'),
(12, 4, 'H07RN-F'),
(12, 5, 'LiYY'),
(12, 6, 'LiYCY'),
(12, 7, 'LiYCY-TP'),
(12, 8, 'Cat 5e'),
(12, 9, 'Cat 6'),
(12, 10, 'RG-58'),
(12, 11, 'RG-213'),
(12, 12, 'RG-316'),
(12, 13, 'H-155'),
(12, 14, 'Aircell 5'),
(12, 15, 'Aircell 7'),
(12, 16, 'Ecoflex 10');
+22
View File
@@ -0,0 +1,22 @@
yms (0.2.2-1) unstable; urgency=medium
* native gui: prepared list views for main objects
* added position to equipment
* box improved with dimensions, net weight and price
* experimental signalk integration
* added config for currency symbol support
* database prepared for lazy record locking feature
* some small database improvements
* webgui: some improvements and fixes
* work on native gui: display data lists
* prepare dynamic language support for webgui
* improve image uploading and scaling code
* added date formatting code
-- Thomas Hooge <thomas@hoogi.de> Mon, 21 Sep 2026 19:00:00 +0200
yms (0.2.1-1) unstable; urgency=medium
* Initial Debian packaging.
-- Thomas Hooge <thomas@hoogi.de> Fri, 28 Aug 2026 11:30:00 +0200
Vendored Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_input high yms/db-name || true
db_input high yms/db-user || true
db_input high yms/db-password || true
db_input high yms/webgui || true
db_go
+37
View File
@@ -0,0 +1,37 @@
Source: yms
Section: misc
Priority: optional
Maintainer: Thomas Hooge <thomas@hoogi.de>
Build-Depends:
debhelper-compat (= 13),
gettext
Standards-Version: 4.7.2
Rules-Requires-Root: no
Package: yms
Architecture: all
Depends:
mariadb-server,
python3,
python3-gi,
gir1.2-gtk-3.0,
gir1.2-rsvg-2.0,
python3-mysqldb,
python3-fitz,
python3-bcrypt,
python3-pyudev,
php (>= 8.0),
php-mysql,
php-xml,
gettext,
mupdf-tools
Description: Yacht Management Software
Yacht Management Software (YMS) is an application for managing yachts and
sailboats. It provides a native GTK desktop interface and a web interface.
.
YMS helps manage vessel equipment, inventory, provisions, documents,
maintenance work and tasks. It uses MariaDB for data storage and is
designed to be self-hosted.
.
The software is suitable for private boats, crews, sailing clubs and
boat projects.
Vendored
+2
View File
@@ -0,0 +1,2 @@
README
INSTALL
+36
View File
@@ -0,0 +1,36 @@
# Database
db/*.sql usr/share/yms/db/
# Native GUI
ymsgui.py usr/lib/yms/
yms/*.py usr/lib/yms/yms/
yms/model/*.py usr/lib/yms/yms/model/
yms/view/*.py usr/lib/yms/yms/view/
# GTK UI
yms/ui/* usr/share/yms/ui/
# Web-GUI
webgui/*.php usr/share/yms/webgui/
webgui/globals.inc usr/share/yms/webgui/
webgui/lib/*.inc usr/share/yms/webgui/lib/
webgui/css/* usr/share/yms/webgui/css/
webgui/js/* usr/share/yms/webgui/js/
webgui/img/* usr/share/yms/webgui/img/
webgui/bootstrap usr/share/yms/webgui/
webgui/locale/de_DE/LC_MESSAGES/yms.mo usr/share/yms/webgui/locale/de_DE/LC_MESSAGES/
webgui/sailboat.svg usr/share/yms/webgui/
webgui/config.inc-sample usr/share/yms/
# Shared static data
shapes/* usr/share/yms/shapes/
icons/* usr/share/yms/icons/
# Desktop entry
yms.desktop usr/share/applications/
# Idesktop link file
yms.lnk usr/share/yms/
# Webserver
config/apache/yms.conf /etc/apache2/conf-available/
+1
View File
@@ -0,0 +1 @@
/etc/yms/config.inc /usr/share/yms/webgui/config.inc
+1
View File
@@ -0,0 +1 @@
yms.1
Vendored Executable
+104
View File
@@ -0,0 +1,104 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
detect_webservers()
{
WEB_SERVERS=""
if dpkg-query -W -f='${Status}' apache2 2>/dev/null |
grep -q 'install ok installed'; then
WEB_SERVERS="$WEB_SERVERS apache2"
fi
if dpkg-query -W -f='${Status}' nginx 2>/dev/null |
grep -q 'install ok installed'; then
WEB_SERVERS="$WEB_SERVERS nginx"
fi
if dpkg-query -W -f='${Status}' lighttpd 2>/dev/null |
grep -q 'install ok installed'; then
WEB_SERVERS="$WEB_SERVERS lighttpd"
fi
WEB_SERVERS="${WEB_SERVERS# }"
}
db_get yms/db-name
DB_NAME="$RET"
db_get yms/db-user
DB_USER="$RET"
db_get yms/db-password
DB_PASSWORD="$RET"
echo "Configuring YMS..."
echo "Checking MariaDB database '${DB_NAME}'..."
if mariadb -N -B -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '${DB_NAME}'" | grep -Fxq "${DB_NAME}"; then
echo "Database '${DB_NAME}' already exists."
else
echo "Database '${DB_NAME}' does not exist."
echo "Creating database '${DB_NAME}'..."
mariadb -e "CREATE DATABASE \`${DB_NAME}\`"
echo "Database '${DB_NAME}' created."
echo "Initializing database schema..."
mariadb "${DB_NAME}" < /usr/share/yms/db/mariadb.sql
mariadb "${DB_NAME}" < /usr/share/yms/db/minimal.sql
echo "Database schema initialized."
mariadb -e "CREATE USER IF NOT EXISTS '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASSWORD}'"
mariadb -e "GRANT SELECT, INSERT, UPDATE, DELETE ON \`${DB_NAME}\`.* TO '${DB_USER}'@'localhost'"
fi
echo "Initializing document storage..."
if ! getent group yms >/dev/null; then
addgroup --system yms
fi
if ! id -nG www-data | tr ' ' '\n' | grep -qx yms; then
adduser www-data yms
fi
mkdir -p /var/lib/yms/thumb
chown -R www-data:yms /var/lib/yms
db_get yms/webgui
if [ "$RET" = "true" ]; then
detect_webservers
case "$WEB_SERVERS" in
"")
echo "No supported webserver installed."
;;
apache2)
echo "Apache detected."
a2enconf yms
invoke-rc.d apache2 reload
echo "Web GUI for apache2 enabled."
;;
nginx)
echo "nginx detected."
;;
lighttpd)
echo "lighttpd detected."
;;
*)
echo "Multiple webservers detected: $WEB_SERVERS"
;;
esac
if [ ! -f /etc/yms/config.inc ]; then
# create initial configuration
sed \
-e "s|@DB_USERNAME@|$DB_USER|g" \
-e "s|@DB_PASSWORD@|$DB_PASSWORD|g" \
-e "s|@DB_SCHEMA@|$DB_NAME|g" \
/usr/share/yms/config.inc-sample \
> /etc/yms/config.inc
chmod 0640 /etc/yms/config.inc
chown root:www-data /etc/yms/config.inc
fi
fi
exit 0
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
case "$1" in
remove|purge)
db_input high yms/remove-info || true
db_go || true
;;
esac
exit 0
Vendored Executable
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/make -f
# Standard Debian build
%:
dh $@
# No build via Makefile
override_dh_auto_build:
# Generate translation and install generated files
override_dh_install:
mkdir -p debian/yms/usr/share/locale/de/LC_MESSAGES
msgfmt locale/de.po -o debian/yms/usr/share/locale/de/LC_MESSAGES/ymsgui.mo
install -D -m 0644 icons/yms.svg debian/yms/usr/share/icons/hicolor/scalable/apps/yms.svg
install -D -m 0644 icons/yms48.png debian/yms/usr/share/icons/hicolor/48x48/apps/yms.png
install -D -m 0644 icons/yms64.png debian/yms/usr/share/icons/hicolor/64x64/apps/yms.png
install -D -m 0755 debian/yms-launcher debian/yms/usr/bin/yms
dh_install
sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/applications/yms.desktop
sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/yms/yms.lnk
# Installation is handled by debian/install
override_dh_auto_install:
override_dh_installdebconf:
dh_installdebconf
+1
View File
@@ -0,0 +1 @@
3.0 (quilt)
+34
View File
@@ -0,0 +1,34 @@
Template: yms/db-name
Type: string
Default: yms
Description: Database name:
Please enter the name of the MariaDB database used by YMS.
Template: yms/db-user
Type: string
Default: ymsweb
Description: Web GUI database user:
Please enter the MariaDB user used by the YMS web interface.
Template: yms/db-password
Type: password
Description: Web GUI database password:
Please enter the password for the YMS web interface database user.
Template: yms/webgui
Type: boolean
Default: false
Description: Enable the YMS web interface?
The YMS package includes a web interface that can be served
by a web server.
.
Do you want to enable the web interface?
Template: yms/remove-info
Type: note
Description: YMS document storage was not removed
The YMS package has been removed, but the document storage
remains on the system.
.
The directory /var/lib/yms and its contents have not been
deleted.
Vendored Executable
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/bin/python3 /usr/lib/yms/ymsgui.py "$@"
+18 -7
View File
@@ -15,6 +15,13 @@ SOURCEDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
if [ "$1" = "uninstall" ]; then
echo "Uninstalling YMS..."
if [ "$(id -u)" -ne 0 ]; then
echo "Error: this script must be run as root."
echo "Please use:"
echo " sudo $0"
exit 1
fi
rm -f "${BINDIR}/yms"
rm -rf "${LIBDIR}"
rm -rf "${SHAREDIR}"
@@ -60,15 +67,17 @@ rm -rf "${LIBDIR}/yms/ui"
# Static resources
install -d "${SHAREDIR}"
install -d "${SHAREDIR}/ui"
install -m 0644 \
"${SOURCEDIR}/yms/ui/main.ui" \
"${SHAREDIR}/ui/main.ui"
cp -a \
"${SOURCEDIR}/yms/ui/." \
"${SHAREDIR}/ui/"
cp -a \
"${SOURCEDIR}/shapes/." \
"${SHAREDIR}/shapes/"
install -m 0644 \
sed "s#@PREFIX@#${PREFIX}#g" \
"${SOURCEDIR}/yms.lnk" \
"${SHAREDIR}/yms.lnk"
> "${SHAREDIR}/yms.lnk"
chmod 0644 "${SHAREDIR}/yms.lnk"
chown -R root:root ${SHAREDIR}
# Documentation
echo "Installing documentation..."
@@ -117,9 +126,11 @@ chmod 0755 "${BINDIR}/yms"
echo "Installing desktop entry..."
install -d "${DESKTOPDIR}"
install -m 0644 \
sed "s#@PREFIX@#${PREFIX}#g" \
"${SOURCEDIR}/yms.desktop" \
"${DESKTOPDIR}/yms.desktop"
> "${DESKTOPDIR}/yms.desktop"
chmod 0644 "${DESKTOPDIR}/yms.desktop"
# TODO webgui? or separately?
+1196 -55
View File
File diff suppressed because it is too large Load Diff
+46 -7
View File
@@ -14,6 +14,7 @@ There can be a difference because not all items have a weight entered
*/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Boxes');
@@ -30,7 +31,7 @@ foreach ($sth->fetchAll() as $row) {
$opt_storage[$row['sid']] = $row['sname'];
}
$opt_boxtype = db_get_options(9);
$opt_boxtype = db_get_options(DD_BOX_TYPE);
// ========== ACTIONS START ===================================================
@@ -59,7 +60,12 @@ switch ($submit = form_get_action()) {
$p[':label'] = gpc_get_string($_POST, 'label');
$p[':content'] = gpc_get_string($_POST, 'content');
$p[':color'] = gpc_get_color($_POST, 'color');
$p[':wx'] = gpc_get_int($_POST, 'wx');
$p[':wy'] = gpc_get_int($_POST, 'wy');
$p[':wz'] = gpc_get_int($_POST, 'wz');
$p[':weight'] = min(gpc_get_float($_POST, 'weight'), 99.99);
$p[':weight_net'] = min(gpc_get_float($_POST, 'weight_net'), 99.99);
$p[':price'] = gpc_get_currency($_POST, 'price');
$p[':sid'] = gpc_get_uint($_POST, 'sid');
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
db_exec_update('box', $p, 'boxid');
@@ -116,9 +122,6 @@ foreach ($res as $row) {
echo "</td>\n";
echo "</tr>\n";
}
// Table summary
$numrows = count($res);
table_rec_summary($i, $numrows, $numrows, 5);
echo "</table>\n";
form_add_button('box.php');
@@ -162,7 +165,8 @@ foreach ($opt_storage as $k => $v) {
elseif ($action == ACT_VIEW):
// ========== VARIANT: view single record =====================================
$sql = "SELECT boxtype, label, content, box.color, weight, box.remarks, box.sid, sname "
$sql = "SELECT boxtype, label, content, box.color, weight, weight_net, price, "
. "box.wx, box.wy, box.wz, box.sid, box.remarks, sname "
. "FROM box LEFT JOIN storage USING (sid) "
. "WHERE boxid=?";
$sth = $pdo->prepare($sql);
@@ -180,7 +184,11 @@ echo '<table class="table">', "\n";
echo '<tr><th style="width:20%">', _('Box type'),"</th><td>", ($opt_boxtype[$box->boxtype] ?? ''), "</td></tr>\n";
echo '<tr><th>', _('Content'),"</th><td>", $box->content, "</td></tr>\n";
echo '<tr><th>', _('Color'), '</th><td>', format_color($box->color), "</td></tr>\n";
echo '<tr><th>', _('Dimensions'), '</th><td>', format_measurement(3, 'mm', $box->wx, $box->wy, $box->wz), "</td></tr>\n";
# TODO also show sum of content weights for comparison
echo '<tr><th>', _('Weight'), '</th><td>', format_float($box->weight, 2, 'kg'), "</td></tr>\n";
echo '<tr><th>', _('Empty&nbsp;Weight'), '</th><td>', format_float($box->weight_net, 2, 'kg'), "</td></tr>\n";
echo '<tr><th>', _('Price'),"</th><td>", format_currency($box->price), "</td></tr>\n";
echo '<tr><th>', _('Storage'),"</th><td>", $box->sname, '&nbsp;';
echo '<a title="', _('View'), '" href="storage.php?f=view&id=', $box->sid, '"><i class="bi-eye"></i></a>';
echo "</td></tr>\n";
@@ -275,10 +283,13 @@ if ($res) {
echo '<p>', _('Box is empty'), "</p>\n";
}
# TODO provisions in box
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================
$sql = "SELECT boxtype, label, content, color, weight, sid, remarks "
$sql = "SELECT boxtype, label, content, color, weight, weight_net, price, "
. "sid, wx, wy, wz, remarks "
. "FROM box "
. "WHERE boxid=?";
$sth = $pdo->prepare($sql);
@@ -304,14 +315,42 @@ echo '<h2>', _('Edit Box'), "</h2>\n";
<label for="color"><?=_('Color')?></label>
<input type="color" class="form-control" id="color" name="color" value="#<?=$box->color ?>">
</div>
<div class="mb-3">
<label class="form-label"><?=_('Dimensions (L × W × H)')?></label>
<div class="input-group">
<input type="number" class="form-control" name="wx"
value="<?=$box->wx;?>" min="0" step="1"
aria-label="<?=_('Length')?>">
<span class="input-group-text">×</span>
<input type="number" class="form-control" name="wy"
value="<?=$box->wy;?>" min="0" step="1"
aria-label="<?=_('Width')?>">
<span class="input-group-text">×</span>
<input type="number" class="form-control" name="wz"
value="<?=$box->wz;?>" min="0" step="1"
aria-label="<?=_('Height')?>">
<span class="input-group-text">mm</span>
</div>
<div class="form-text">
<?=_('Length × Width × Height')?>
</div>
</div>
<div class="mb-3">
<label for="weight" class="form-label"><?=_('Weight, kg')?></label>
<input type="text" class="form-control" id="weight" name="weight" value="<?=format_float($box->weight); ?>">
</div>
<div class="mb-3">
<label for="weight_net" class="form-label"><?=_('Weight net, kg')?></label>
<input type="text" class="form-control" id="weight_net" name="weight_net" value="<?=format_float($box->weight_net); ?>">
</div>
<div class="mb-3">
<label for="price" class="form-label"><?=sprintf(_('Price, %s'), $g_lconv['currency_symbol']); ?></label>
<input type="text" class="form-control" id="price" name="price" value="<?=format_float($box->price) ?>">
</div>
<?php form_create_select('sid', _('Storage'), $opt_storage, $box->sid); ?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($box->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($box->remarks)?></textarea>
</div>
<?php
+15 -10
View File
@@ -7,13 +7,15 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Cables');
$id = gpc_get_int($_REQUEST, 'id', 0);
$opt_cabletype = db_get_options(11);
$opt_cabletype = db_get_options(DD_CABLE_TYPE);
$opt_techname = db_get_options(DD_CABLE_TECHNAME);
$opt_cablecond = db_load_enum('cable', 'cablecond', true, true);
// ========== ACTIONS START ===================================================
@@ -52,6 +54,7 @@ switch ($submit = form_get_action()) {
$p[':cableid'] = $id;
$p[':cablename'] = gpc_get_string($_POST, 'cablename');
$p[':cabletype'] = gpc_get_int($_POST, 'cabletype');
$p[':techname'] = gpc_get_int($_POST, 'techname');
$p[':length'] = gpc_get_float($_POST, 'length');
$p[':conductors'] = gpc_get_int($_POST, 'conductors');
$p[':xsection'] = gpc_get_float($_POST, 'xsection');
@@ -146,14 +149,14 @@ foreach ($res as $row) {
echo "<td>", $row['length'], "m</td>\n";
echo "<td>", $row['xsection'], "mm²</td>\n";
echo "<td>", format_color($row['color']), "</td>\n";
echo "<td>", $row['condition'], "</td>\n";
echo "<td>", get_enum($row['cablecond']), "</td>\n";
echo "<td>";
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['cableid'], '"><i class="bi-pencil"></i></a>', "\n";
echo "</td>\n";
echo "</tr>\n";
}
// Table summary
table_rec_summary($i0, $i, $numrows, 6);
table_rec_summary(1, $i, $i, 9);
echo "</table>\n";
form_add_button($g_scriptname);
@@ -177,8 +180,8 @@ echo '<h2>', _('Add Cable'), "</h2>\n";
form_create_select('cabletype', _('Type'), $g_opt_none + $opt_cabletype);
?>
<div class="mb-3">
<label for="note" class="form-label"><?=_('Conductors')?></label>
<input type="text" class="form-control" id="conductors" name="conductors">
<label for="note" class="form-label"><?=_('Number of conductors')?></label>
<input type="number" class="form-control" id="conductors" name="conductors">
</div>
<div class="mb-3">
<label for="note" class="form-label"><?=_('Cross section, mm²')?></label>
@@ -191,7 +194,7 @@ echo "</form>\n";
elseif ($action == ACT_VIEW):
// ========== VARIANT: view single record =====================================
$sql = "SELECT cablename, cabletype, length, conductors, diameter, xsection,"
$sql = "SELECT cablename, cabletype, techname, length, conductors, diameter, xsection,"
. " weight, color, supplier, manufacturer, cablecond, remarks "
. "FROM cable "
. "WHERE cableid=?";
@@ -204,6 +207,7 @@ echo '<h2>', _('View cable'), "</h2>\n";
echo '<table class="table">', "\n";
echo '<tr><th style="width:20%">', _('Cable'),"</th><td>", $cable->cablename, "</td></tr>\n";
echo '<tr><th>', _('Type'),"</th><td>", $opt_cabletype[$cable->cabletype], "</td></tr>\n";
echo '<tr><th>', _('Techname'),"</th><td>", $opt_techname[$cable->techname], "</td></tr>\n";
echo '<tr><th>', _('Length'),"</th><td>", format_float($cable->length, 1, 'm'), "</td></tr>\n";
echo '<tr><th>', _('Conductors'),"</th><td>", $cable->conductors, "</td></tr>\n";
echo '<tr><th>', _('Diameter'),"</th><td>", format_float($cable->diameter, 1, 'mm'), "</td></tr>\n";
@@ -219,7 +223,7 @@ form_view_buttons($g_scriptname, $id);
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================
$sql = "SELECT cablename, cabletype, length, conductors, diameter, xsection,"
$sql = "SELECT cablename, cabletype, techname, length, conductors, diameter, xsection,"
. " weight, color, supplier, manufacturer, cablecond, remarks "
. "FROM cable "
. "WHERE cableid=?";
@@ -237,14 +241,15 @@ echo '<h2>', _('Edit cable'), "</h2>\n";
</div>
<?php
form_create_select('cabletype', _('Type'), $g_opt_none + $opt_cabletype, $cable->cabletype);
form_create_select('techname', _('Techname'), $g_opt_none + $opt_techname, $cable->techname);
?>
<div class="mb-3">
<label for="note" class="form-label"><?=_('Length, m')?></label>
<input type="text" class="form-control" id="length" name="length" value="<?=format_float($cable->length, 1);?>">
</div>
<div class="mb-3">
<label for="note" class="form-label"><?=_('Conductors')?></label>
<input type="text" class="form-control" id="conductors" name="conductors" value="<?=$cable->conductors;?>">
<label for="note" class="form-label"><?=_('Number of conductors')?></label>
<input type="number" class="form-control" id="conductors" name="conductors" value="<?=$cable->conductors;?>">
</div>
<div class="mb-3">
<label for="note" class="form-label"><?=_('Diameter, mm')?></label>
@@ -267,7 +272,7 @@ form_create_select('cablecond', _('Condition'), $opt_cablecond, $cable->cablecon
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($cable->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($cable->remarks)?></textarea>
</div>
<?php
+1
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Checklists');
+6 -5
View File
@@ -7,12 +7,13 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle=_('Company');
$id = gpc_get_int($_REQUEST, 'id', 0);
$opt_comptype = db_get_options(2);
$opt_comptype = db_get_options(DD_COMPANY_TYPE);
// ========== ACTIONS START ===================================================
@@ -298,10 +299,10 @@ echo "</table>\n";
form_view_buttons($g_scriptname, $id);
// show referenced equipment
$sql = "SELECT eid, ename FROM equipment WHERE supplier=:id OR manufacturer=:id";
// show referenced equipment for current vessel
$sql = "SELECT eid, ename FROM equipment WHERE vid=:vid AND (supplier=:id OR manufacturer=:id)";
$sth = $pdo->prepare($sql);
$sth->execute([':id' => $id]);
$sth->execute([':vid' => $user->vid, ':id' => $id]);
if ($sth->rowCount() > 0) {
echo '<p>', _('Referenced in equipment'), ":</p>\n";
echo "<ul>\n";
@@ -418,7 +419,7 @@ form_create_select('comptype2', _('Secondary company type'), $g_opt_none + $opt_
</div>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($company->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($company->remarks)?></textarea>
</div>
<?php
$opt_flags = db_load_enum('company', 'flags', true, true, false);
+5 -6
View File
@@ -17,9 +17,9 @@ define('APP_ILLUSTRATION', 'sailboat.svg');
// database connection
$g_db_host = 'localhost';
$g_db_username = 'ymsweb';
$g_db_password = 'changeme!';
$g_db_schema = 'yms';
$g_db_username = '@DB_USERNAME@';
$g_db_password = '@DB_PASSWORD@';
$g_db_schema = '@DB_SCHEMA@';
// mail settings
$g_mail_enable = FALSE;
@@ -29,13 +29,13 @@ $g_mailto_webmaster = 'webmaster@example.com';
// localization
$g_textdomain = 'yms';
$g_timezone = 'Europe/Berlin';
$g_locale = 'de_DE.UTF-8';
$g_locale = 'en_GB.UTF-8';
// vessel base shapes directory
$g_shapedir = '/usr/local/share/yms/shapes';
// documents and images
$g_doc_basepath = '/var/local/yms';
$g_doc_basepath = '/var/local/lib/yms';
$g_doc_maxsize = 1024*1024*16; // 16 MB, please adjust php.ini accordingly!
$g_doc_typemap = array(
'generic' => 'doc',
@@ -50,4 +50,3 @@ $g_storage_limit = 1024; // MB
$g_thumb_size = 120;
$g_rows_pp = 10; // pagination limit
+1
View File
@@ -18,6 +18,7 @@
*/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
require 'lib/fileutils.inc';
+20 -4
View File
@@ -15,6 +15,7 @@ doctype icons
*/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
require 'lib/fileutils.inc';
@@ -89,7 +90,21 @@ switch ($submit = form_get_action()) {
$g_warning->Add(sprintf(_("Mimetype mismatch: '%s'."), $file_type));
}
// TODO for images check maximum size and scale down if needed
// for images check maximum size and scale down if needed
if (($file_mimetype == 'image/png') or ($file_mimetype == 'image/jpeg')) {
if (isset($_POST['noscale'])) {
$g_message->Add(_('Image has not been scaled down'));
} else {
// scale down if dimensions exceed limits
$img_maxx= $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
$img_maxy= $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
[$width, $height] = getimagesize($file_tmp);
$factor = min($img_maxx / $width, $img_maxy / $height);
if ($factor < 1) {
image_scale($file_tmp, $file_mimetype, $width, $height, $factor);
}
}
}
// ok let's go
$file_hash = md5_file($file_tmp);
@@ -138,6 +153,7 @@ switch ($submit = form_get_action()) {
$id = db_exec_insert('document', $p);
$file_techname = sprintf('%s/%s-%06d.%s', $g_doc_basepath, $prefix, $id, $file_ext);
move_uploaded_file($file_tmp, $file_techname);
chmod($file_techname, 0640);
$action = ACT_VIEW;
break;
@@ -577,9 +593,9 @@ foreach ($sth->fetchAll() as $row) {
$eids = array();
$sql = "SELECT drid, reftype, refid, ename AS target "
. "FROM docref INNER JOIN equipment ON (docref.reftype='equipment' AND docref.refid=equipment.eid) "
. "WHERE docid=?";
. "WHERE docid=? AND vid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$sth->execute([$id, $user->vid]);
foreach ($sth->fetchAll() as $row) {
$references[] = $row;
$eids[] = $row['refid'];
@@ -780,7 +796,7 @@ if ($document->mimetype == 'application/pdf') {
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($document->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($document->remarks)?></textarea>
</div>
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
+9 -2
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Lists');
@@ -83,6 +84,8 @@ switch ($submit = form_get_action()) {
break;
case 'update':
# changing ddval would need to update all dependent data
# so this is not intended here!
$p[':ddtext'] = gpc_get_string($_POST, 'ddtext');
$p[':ddshort'] = gpc_get_string($_POST, 'ddshort');
$p[':color'] = gpc_get_color($_POST, 'color');
@@ -131,7 +134,7 @@ $sth = $pdo->query($sql);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) {
$num[$row[0]] = $row[1];
}
$sql = "SELECT ddval, ddtext FROM dropdown WHERE ddid=0 AND ddval>0";
$sql = "SELECT ddval, ddtext, flags FROM dropdown WHERE ddid=0 AND ddval>0";
$sth = $pdo->query($sql);
echo "<h1>$pagetitle</h1>\n";
@@ -159,7 +162,11 @@ foreach ($sth->fetchAll() as $row) {
echo '<td>', $num[$row['ddval']] ?? 0, '</td>';
// form_action_buttons($g_scriptname, $row['ddval']);
echo "<td>";
echo '<a class="text-nowrap" title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['ddval'], '"><i class="bi bi-pencil ms-2"></i></a>';
if ($row['flags'] == 'locked') {
echo _('Locked');
} else {
echo '<a class="text-nowrap" title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['ddval'], '"><i class="bi bi-pencil ms-2"></i></a>';
}
echo "</td>\n";
echo "</tr>\n";
}
+80 -8
View File
@@ -7,8 +7,10 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
require 'lib/fileutils.inc';
require 'lib/signalk.inc';
$pagetitle = _('Equipment');
@@ -16,8 +18,8 @@ $id = gpc_get_int($_REQUEST, 'id', 0);
$opt_supplier = db_get_opt_supp($g_opt_unknown);
$opt_manufacturer = db_get_opt_manuf($g_opt_unknown);
$opt_ecat = db_get_options(4); // Equipment categories
$opt_unit = db_get_options(8);
$opt_ecat = db_get_options(DD_EQUIPMENT_CATEGORY);
$opt_unit = db_get_options(DD_UNIT);
// ========== ACTIONS START ===================================================
@@ -73,6 +75,9 @@ switch ($submit = form_get_action()) {
if ($p[':manufacturer'] <= 0) $p[':manufacturer'] = NULL;
$p[':ecat'] = gpc_get_int($_POST, 'category');
if ($p[':ecat'] <= 0) $p[':ecat'] = NULL;
$p[':x'] = gpc_get_uint($_POST, 'x');
$p[':y'] = gpc_get_int($_POST, 'y');
$p[':z'] = gpc_get_int($_POST, 'z');
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
$allowed = db_load_enum('equipment', 'flags');
$p[':flags'] = gpc_get_set($_POST, 'flags', $allowed, true, NULL);
@@ -197,6 +202,7 @@ switch ($submit = form_get_action()) {
$docid = $pdo->lastInsertId();
$file_techname = file_get_docname($docid, 'picture', $file_ext);
move_uploaded_file($file_tmp, $g_doc_basepath . '/' . $file_techname);
chmod($g_doc_basepath . '/' . $file_techname, 0640);
} else {
// A document record definitely exists here, now just
// connect it to the selected equipment
@@ -393,7 +399,7 @@ foreach ($res as $row) {
echo "<td>", $row['model'], "</td>\n";
echo "<td>", $row['serial'], "</td>\n";
echo "<td>", $age, "</td>\n";
echo "<td>", $row['remarks'], "</td>\n";
echo "<td>", h($row['remarks'], br:true), "</td>\n";
// Edit current record button
echo "<td>";
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['eid'], '"><i class="bi-pencil"></i></a>', "\n";
@@ -441,7 +447,8 @@ elseif ($action == ACT_VIEW):
// ========== VARIANT: view single record =====================================
$sql = "SELECT eid, ename, model, serial, purchdate, price, weight, "
. " supplier, manufacturer, ecat, shortname, remarks, flags "
. "supplier, manufacturer, ecat, shortname, x, y, z, flags, "
. "remarks "
. "FROM equipment "
. "WHERE eid=?";
$sth = $pdo->prepare($sql);
@@ -463,11 +470,29 @@ echo '<tr><th>', _('Model'),"</th><td>", h($equipment->model), "</td></tr>\n";
echo '<tr><th>', _('Serial'),"</th><td>", h($equipment->serial), "</td></tr>\n";
echo '<tr><th>', _('Weight'),"</th><td>", format_float($equipment->weight, 2, 'kg'), "</td></tr>\n";
echo '<tr><th>', _('Price'),"</th><td>", format_currency($equipment->price), "</td></tr>\n";
echo '<tr><th>', _('Purchase date'),"</th><td>", $equipment->purchdate, "</td></tr>\n";
echo '<tr><th>', _('Purchase date'),"</th><td>", format_date($equipment->purchdate), "</td></tr>\n";
echo '<tr><th>', _('Supplier'),"</th><td>", $equipment->supplier ? $opt_supplier[$equipment->supplier] : 'n/a', "</td></tr>\n";
echo '<tr><th>', _('Category'),"</th><td>", $opt_ecat[$equipment->ecat], "</td></tr>\n";
if (!empty($equipment->x)) {
echo '<tr><th>', _('Location (x, y, z)'),"</th><td>(", $equipment->x, ', ', $equipment->y, ', ', $equipment->z, ")</td></tr>\n";
}
echo '<tr><th>', _('Remarks'),"</th><td>", h($equipment->remarks, br:true), "</td></tr>\n";
echo '<tr><th>', _('Flags'),"</th><td>", $equipment->flags, "</td></tr>\n";
// Custom properties
$sql = "SELECT keyname, valstr, valint FROM property WHERE objtype='equip' AND objid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
foreach ($sth->fetchAll() as $row) {
echo "<tr><th>{$row['keyname']}</th><td>";
if (isset($row['valstr'])) {
echo $row['valstr'];
} else {
echo $row['valint'];
}
echo "</td></tr>\n";
}
echo "</table>\n";
echo '</div>'; // Column break
@@ -614,6 +639,39 @@ echo '<a href="measurement.php?f=add&id=', $id, '" class="btn btn-primary" role=
echo _('Add measurement'), "</a>\n";
echo "</div>\n";
// Signal-K Integration
$res = $pdo->query("SELECT valint, valstr FROM settings WHERE userid=0 AND sno=5");
$sk_active = false;
$sk_url = NULL;
if ($res !== false) {
$row = $res->fetch(PDO::FETCH_ASSOC);
if ($row !== false && $row['valint'] == 1
&& !empty($row['valstr'])
&& filter_var($settings['valstr'], FILTER_VALIDATE_URL))
{
$sk_active = true;
$sk_url = rtrim($row['valstr'], '/');
}
}
if ($sk_active) {
// TODO this ist just experimental
$sql = "SELECT skpath FROM signalk WHERE vid=? AND objid=? AND objtype='equipment'";
$sth = $pdo->prepare($sql);
$sth->execute([$user->vid, $id]);
if ($sth->rowCount() > 0) {
echo '<h3>', _('Signal K data'), "</h3>";
$skpath = $sth->fetchColumn();
// REST Example:
// GET http://127.0.0.1:3000/signalk/v1/api/vessels/self/propulsion/mainEngine/runTime
try {
$data = signalk_get($url, $skpath);
print_r($data);
} catch (Exception $e) {
echo "<p>signalk-timeout!</p>\n";
}
}
}
// Spare parts
echo '<h3>', _('Spare parts'), "</h3>";
@@ -660,8 +718,8 @@ foreach ($sth->fetchAll() as $row) {
$supplier[$row['compid']] = $row['compname'];
}
$sql = "SELECT eid, ename, model, serial, weight, price, purchdate,"
. " supplier, manufacturer, ecat, shortname, remarks, flags "
$sql = "SELECT eid, ename, model, serial, weight, price, purchdate, "
. "supplier, manufacturer, ecat, shortname, x, y, z, remarks, flags "
. "FROM equipment "
. "WHERE eid=?";
$sth = $pdo->prepare($sql);
@@ -704,9 +762,23 @@ $equipment = $sth->fetch(PDO::FETCH_OBJ);
form_create_select('supplier', _('Supplier'), $opt_supplier, $equipment->supplier);
form_create_select('category', _('Category'), $g_opt_unknown + $opt_ecat, $equipment->ecat);
?>
<div class="mb-3">
<label class="form-label"><?=_('Position (x, y, z) in mm')?></label>
<div class="row">
<div class="col">
<input type="number" class="form-control" id="x" name="x" min="0" value="<?=$equipment->x ?>">
</div>
<div class="col">
<input type="number" class="form-control" id="y" name="y" value="<?=$equipment->y ?>">
</div>
<div class="col">
<input type="number" class="form-control" id="z" name="z" value="<?=$equipment->z ?>">
</div>
</div>
</div>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($equipment->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($equipment->remarks, br:false)?></textarea>
</div>
<?php
$opt_flags = db_load_enum('equipment', 'flags', true, true, false);
+25 -9
View File
@@ -7,14 +7,15 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Fuses');
$id = gpc_get_int($_REQUEST, 'id', 0);
$opt_ftype = db_get_options(7);
$opt_location = db_get_options(10);
$opt_ftype = db_get_options(DD_FUSE_TYPE);
$opt_location = db_get_options(DD_FUSE_BLOCK);
// ========== ACTIONS START ===================================================
@@ -57,11 +58,10 @@ switch ($submit = form_get_action()) {
$p[':current'] = gpc_get_float($_POST, 'current');
$p[':cableid'] = gpc_get_int($_POST, 'cableid');
$p[':eid'] = gpc_get_int($_POST, 'id');
$p[':weight'] = min(gpc_get_float($_POST, 'weight'), 9.99); // limit max value
$p[':location'] = gpc_get_int($_POST, 'location');
$p[':description'] = gpc_get_string($_POST, 'description');
$p[':remarks'] = gpc_get_string($_POST, 'remarks');
db_exec_update('tag', $p, 'tagid');
db_exec_update('fuse', $p, 'fuseid');
$action = ACT_VIEW;
break;
@@ -94,7 +94,7 @@ if ($action == ACT_DEFAULT):
// ========== VARIANT: default behavior =======================================
// lookup tables
$opt_ftype_short = db_get_options(7, '', true);
$opt_ftype_short = db_get_options(DD_FUSE_TYPE, '', true);
// load filter from db
$flt = db_get_filter($user->id, 212);
@@ -219,9 +219,9 @@ elseif ($action == ACT_VIEW):
$sql = "SELECT fnumber, ftype, current, cableid, eid, location, description, remarks "
. "FROM fuse "
. "WHERE fuseid=?";
. "WHERE vid=? AND fuseid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$sth->execute([$user->vid, $id]);
$fuse = $sth->fetch(PDO::FETCH_OBJ);
echo '<h2>', _('View fuse'), "</h2>\n";
@@ -242,7 +242,10 @@ form_view_buttons($g_scriptname, $id);
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================
$sql = "SELECT fnumber, description "
$opt_cable = db_get_opt_cable($user->vid);
$opt_equipment = db_get_opt_equip($user->vid);
$sql = "SELECT fnumber, ftype, current, cableid, eid, location, description, remarks "
. "FROM fuse "
. "WHERE fuseid=?";
$sth = $pdo->prepare($sql);
@@ -254,13 +257,26 @@ echo '<h2>', _('Edit fuse'), "</h2>\n";
<form method="post" action="<?=$g_scriptname?>">
<input type="hidden" name="id" value="<?=$id?>">
<div class="mb-3">
<label for="mname" class="form-label"><?=pgettext('number', 'Number')?></label>
<label for="fnumber" class="form-label"><?=_('Fuse number')?></label>
<input type="text" class="form-control" id="fnumber" name="fnumber" value="<?=$fuse->fnumber ?>">
</div>
<div class="mb-3">
<label for="note" class="form-label"><?=_('Description')?></label>
<input type="text" class="form-control" id="description" name="description" value="<?=h($fuse->description)?>">
</div>
<div class="mb-3">
<label for="current" class="form-label"><?=_('Current')?></label>
<input type="text" class="form-control" id="current" name="current" value="<?=format_float($fuse->current) ?>">
</div>
<?php
form_create_select('location', _('Location'), $g_opt_none + $opt_location, $fuse->location);
form_create_select('cableid', _('Cable'), $g_opt_none + $opt_cable, $fuse->cableid);
form_create_select('eid', _('Equipment'), $g_opt_none + $opt_equipment, $fuse->eid);
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($fuse->remarks)?></textarea>
</div>
<?php
form_edit_buttons($g_scriptname, $id);
+104 -15
View File
@@ -14,6 +14,8 @@
* 0.1.0 2024-03-12 Started development tho
* 0.2.0 2026-08-18 First public release tho
* 0.2.1 2026-08-28 Foreign keys, bugfixes and output sanitation tho
* 0.2.2 2026-09-21 Lots of improvements and fixes tho
* 2026-10-01 Dropdown constants for readability tho
*
*/
@@ -46,16 +48,37 @@ define('ROLE_CAPTAIN', 'captain');
define('ROLE_HELMSMAN', 'helmsman');
define('ROLE_SAILOR', 'sailor');
define('DD_HULL_TYPE', 1);
define('DD_COMPANY_TYPE', 2);
define('DD_STORAGE_TYPE', 3);
define('DD_EQUIPMENT_CATEGORY', 4);
define('DD_PROVISION_CATEGORY', 5);
define('DD_PROVISION_UNIT', 6);
define('DD_FUSE_TYPE', 7);
define('DD_UNIT', 8);
define('DD_BOX_TYPE', 9);
define('DD_FUSE_BLOCK', 10);
define('DD_CABLE_TYPE', 11);
define('DD_CABLE_TECHNAME', 12);
define('DD_INVENTORY_CATEGORY', 13);
define('DD_BBN_VESSELDATA', 14);
define('DD_MEASUREMENT_CATEGORY', 15);
// ========== PAGE START CODE =================================================
// global version string
$g_version = 'v0.2.1';
$g_version = 'v0.2.2';
$g_scriptname = basename($_SERVER['SCRIPT_NAME']);
require 'config.inc';
umask(0027); // no rights for world!
// Localization
$lang = get_browser_lang(['de', 'en']);
setlocale(LC_ALL, $g_locale);
$g_lconv = localeconv();
$g_lang = substr($g_locale, 0, 2); // short language identifier
@@ -111,14 +134,37 @@ try {
$sth = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=0");
} catch (PDOException $e) {
if ($e->getCode() == 1146) {
echo '<pre>';
echo 'Settings table not found! Perhaps database is not initialized';
echo '</pre>';
echo "<pre>\n";
echo "Settings table not found! Perhaps database is not initialized?\n";
echo "</pre>\n";
exit(1);
}
}
$g_db_scheme_version = $sth->fetchColumn();
// TODO Check version
$g_db_scheme_required = 1;
// Schema version check
if ($g_db_scheme_version !== $g_db_scheme_required) {
echo "<pre>\n";
echo "Database schema is wrong: detected version $g_db_scheme_version, but required version $g_db_scheme_required!\n";
echo "</pre>\n";
exit(1);
}
// currency symbol is global
$sth = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=4");
$g_currsym = $sth->fetchColumn();
// allowed date formats
$g_opt_datefmt = array(
'Y-m-d' => _('YYYY-MM-DD'), // ISO / international /technical
'd.m.Y' => _('DD.MM.YYYY'), // Germany / Central & Northern Europe
'd/m/Y' => _('DD/MM/YYYY'), // UK / France / Spain / Italy / Australia / NZ
'd-m-Y' => _('DD-MM-YYYY'), // Netherlands / Denmark / Belgium
'd M Y' => _('DD Mon YYYY'), // nautical documents / logbooks / unambiguous
'm.d.Y' => _('MM.DD.YYYY'), // USA
'm/d/Y' => _('MM/DD/YYYY'), // USA
'Y/m/d' => _('YYYY/MM/DD') // Japan / China
);
$user = User::GetInstance(); // There can be only one
if ($g_scriptname != 'login.php') {
@@ -244,6 +290,7 @@ class User {
public $datefmt;
public $rows_pp;
public $menu;
public $language;
private function __construct() {
global $g_rows_pp;
@@ -255,6 +302,7 @@ class User {
$this->datefmt = 'Y-m-d';
$this->rows_pp = $g_rows_pp;
$this->menu = [1, 2, 3, 4, 5, 6];
$this->language = 'en';
}
public static function getInstance() {
@@ -317,13 +365,14 @@ class User {
}
$this->id = $_SESSION['userid'];
$sql = "SELECT displayname, role FROM user WHERE userid=?";
$sql = "SELECT displayname, role, language FROM user WHERE userid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$this->id]);
$row = $sth->fetch();
if ($row) {
$this->displayname = $row['displayname'];
$this->role = $row['role'];
$this->language = $row['language'];
}
}
@@ -945,7 +994,8 @@ function db_get_opt_cable($vid, $default=NULL) {
$list = array();
}
$sql = "SELECT cableid, cablename FROM cable WHERE vid=? ORDER BY cablename";
$sth = $pdo->query($sql);
$sth = $pdo->prepare($sql);
$sth->execute([$vid]);
foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) {
$list[$row[0]] = h($row[1]);
}
@@ -1250,15 +1300,30 @@ function format_currency($val) {
}
function format_date($date) {
// date is string in ISO format
global $user;
// $user->datefmt;
/*'Y-m-d' => _('YYYY-MM-DD'). $curdate->format(' - Y-m-d'),
'Y/m/d' => _('YYYY/MM/DD'). $curdate->format(' - Y/m/d'),
'd.m.Y' => _('DD.MM.YYYY'). $curdate->format(' - d.m.Y'),
'd/m/Y' => _('DD/MM/YYYY'). $curdate->format(' - d/m/Y'),
'm-d-Y' => _('MM/DD/YYYY'). $curdate->format(' - m-d-Y') */
return '';
if (empty($date)) {
return '';
}
$timestamp = strtotime($date);
if ($timestamp === false) {
return '';
}
return date($user->datefmt, $timestamp);
}
function format_datetime($datetime, $seconds=false) {
// datetime is string in ISO format
global $user;
if (empty($datetime)) {
return '';
}
$timestamp = strtotime($datetime);
if ($timestamp === false) {
return '';
}
$timefmt = $seconds ? 'H:i:s' : 'H:i';
return date($user->datefmt. ' ' . $timefmt, $timestamp);
}
function format_color($color) {
@@ -1344,6 +1409,30 @@ function header_location($location, $message=NULL) {
exit;
}
function get_browser_lang($allowed, $default='en') {
$h = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '';
if (!$h) {
return $def;
}
$langs = [];
foreach (explode(',', $h) as $p) {
$p = explode(';q=', trim($p));
$l = strtolower($p[0]);
$q = isset($p[1]) ? (float) $p[1] : 1.0;
$langs[$l] = $q;
}
arsort($langs);
foreach ($langs as $bl => $q) {
foreach ($allowed as $l) {
$l = strtolower($l);
if ($bl === $l || str_starts_with($bl, $l . '-')) {
return $l;
}
}
}
return $default;
}
function pgettext($context, $msgid) {
// implement missing function
global $g_textdomain;
+56 -10
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
require 'lib/svg.inc';
@@ -80,6 +81,10 @@ switch ($submit = form_get_action()) {
$p[':shapefile'] = NULL;
}
$p[':shipyard'] = gpc_get_int($_POST, 'shipyard');
if ($p[':shipyard'] == '-1') {
$p[':shipyard'] = NULL;
}
$p[':year_built'] = gpc_get_int($_POST, 'year_built');
$p[':sid_default'] = gpc_get_uint($_POST, 'sid');
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
db_exec_update('vessel', $p, 'vid');
@@ -115,7 +120,7 @@ $vid = ($res[0]);
// Get current vessel data
$sql = "SELECT vesselname, model, loa, lwl, beam, draught, draught_min,"
. " displacement, ballast, beltpos_aft, beltpos_bow, shapefile,"
. " shipyard, remarks "
. " shipyard, year_built, remarks "
. "FROM vessel "
. "WHERE vid=?";
$sth = $pdo->prepare($sql);
@@ -161,15 +166,19 @@ echo '<div class="col-1"></div>', "\n";
echo '<div class="col">';
if ($vessel->shipyard && $vessel->shipyard > 0) {
if ($vessel->shipyard == -3) {
echo _('Custom-build');
echo sprintf(_('Custom-build %d'), ($vessel->year_built ?? ''));
} else {
$sql = "SELECT compname FROM company WHERE compid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$vessel->shipyard]);
echo sprintf(_('Built by %s'), $sth->fetchColumn());
// TODO year of build?
echo sprintf(_('Built %d by %s'), ($vessel->year_built ?? ''), $sth->fetchColumn());
}
} else {
if ($vessel->year_built && $vessel->year_built >= 1901) {
echo sprintf(_('Year built %d'), $vessel->year_built);
}
}
if (strlen($vessel->remarks) > 0) {
echo h($vessel->remarks, br:true);
}
@@ -310,7 +319,13 @@ echo substr($xml, strpos($xml, "\n") + 1);
<tr><td><?=_('Lwl')?></td><td><?=format_float($vessel->lwl, 2, 'm')?></td></tr>
<tr><td><?=_('Beam')?></td><td><?=format_float($vessel->beam, 2, 'm')?></td></tr>
<tr><td><?=_('Draught')?></td><td><?=format_float($vessel->draught, 2, 'm')?></td></tr>
<tr><td><?=_('Draught, min.')?></td><td><?=format_float($vessel->draught_min, 2, 'm')?></td></tr>
<?php
if ($vessel->draught_min) {
echo '<tr><td>', _('Draught, min.'), '</td><td>';
format_float($vessel->draught_min, 2, 'm');
echo "</td></tr>\n";
}
?>
<tr><td><?=_('Displacement')?></td><td><?=$vessel->displacement?>&thinsp;kg</td></tr>
<tr><td><?=_('Ballast')?></td><td><?=$vessel->ballast?>&thinsp;kg</td></tr>
<tr><td><?=_('Belt position aft')?></td><td><?=format_float($vessel->beltpos_aft, 2, 'm')?></td></tr>
@@ -336,7 +351,7 @@ if ($user->role == 'captain') {
// Storage: 0 - default, 1 - tank
// $stype = [ 0 => _('Default'), 1 => _('Tank')];
$stype = db_get_options(3);
$stype = db_get_options(DD_STORAGE_TYPE);
$sql = "SELECT stype, COUNT(stype) "
. "FROM storage "
. "WHERE vid=? "
@@ -360,6 +375,8 @@ echo '<tr><td>&nbsp;</td><td>', _('Boxes'), '</td><td>', $sth->fetchColumn(), "<
$sth = $pdo->prepare("SELECT COUNT(*), SUM(weight) FROM equipment WHERE vid=?");
$sth->execute([$user->vid]);
$row = $sth->fetch(PDO::FETCH_NUM);
$weight_equip = $row[1];
echo '<tr><td colspan="3">', _('Equipment') , "</td>";
echo '<tr><td>&nbsp;</td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
echo '<tr><td>&nbsp;</td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
@@ -375,16 +392,41 @@ $sth = $pdo->prepare($sql);
$sth->bindValue(':vid', $user->vid, PDO::PARAM_INT);
$sth->execute();
$row = $sth->fetch(PDO::FETCH_NUM);
$weight_inv = $row[1];
echo '<tr><td colspan="3">', _('Inventory') , "</td>";
echo '<tr><td>&nbsp;</td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
echo '<tr><td>&nbsp;</td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
// Provisions
/*$sql = "SELECT SUM(n), SUM(w) FROM ("
. "SELECT COUNT(*) AS n, SUM(p.weight * p.number) as w FROM provisions AS p JOIN storage USING (sid) WHERE conttype='storage' AND vid=:vid "
. "UNION "
. "SELECT COUNT(*) AS n, SUM(p.weight * p.number) as w FROM provisions AS p JOIN box USING (boxid) JOIN storage ON (box.sid=storage.sid) WHERE conttype='box' AND vid=:vid"
. ") AS x"; */
// only storage assignment at the moment
$sql = "SELECT SUM(n), SUM(w) FROM ("
. "SELECT COUNT(*) AS n, SUM(p.weight * p.number) as w FROM provisions AS p JOIN storage USING (sid) WHERE storage.vid=:vid "
. ") AS x";
$sth = $pdo->prepare($sql);
$sth->bindValue(':vid', $user->vid, PDO::PARAM_INT);
$sth->execute();
$row = $sth->fetch(PDO::FETCH_NUM);
$weight_prov = $row[1];
echo '<tr><td colspan="3">', _('Provisions') , "</td>";
echo '<tr><td>&nbsp;</td><td>', _('Count'), '</td><td>', $row[0], "</td></tr>\n";
echo '<tr><td>&nbsp;</td><td>', _('Weight'), '</td><td>', format_float($row[1], 1, 'kg'), "</td></tr>\n";
// Documents
$sth = $pdo->query("SELECT COUNT(*) FROM document");
echo '<tr><td colspan="3">', _('Documents') , "</td>";
echo '<tr><td>&nbsp;</td><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
$weight_total = $weight_equip + $weight_inv + $weight_prov;
echo '<tr><td colspan="2">', _('Total weight'), '</td>';
echo '<td>', format_float($weight_total, 1, 'kg'), "</td></tr>\n";
echo "</table>\n";
@@ -447,7 +489,7 @@ echo '<h2>', _('Add additional yacht'), "</h2>\n";
</div>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=$project->remarks ?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"></textarea>
</div>
<div class="container-fluid px-0 my-3">
<button type="submit" name="submit[insert]" class="btn btn-primary"><?=_('Save')?></button>
@@ -478,7 +520,7 @@ if (!file_exists($shapeindexfile)) {
}
}
}
$opt_shapefiles = $g_opt_none + $shapeindex;
$opt_shapefiles = $g_opt_none + ($shapeindex ?? []);
$opt_storage = db_get_opt_storage($user->vid);
@@ -491,7 +533,7 @@ foreach ($sth->fetchAll(PDO::FETCH_NUM) as $row) {
$sql = "SELECT vesselname, vtype, model, loa, lwl, beam, draught, draught_min,"
. " displacement, ballast, beltpos_aft, beltpos_bow, shapefile,"
. " shipyard, sid_default, remarks "
. " shipyard, year_built, sid_default, remarks "
. "FROM vessel "
. "WHERE vid=?";
$sth = $pdo->prepare($sql);
@@ -509,6 +551,10 @@ $vessel = $sth->fetch(PDO::FETCH_OBJ);
<label for="model" class="form-label"><?=_('Model')?></label>
<input type="text" class="form-control" id="model" name="model" value="<?=$vessel->model ?>">
</div>
<div class="mb-3">
<label for="year_built" class="form-label"><?=_('Year built')?></label>
<input type="number" class="form-control" id="year_built" name="year_built" value="<?=$vessel->year_built ?>">
</div>
<div class="mb-3">
<label for="loa" class="form-label"><?=_('LoA')?>, m</label>
<input type="text" class="form-control" id="loa" name="loa" value="<?=format_float($vessel->loa, 2) ?>">
@@ -557,7 +603,7 @@ form_create_select('sid', _('Default Storage'), $g_opt_none + $opt_storage, $ves
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=$vessel->remarks ?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($vessel->remarks)?></textarea>
</div>
<?php
+26 -4
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle=_('Inventory');
@@ -17,6 +18,7 @@ $opt_storage = db_get_opt_storage($user->vid);
$opt_box = db_get_opt_box($user->vid);
$opt_invcond = db_load_enum('inventory', 'invcond', true, true);
$opt_equipment = db_get_opt_equip($user->vid, [-1 => _('&horbar; none &horbar;')]);
$opt_icat = db_get_options(DD_INVENTORY_CATEGORY);
// ========== ACTIONS START ===================================================
@@ -94,6 +96,8 @@ switch ($submit = form_get_action()) {
$p[':price'] = gpc_get_currency($_POST, 'price');
$p[':purchdate'] = gpc_get_date($_POST, 'purchdate');
$p[':invcond'] = gpc_get_string($_POST, 'invcond');
$p[':icat'] = gpc_get_int($_POST, 'icat');
if ($p[':icat'] <= 0) $p[':icat'] = NULL;
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
$p[':eid'] = gpc_get_int($_POST, 'eid');
if ($p[':eid'] <= 0) $p[':eid'] = NULL;
@@ -342,7 +346,7 @@ elseif ($action == ACT_VIEW):
// ========== VARIANT: view single record =====================================
$sql = "SELECT invname, conttype, sid, boxid, number, weight, price, purchdate,"
. " invcond, remarks "
. " invcond, icat, remarks "
. "FROM inventory "
. "WHERE invid=?";
$sth = $pdo->prepare($sql);
@@ -394,13 +398,28 @@ echo "<tr><th>", _('Location ID'), "</th><td>", $inventory->locationid, "</td></
echo "<tr><th>", _('Number'), "</th><td>", $inventory->number, "</td></tr>\n";
echo "<tr><th>", _('Weight'), "</th><td>", format_float($inventory->weight, 2, 'kg'), "</td></tr>\n";
echo "<tr><th>", _('Price'), "</th><td>", format_currency($inventory->price), "</td></tr>\n";
echo "<tr><th>", _('Purchase date'), "</th><td>", $inventory->purchdate, "</td></tr>\n";
echo "<tr><th>", _('Purchase date'), "</th><td>", format_date($inventory->purchdate), "</td></tr>\n";
echo "<tr><th>", _('Condition'), "</th><td>", $opt_invcond[$inventory->invcond], "</td></tr>\n";
echo "<tr><th>", _('Category'), "</th><td>", $opt_icat[$inventory->icat], "</td></tr>\n";
echo "<tr><th>", _('Remarks'), "</th><td>", h($inventory->remarks, br:true), "</td></tr>\n";
$tags = db_load_taglist('inv', $id);
form_tag_assignment($g_scriptname, $id, $tags);
// Custom properties
$sql = "SELECT keyname, valstr, valint FROM property WHERE objtype='inv' AND objid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
foreach ($sth->fetchAll() as $row) {
echo "<tr><th>{$row['keyname']}</th><td>";
if (isset($row['valstr'])) {
echo $row['valstr'];
} else {
echo $row['valint'];
}
echo "</td>\n";
}
echo "</table>\n";
form_view_buttons($g_scriptname, $id);
@@ -461,10 +480,13 @@ foreach ($cond as $k => $v) {
?>
</select>
</div>
<?php form_create_select('eid', _('Equipment'), $opt_equipment, $inventory->eid); ?>
<?php
form_create_select('icat', _('Category'), $g_opt_none + $opt_icat, $inventory->icat);
form_create_select('eid', _('Equipment'), $opt_equipment, $inventory->eid);
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($inventory->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($inventory->remarks)?></textarea>
</div>
<?php
+74
View File
@@ -8,3 +8,77 @@
*/
function db_get_setting($sno, $userid, $autocreate=false, $default=NULL) {
global $pdo;
global $g_error;
global $g_warning;
$sql = "SELECT valint, valstr FROM settings WHERE userid=? AND sno=?";
$sth = $pdo->prepare($sql);
try {
$sth->execute([$userid, $sno]);
} catch (Exception $e) {
$g_error->Add('SQL-Error: '. $e->getMessage());
$g_error->Add($sql);
$g_error->Add("userid=$userid, sno=$sno", true);
return $default;
}
$row = $sth->fetch();
if ($row === false) {
if ($autocreate) {
// create empty settings record if it not exists
$p[':userid'] = $userid;
$p[':sno'] = $sno;
db_exec_insert('settings', $p);
$g_warning->Add("Added missing settings record with id=$sno");
}
return $default;
}
return $row;
}
function db_lock_acquire($table, $key, $userid) {
global $pdo;
$token = bin2hex(random_bytes(8));
// first try new lock
$sql = "INSERT INTO recordlock (lock_table, lock_key, token, userid) "
. "VALUES (?, ?, ?, ?)";
try {
$sth = $pdo->prepare($sql);
$sth->execute([$table, $key, $token, $userid]);
return $token;
} catch (PDOException $e) {
if ($e->errorInfo[1] != 1062) {
throw $e;
}
}
// lazy locking: lock exists but is old, so we use it
$sql = "UPDATE recordlock "
. "SET token=?, userid=?, "
. "created_at=CURRENT_TIMESTAMP, last_seen=CURRENT_TIMESTAMP "
. "WHERE lock_table=? AND lock_key=? "
. "AND last_seen<CURRENT_TIMESTAMP-INTERVAL 5 MINUTE";
$sth = $pdo->prepare($sql);
$sth->execute([$token, $userid, $table, $key]);
if ($stmt->rowCount() === 1) {
return $token;
}
return null;
}
function db_lock_refresh($token) {
global $pdo;
$sql = "UPDATE recordlock "
. "SET last_seen=CURRENT_TIMESTAMP "
. "WHERE token=?";
$sth = $pdo->prepare($sql);
$sth->execute([$token]);
return $sth->rowCount() === 1;
}
function db_lock_release($token) {
global $pdo;
$sql = "DELETE FROM recordlock WHERE token=?";
$sth = $pdo->prepare($sql);
$sth->execute([$token]);
return $sth->rowCount() === 1;
}
+70
View File
@@ -43,3 +43,73 @@ function dir_get_size($path) {
}
return $total;
}
function image_scale($imagefile, $mimetype, $width, $height, $factor) {
// scales down image in place
// returns size in bytes for new scaled image or -1 in case of error
global $g_message, $g_error;
if ($factor <= 0 || $factor >= 1) {
$g_error->Add("Internal error: Invalid image scale factor");
return -1;
}
$width = (int)($width * $factor);
$height = (int)($height * $factor);
if ($width < 1 || $height < 1) {
$g_error->Add("Internal error: Scaled image dimensions are too small");
return -1;
}
if ($mimetype == 'image/jpeg') {
$orig = imagecreatefromjpeg($imagefile);
if ($orig === false) {
$g_error->Add("Internal error: imagecreatefromjpeg failed");
return -1;
}
$scaled = imagescale($orig, $width, $height, IMG_BICUBIC); // TODO IMG_BICUBIC_FIXED?
if ($scaled === false) {
imagedestroy($orig);
$g_error->Add("Internal error: jpeg imagescale failed");
return -1;
}
if (!imagejpeg($scaled, $imagefile, 85)) {
imagedestroy($scaled);
imagedestroy($orig);
$g_error->Add("Internal error: imagejpeg failed");
return -1;
}
} else if ($mimetype == 'image/png') {
$orig = imagecreatefrompng($imagefile);
if ($orig === false) {
$g_error->Add("Internal error: imagecreatefrompng failed");
return -1;
}
$scaled = imagescale($orig, $width, $height, IMG_BICUBIC);
if ($scaled === false) {
imagedestroy($orig);
$g_error->Add("Internal error: png imagescale failed");
return -1;
}
// Preserve PNG transparency
imagealphablending($scaled, false);
imagesavealpha($scaled, true);
if (!imagepng($scaled, $imagefile, 9)) {
imagedestroy($scaled);
imagedestroy($orig);
$g_error->Add("Internal error: imagepng failed");
return -1;
}
} else {
$g_error->Add(sprintf(_('Internal error: Unknown mimetype %s!'), $mimetype));
return -1;
}
$g_message->add(sprintf(_('Image scaled down to %dx%d'), $width, $height));
imagedestroy($scaled);
imagedestroy($orig);
clearstatcache(true, $imagefile);
$size = filesize($imagefile);
if ($size === false) {
$g_error->Add("Internal error: filesize failed");
return -1;
}
return $size;
}
+45 -12
View File
@@ -13,7 +13,7 @@
function gpc_get_string(&$GPC, $varname, $maxlen = NULL, $default = NULL) {
// TODO Parameter nullval: single value or array of values which considered as null
// Default value for nullval is "-1"
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
return $default;
}
$s = trim($GPC[$varname]);
@@ -24,14 +24,14 @@ function gpc_get_string(&$GPC, $varname, $maxlen = NULL, $default = NULL) {
}
function gpc_get_int(&$GPC, $varname, $default = NULL) {
if (!isset($GPC[$varname])) {
if (!isset($GPC[$varname]) || $GPC[$varname] === '') {
return $default;
}
return (int)$GPC[$varname];
}
function gpc_get_uint(&$GPC, $varname, $default = NULL) {
if (!isset($GPC[$varname])) {
if (!isset($GPC[$varname]) || $GPC[$varname] === '') {
return $default;
}
$val = (int)$GPC[$varname];
@@ -43,7 +43,7 @@ function gpc_get_uint(&$GPC, $varname, $default = NULL) {
function gpc_get_float(&$GPC, $varname, $default = NULL) {
global $g_lconv;
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
return $default;
}
$var = str_replace($g_lconv['thousands_sep'], '', $GPC[$varname]);
@@ -55,7 +55,7 @@ function gpc_get_float(&$GPC, $varname, $default = NULL) {
function gpc_get_currency(&$GPC, $varname, $default = NULL) {
global $g_lconv;
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
return $default;
}
$var = str_replace($g_lconv['thousands_sep'], '', $GPC[$varname]);
@@ -83,11 +83,44 @@ function gpc_get_bool(&$GPC, $varname, $default = FALSE) {
}
function gpc_get_date(&$GPC, $varname, $default = NULL) {
// TODO improve
if (!isset($GPC[$varname]) || $GPC[$varname] == '') {
global $g_opt_datefmt;
if (!isset($GPC[$varname]) || !is_scalar($GPC[$varname])) {
return $default;
}
return $GPC[$varname];
$value = trim((string)$GPC[$varname]);
if ($value === '') {
return $default;
}
foreach (array_keys($g_opt_datefmt) as $format) {
if (preg_match_all('/[Ymd]/', $format, $tokens) !== 3) {
continue;
}
$regex = preg_quote($format, '/');
$regex = str_replace('d', '(\d{2})', $regex);
$regex = str_replace('m', '(\d{2})', $regex);
$regex = str_replace('Y', '(\d{4})', $regex);
if (!preg_match('/^' . $regex . '$/', $value, $matches)) {
continue;
}
$year = $month = $day = NULL;
foreach ($tokens[0] as $i => $token) {
switch ($token) {
case 'Y':
$year = (int)$matches[$i + 1];
break;
case 'm':
$month = (int)$matches[$i + 1];
break;
case 'd':
$day = (int)$matches[$i + 1];
break;
}
}
if (checkdate($month, $day, $year)) {
return sprintf('%04d-%02d-%02d', $year, $month, $day);
}
}
return $default;
}
function gpc_get_datetime(&$GPC, $varname, $default = NULL) {
@@ -99,21 +132,21 @@ function gpc_get_datetime(&$GPC, $varname, $default = NULL) {
}
function gpc_get_color(&$GPC, $varname, $default = NULL) {
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
return $default;
}
$color = $GPC[$varname];
if ((strlen($color) == 7) and (substr($color, 0, 1) == '#')) {
if ((strlen($color) == 7) && (substr($color, 0, 1) == '#')) {
$color = substr($color, 1);
}
if ((strlen($color) != 6) or (! ctype_xdigit($color))) {
if ((strlen($color) != 6) || (! ctype_xdigit($color))) {
return $default;
}
return strtoupper($color);
}
function gpc_get_enum(&$GPC, $varname, $values, $default = NULL) {
if (!isset($GPC[$varname]) or (strlen(trim($GPC[$varname])) == 0)) {
if (!isset($GPC[$varname]) || (strlen(trim($GPC[$varname])) == 0)) {
return $default;
}
if (! in_array($GPC[$varname], $values)) {
+31
View File
@@ -0,0 +1,31 @@
<?php
/******************************************************************************
* YMS - Yacht Management Software
* Copyright (C) 2024-2026 Thomas Hooge
*
* SPDX-License-Identifier: WTFPL
******************************************************************************
*/
function signalk_get($server, $skpath) {
$url = "$server/signalk/v1/api/" . str_replace('.', '/', $skpath);
var_dump($url);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 3,
CURLOPT_TIMEOUT => 5,
]);
$json = curl_exec($ch);
if ($json === false) {
throw new RuntimeException('Signal K error: ' . curl_error($ch));
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode !== 200) {
throw new RuntimeException('Signal K HTTP-error: ' . $httpCode);
}
return json_decode($json, true, 512, JSON_THROW_ON_ERROR);
}
+1
View File
@@ -13,6 +13,7 @@
function create_shapeindex($shapeindexfile) {
// an existing index file will be overwritten
global $g_shapedir;
$shapeindex = array();
foreach (glob($g_shapedir.'/*.svg') as $f) {
$fh = fopen($f, 'r');
$fname = basename($f);
+5 -5
View File
@@ -71,13 +71,13 @@ if (isset($err)) {
?>
<button type="submit" class="btn btn-primary" title="<?php printf(_('Logon to %s'), APP_TITLE_SHORT); ?>" name="login" value="1">
<span class="bi bi-caret-right"></span>
<?=_('Login')?>
<?=_('Login'), "\n"?>
</button>
</form>
</div> <?php /* card body */?>
</div> <?php /* columns */?>
</div> <?php /* rows */?>
</div> <?phph /* card */?>
</div><?="\n" /* card body */ ?>
</div><?="\n" /* columns */ ?>
</div><?="\n" /* rows */ ?>
</div><?="\n" /* card */ ?>
</section>
</div>
</body>
+46 -5
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Maintenance');
@@ -54,6 +55,8 @@ switch ($submit = form_get_action()) {
$p[':activities'] = gpc_get_string($_POST, 'activities', 80);
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
$p[':series'] = gpc_get_int($_POST, 'series');
$p[':plan_date'] = gpc_get_date($_POST, 'plan_date');
$p[':completion_date'] = gpc_get_date($_POST, 'completion_date');
$p[':maintstate'] = gpc_get_string($_POST, 'maintstate');
db_exec_update('maintenance', $p, 'maintid');
$action = ACT_VIEW;
@@ -246,7 +249,8 @@ elseif ($action == ACT_VIEW):
echo '<h2>', _('View Maintenance'), "</h2>\n";
// load maintenance record
$sql = "SELECT m.activities, m.eid, m.remarks, m.series, m.maintstate, e.ename "
$sql = "SELECT m.activities, m.eid, m.remarks, m.series, m.maintstate, e.ename, "
. "m.plan_date, m.completion_date, m.interval_hours, m.last_hours "
. "FROM maintenance AS m LEFT OUTER JOIN equipment AS e USING (eid) "
. "WHERE m.maintid=?";
$sth = $pdo->prepare($sql);
@@ -281,18 +285,39 @@ if (isset($maint->eid) and $maint->eid>0) {
echo "</td></tr>\n";
echo '<tr><th>', _('Remarks'),"</th><td>", h($maint->remarks), "</td></tr>\n";
echo '<tr><th>', _('Series'),"</th><td>", $maint->series, "</td></tr>\n";
echo '<tr><th>', _('Interval'),"</th><td>", $maint->interval_hours, " h</td></tr>\n";
echo '<tr><th>', _('Last'),"</th><td>", $maint->last_hours, "</td></tr>\n";
echo '<tr><th>', _('Plan date'),"</th><td>", format_date($maint->plan_date), "</td></tr>\n";
echo '<tr><th>', _('Completion&nbsp;date'),"</th><td>", format_date($maint->completion_date), "</td></tr>\n";
echo '<tr><th scope="row">', _('State'),"</th><td>", get_enum($maint->maintstate), "</td></tr>\n";
// Custom properties
$sql = "SELECT keyname, valstr, valint FROM property WHERE objtype='maint' AND objid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
foreach ($sth->fetchAll() as $row) {
echo "<tr><th>{$row['keyname']}</th><td>";
if (isset($row['valstr'])) {
echo $row['valstr'];
} else {
echo $row['valint'];
}
echo "</td></tr>\n";
}
echo "</table>\n";
echo '</div>'; // Column break
echo '<div class="col">';
// TODO Show documents for equipment
echo "<h4>Documents</h4>\n";
echo '<h4>Documents for ', h($maint->ename), "</h4>\n";
if (isset($docs)) {
echo '<ul>', "\n";
foreach ($docs as $d) {
echo '<li>', $d['title'] ?? $d['filename'], ' (', $d['docid'], ")</li>\n";
echo '<li>', $d['title'] ?? $d['filename'], ' (', $d['docid'], ')';
echo ' <a href="documents.php?f=view&id=', $d['docid'], '"><i class="bi-eye"></i></a>';
echo "</li>\n";
}
echo "</ul>\n";
} else {
@@ -331,7 +356,7 @@ echo "</div>\n";
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================
$sql = "SELECT activities, eid, remarks, series, maintstate "
$sql = "SELECT activities, eid, remarks, series, plan_date, completion_date, maintstate "
. "FROM maintenance "
. "WHERE maintid=?";
$sth = $pdo->prepare($sql);
@@ -350,12 +375,28 @@ echo '<h2>', _('Edit Maintenance'), "</h2>\n";
<?php form_create_select('eid', _('Equipment'), $opt_equipment, $maint->eid); ?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($maint->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($maint->remarks)?></textarea>
</div>
<div class="mb-3">
<label for="series" class="form-label"><?=_('Series')?></label>
<input type="text" class="form-control" id="series" name="series" maxlength="4" value="<?=$maint->series ?>">
</div>
<div class="mb-3">
<label for="interval_hours" class="form-label"><?=_('Interval hours')?></label>
<input type="number" class="form-control" id="interval_hours" name="interval_hours" inputmode="numeric" maxlength="6" value="<?=$maint->interval_hours ?>">
</div>
<div class="mb-3">
<label for="last_hours" class="form-label"><?=_('Last hours')?></label>
<input type="number" class="form-control" id="last_hours" name="last_hours" inputmode="numeric" maxlength="6" value="<?=$maint->last_hours ?>">
</div>
<div class="mb-3">
<label for="plan_date"><?=_('Plan date')?></label>
<input type="date" class="form-control" id="plan_date" name="plan_date" value="<?=$maint->plan_date ?>">
</div>
<div class="mb-3">
<label for="completion_date"><?=_('Completion date')?></label>
<input type="date" class="form-control" id="completion_date" name="completion_date" value="<?=$maint->completion_date ?>">
</div>
<?php
form_create_select('maintstate', _('Status'), $opt_state, $maint->maintstate);
+12 -4
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
// TODO move to somewhere else
@@ -24,7 +25,8 @@ $pagetitle = _('Measurements');
$id = gpc_get_int($_REQUEST, 'id', 0);
$opt_unit = db_get_options(8);
$opt_unit = db_get_options(DD_UNIT);
$opt_category = db_get_options(DD_MEASUREMENT_CATEGORY);
$opt_accuracy = db_load_enum('measurement', 'accuracy', true, true);
$opt_dimensions = array(
1 => _('1D'),
@@ -101,6 +103,10 @@ switch ($submit = form_get_action()) {
$p[':unit'] = gpc_get_int($_POST, 'unit');
$p[':accuracy'] = gpc_get_string($_POST, 'accuracy');
$p[':mdate'] = gpc_get_date($_POST, 'mdate');
$p[':mcat'] = gpc_get_int($_POST, 'mcat');
if ($p[':mcat'] == -1) {
$p[':mcat'] = NULL;
}
$p[':note'] = gpc_get_string($_POST, 'note');
$p[':eid'] = gpc_get_int($_POST, 'eid');
if ($p[':eid'] == -1) {
@@ -290,7 +296,7 @@ form_create_select('eid', _('Equipment'), $opt_equipment, $id);
elseif ($action == ACT_VIEW):
// ========== VARIANT: view single record =====================================
$sql = "SELECT mname, unit, nval, val1, val2, val3, accuracy, mdate, note, eid "
$sql = "SELECT mname, unit, nval, val1, val2, val3, accuracy, mdate, mcat, note, eid "
. "FROM measurement "
. "WHERE mid=?";
$sth = $pdo->prepare($sql);
@@ -307,8 +313,9 @@ echo '<tr><th>', _('Value 1'), '</th><td>', $measurement->val1, "</td></tr>\n";
echo '<tr><th>', _('Value 2'), '</th><td>', $measurement->val2, "</td></tr>\n";
echo '<tr><th>', _('Value 3'), '</th><td>', $measurement->val3, "</td></tr>\n";
echo '<tr><th>', _('Accuracy'), '</th><td>', get_enum($measurement->accuracy), "</td></tr>\n";
echo '<tr><th>', _('Date'), '</th><td>', $measurement->mdate, "</td></tr>\n";
echo '<tr><th>', _('Date'), '</th><td>', format_date($measurement->mdate), "</td></tr>\n";
echo '<tr><th>', _('Note'), '</th><td>', h($measurement->note), "</td></tr>\n";
echo '<tr><th>', _('Category'),"</th><td>", $opt_category[$measurement->mcat] ?? 'n/a', "</td></tr>\n";
echo '<tr><th>', _('Equipment'), '</th><td>', $opt_equipment[$measurement->eid], "</td></tr>\n";
echo "</table>\n";
@@ -318,7 +325,7 @@ form_view_buttons($g_scriptname, $id);
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================
$sql = "SELECT mname, nval, val1, val2, val3, unit, accuracy, note, eid "
$sql = "SELECT mname, nval, val1, val2, val3, unit, accuracy, note, eid, mcat "
. "FROM measurement "
. "WHERE mid=?";
$sth = $pdo->prepare($sql);
@@ -355,6 +362,7 @@ form_create_select('nval', _('Dimensions'), $opt_dimensions, $measurement->nval)
<?php
form_create_select('unit', _('Unit'), $opt_unit, $measurement->unit);
form_create_select('accuracy', _('Accuracy'), $opt_accuracy, $measurement->accuracy);
form_create_select('mcat', _('Category'), $g_opt_none + $opt_category, $measurement->mcat);
form_create_select('eid', _('Equipment'), $opt_equipment, $measurement->eid);
form_edit_buttons($g_scriptname, $id);
+8 -3
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Note');
@@ -30,6 +31,7 @@ switch ($submit = form_get_action()) {
$p[':notetype'] = gpc_get_enum($_POST, 'notetype', $opt_notetype, 'task');
$p[':refid'] = gpc_get_int($_POST, 'refid');
$p[':annotation'] = gpc_get_string($_POST, 'annotation');
$p[':created_by'] = $user->id;
$id = db_exec_insert('note', $p);
$caller = gpc_get_string($_POST, 'caller');
$callid = $p[':refid'];
@@ -171,7 +173,9 @@ elseif ($action == ACT_VIEW):
echo '<h2>', _('View Note'), "</h2>\n";
$sql = "SELECT refid, notetype, annotation FROM note WHERE noteid=?";
$sql = "SELECT n.refid, n.notetype, n.annotation, n.created_at, u.displayname "
. "FROM note AS n LEFT OUTER JOIN user AS u ON (n.created_by=u.userid) "
. "WHERE noteid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$note = $sth->fetch(PDO::FETCH_OBJ);
@@ -184,9 +188,10 @@ echo '<table class="table">', "\n";
echo '<tr><th>', _('Reference'),"</th><td>", $note->refid, "</td></tr>\n";
echo '<tr><th>', _('Type'),"</th><td>", $note->notetype, "</td></tr>\n";
echo '<tr><th>', _('Annotation'),"</th><td>", nl2br($note->annotation), "</td></tr>\n";
echo '<tr><th>', _('Created at'),"</th><td>", format_datetime($note->created_at), "</td></tr>\n";
echo '<tr><th>', _('Created by'),"</th><td>", h($note->displayname), "</td></tr>\n";
echo "</table>\n";
$link = $note->notetype == 'task' ? 'task.php' : 'maintenance.php';
// echo '<p><a href="', $link, '?f=view&id=', $note->refid, '">', _('Parent'), "</a></p>\n";
form_view_buttons($g_scriptname, $id, $link.'?f=view&id='.$note->refid);
@@ -205,7 +210,7 @@ echo '<h2>', _('Edit Note'), "</h2>\n";
<input type="hidden" name="id" value="<?=$id?>">
<div class="mb-3">
<label for="annotation" class="form-label"><?=_('Annotation')?></label>
<textarea class="form-control" id="annotation" name="annotation" rows="5" autofocus><?=$note->annotation;?></textarea>
<textarea class="form-control" id="annotation" name="annotation" rows="5" autofocus><?=h($note->annotation);?></textarea>
</div>
<?php
form_edit_buttons($g_scriptname, $id);
+23 -7
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Projects');
@@ -209,13 +210,13 @@ foreach ($res as $row) {
echo '<td>', $i;
echo '<a class="text-nowrap" title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['projid'], '"><i class="bi bi-eye ms-2"></i></a>', "\n";
echo "</td>\n";
echo "<td>". $row['projname'] ."</td>\n";
echo "<td>". $row['startdate'] ."</td>\n";
echo "<td>". $row['duration'] ."</td>\n";
echo "<td>". get_enum($row['projstate']) ."</td>\n";
echo "<td>". $row['remarks'] ."</td>\n";
echo '<td>', $row['projname'], "</td>\n";
echo '<td>', format_date($row['startdate']), "</td>\n";
echo '<td>', $row['duration'], "</td>\n";
echo '<td>', get_enum($row['projstate']), "</td>\n";
echo '<td>', h($row['remarks']), "</td>\n";
// Edit current record button
echo "<td>";
echo '<td>';
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['projid'], '"><i class="bi-pencil"></i></a>', "\n";
echo "</td>\n";
@@ -315,6 +316,21 @@ echo '<tr><th scope="row">', _('Costs plan'),"</th><td>", format_currency($proje
echo '<tr><th scope="row">', _('Costs final'),"</th><td>", format_currency($project->costs_final), "</td></tr>\n";
echo '<tr><th scope="row">', _('State'),"</th><td>", get_enum($project->projstate), "</td></tr>\n";
echo '<tr><th scope="row">', _('Remarks'),"</th><td>", h($project->remarks, br:true), "</td></tr>\n";
// Custom properties go here
$sql = "SELECT keyname, valstr, valint FROM property WHERE objtype='proj' AND objid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
foreach ($sth->fetchAll() as $row) {
echo "<tr><th>{$row['keyname']}</th><td>";
if (isset($row['valstr'])) {
echo $row['valstr'];
} else {
echo $row['valint'];
}
echo "</td></tr>\n";
}
echo "</table>\n";
form_view_buttons($g_scriptname, $id);
@@ -401,7 +417,7 @@ form_create_select('projstate', _('Status'), $opt_state, $project->projstate);
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($project->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($project->remarks)?></textarea>
</div>
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
+8 -7
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle=_('Provisions');
@@ -14,8 +15,8 @@ $pagetitle=_('Provisions');
$id = gpc_get_int($_REQUEST, 'id', 0);
$opt_storage = db_get_opt_storage($user->vid);
$opt_category = db_get_options(5);
$opt_unit = db_get_options(6);
$opt_category = db_get_options(DD_PROVISION_CATEGORY);
$opt_unit = db_get_options(DD_PROVISION_UNIT);
// ========== ACTIONS START ===================================================
@@ -62,8 +63,8 @@ switch ($submit = form_get_action()) {
$p[':weight_net'] = min(gpc_get_float($_POST, 'weight_net'), 999.99);
$p[':unit'] = gpc_get_int($_POST, 'unit');
$p[':calories'] = gpc_get_uint($_POST, 'calories');
$p[':storedate'] = gpc_get_string($_POST, 'storedate');
$p[':shelflife'] = gpc_get_string($_POST, 'shelflife');
$p[':storedate'] = gpc_get_date($_POST, 'storedate');
$p[':shelflife'] = gpc_get_date($_POST, 'shelflife');
$p[':price'] = gpc_get_currency($_POST, 'price');
$p[':sid'] = gpc_get_int($_POST, 'sid');
if ($p[':sid'] <= 0) $p[':sid'] = NULL;
@@ -288,8 +289,8 @@ echo "<tr><th>", _('Weight net'), "</th><td>", format_float($prov->weight_net, 2
echo '<tr><th>', _('Unit'),"</th><td>", $opt_unit[$prov->unit], "</td></tr>\n";
echo "<tr><th>", _('Calories'), "</th><td>", $prov->calories, " kcal</td></tr>\n";
echo '<tr><th>', _('Category'),"</th><td>", $opt_category[$prov->provcat] ?? 'n/a', "</td></tr>\n";
echo '<tr><th>', _('Storedate'),"</th><td>", $prov->storedate, "</td></tr>\n";
echo '<tr><th>', _('Shelflife'),"</th><td>", $prov->shelflife, "</td></tr>\n";
echo '<tr><th>', _('Storedate'),"</th><td>", format_date($prov->storedate), "</td></tr>\n";
echo '<tr><th>', _('Shelflife'),"</th><td>", format_date($prov->shelflife), "</td></tr>\n";
echo '<tr><th>', _('Price'), "</th><td>", format_currency($prov->price), "</td></tr>\n";
echo '<tr><th>', _('Storage'),"</th><td>", ($opt_storage[$prov->sid] ?? ''), "</td></tr>\n";
echo '<tr><th>', _('Remarks'),"</th><td>", h($prov->remarks, br:true), "</td></tr>\n";
@@ -359,7 +360,7 @@ form_create_select('sid', _('Storage'), $g_opt_none + $opt_storage, $prov->sid);
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3" maxlength="150"><?=h($prov->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3" maxlength="150"><?=h($prov->remarks)?></textarea>
</div>
<?php
form_edit_buttons($g_scriptname, $id);
+1
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Search');
+18 -3
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Settings');
@@ -22,6 +23,11 @@ switch ($submit = form_get_action()) {
// global settings
if ($user->role == 'captain') {
$p[':userid'] = 0;
$p[':sno'] = 4;
$p[':valstr'] = gpc_get_string($_POST, 'currsym', 3, '€');
db_exec_update('settings', $p, $pk);
$p[':valstr'] = NULL;
// image dimensions
$p[':sno'] = 20;
$p[':valint'] = gpc_get_int($_POST, 'maximgx');
db_exec_update('settings', $p, $pk);
@@ -80,13 +86,17 @@ if ($res = $sth->fetch(PDO::FETCH_NUM)) {
}
$curdate = new DateTime();
$opt_datefmt = array(
$opt_datefmt = array();
foreach ($g_opt_datefmt as $format => $description) {
$opt_datefmt[$format] = $description . $curdate->format(' - ' . $format);
}
/* $opt_datefmt = array(
'Y-m-d' => _('YYYY-MM-DD'). $curdate->format(' - Y-m-d'),
'Y/m/d' => _('YYYY/MM/DD'). $curdate->format(' - Y/m/d'),
'd.m.Y' => _('DD.MM.YYYY'). $curdate->format(' - d.m.Y'),
'd/m/Y' => _('DD/MM/YYYY'). $curdate->format(' - d/m/Y'),
'm-d-Y' => _('MM/DD/YYYY'). $curdate->format(' - m-d-Y')
);
'm-d-Y' => _('MM-DD-YYYY'). $curdate->format(' - m-d-Y')
); */
$rowspp = 10;
$sql = "SELECT valint FROM settings WHERE userid=? AND sno=10";
@@ -101,6 +111,7 @@ if ($res = $sth->fetch(PDO::FETCH_NUM)) {
$sth->execute([$user->id, $rowspp]);
}
$currsym = $pdo->query("SELECT valstr FROM settings WHERE userid=0 AND sno=4")->fetchColumn();
$maximgx = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
$maximgy = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
@@ -131,6 +142,10 @@ form_create_select('datefmt', _('Date format'), $opt_datefmt, $datefmt);
if ($user->role == 'captain'):
?>
<h2><?=_('global for all users')?></h2>
<div class="mb-3">
<label for="currsym" class="form-label"><?=_('Currency symbol')?></label>
<input type="text" class="form-control" id="currsym" name="currsym" maxlength="3" value=<?=$currsym?>>
</div>
<div class="mb-3">
<label for="maximgx" class="form-label"><?=_('Maximal image width')?></label>
<input type="text" class="form-control" id="maximgx" name="maximgx" maxlength="4" value=<?=$maximgx?>>
+14 -5
View File
@@ -7,13 +7,14 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Storage');
$id = gpc_get_int($_REQUEST, 'id', 0);
$opt_stype = db_get_options(3);
$opt_stype = db_get_options(SS_STORAGE_TYPE);
$opt_capaunit = $g_opt_empty + db_load_enum('storage', 'capaunit', true, true);
// ========== ACTIONS START ===================================================
@@ -39,7 +40,7 @@ switch ($submit = form_get_action()) {
$p[':sid'] = $id;
$p[':sname'] = gpc_get_string($_POST, 'sname');
$p[':stype'] = gpc_get_string($_POST, 'stype');
$p[':x'] = gpc_get_int($_POST, 'x');
$p[':x'] = gpc_get_uint($_POST, 'x');
$p[':y'] = gpc_get_int($_POST, 'y');
$p[':z'] = gpc_get_int($_POST, 'z');
$p[':wx'] = gpc_get_int($_POST, 'wx');
@@ -49,6 +50,7 @@ switch ($submit = form_get_action()) {
$p[':capacity'] = gpc_get_int($_POST, 'capacity');
if ($p[':capacity'] == 0) $p[':capacity'] = NULL;
$p[':capaunit'] = gpc_get_string($_POST, 'capaunit');
$p[':color'] = gpc_get_color($_POST, 'color');
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
db_exec_update('storage', $p, 'sid');
$action = ACT_VIEW;
@@ -106,7 +108,7 @@ page_caption_search($pagetitle);
// Storage
// stype from dropdown
$sql = "SELECT sid, sname, x, y, z, angle, remarks "
$sql = "SELECT sid, sname, color, x, y, z, angle, remarks "
. "FROM storage "
. "WHERE vid=? "
. "ORDER BY sid";
@@ -118,6 +120,7 @@ echo "<thead>\n";
echo "<tr>";
echo '<th>#</th>';
echo "<th>", _('Name'), "</th>";
echo "<th>", _('Color'), "</th>";
echo "<th>", _('Position'), "</th>";
echo "<th>", _('Remarks'), "</th>";
echo "<th>&nbsp;</th>";
@@ -131,6 +134,7 @@ foreach ($res as $row) {
echo '<a class="text-nowrap" title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['sid'], '"><i class="bi bi-eye ms-2"></i></a>', "\n";
echo "</td>\n";
echo "<td>", $row['sname'], "</td>\n";
echo '<td>', format_color(strtoupper($row['color'])), "</td>\n";
if ($row['angle'] != 0) {
$angle = " (" . $row['angle'] . "°)";
} else {
@@ -215,7 +219,7 @@ form_create_select('stype', _('Type'), $opt_stype);
elseif ($action == ACT_VIEW):
// ========== VARIANT: view single record =====================================
$opt_unit = db_get_options(6);
$opt_unit = db_get_options(DD_PROVISION_UNIT);
$sql = "SELECT sid, sname, stype, capacity, capaunit, x, y, z, wx, wy, wz, angle, color, remarks "
. "FROM storage "
. "WHERE sid=?";
@@ -290,6 +294,7 @@ if (count($res) > 0) {
echo "<td>", $row['provname'], "</td>";
echo "<td>", $row['number'], ' ', $opt_unit[$row['unit']], "</td>";
echo "<td>", $row['storedate'], ' - ', $row['shelflife'], "</td>";
echo '<td><a title="', _('View'), '" href="provisions.php?f=view&id=', $row['provid'], '"><i class="bi-eye"></i></a></td>';
echo "</tr>\n";
}
echo "</table>\n";
@@ -356,9 +361,13 @@ form_create_select('stype', _('Type'), $opt_stype, $storage->stype);
<input type="number" class="form-control" id="capacity" name="capacity" value="<?=$storage->capacity ?>">
</div>
<?php form_create_select('capaunit', _('Capacity Unit'), $opt_capaunit, $storage->capaunit); ?>
<div class="mb-3">
<label for="color"><?=_('Color')?></label>
<input type="color" class="form-control" id="color" name="color" value="#<?=$storage->color ?>">
</div>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($storage->remarks, br:true)?></textarea>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($storage->remarks)?></textarea>
</div>
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
+1
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Tags');
+11 -3
View File
@@ -7,6 +7,7 @@
******************************************************************************/
require 'globals.inc';
require 'lib/db.inc';
require 'lib/gpc.inc';
$pagetitle = _('Task');
@@ -73,6 +74,7 @@ switch ($submit = form_get_action()) {
$p[':finished'] = gpc_get_datetime($_POST, 'finished');
$p[':taskstate'] = gpc_get_enum($_POST, 'taskstate', array_keys($opt_state));
$p[':responsible'] = gpc_get_int($_POST, 'responsible');
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
db_exec_update('task', $p, 'taskid');
$action = ACT_VIEW;
break;
@@ -175,7 +177,7 @@ try {
}
$numrows = $sth->fetchColumn();
$page = gpc_get_int($_REQUEST, 'p', 1);
$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp);
$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp);
$lastpage = ceil($numrows/$rows_pp);
$sql = "SELECT t.taskid, t.vid, t.projid, t.taskname, t.priority, t.taskstate,"
@@ -297,7 +299,7 @@ elseif ($action == ACT_VIEW):
$sql = "SELECT t.taskname, t.priority, t.plandate, t.duedate,"
. " t.started, t.finished, t.taskstate, t.responsible,"
. " u.displayname, p.projname "
. " t.remarks, u.displayname, p.projname "
. "FROM task AS t LEFT JOIN project AS p USING (projid) "
. " LEFT JOIN user AS u ON (t.responsible=u.userid) "
. "WHERE taskid=?";
@@ -316,6 +318,7 @@ echo '<tr><th>', _('Started at'),"</th><td>", $task->started, "</td></tr>\n";
echo '<tr><th>', _('Finished at'),"</th><td>", $task->finished, "</td></tr>\n";
echo '<tr><th>', _('Status'),"</th><td>", $opt_state[$task->taskstate], "</td></tr>\n";
echo '<tr><th>', _('Responsible'),"</th><td>", $task->displayname, "</td></tr>\n";
echo '<tr><th>', _('Remarks'),"</th><td>", h($task->remarks, br:true), "</td></tr>\n";
echo "</table>\n";
form_view_buttons($g_scriptname, $id);
@@ -392,7 +395,12 @@ form_create_select('priority', _('Priority'), $opt_none + $opt_priority, $task->
<?php
form_create_select('taskstate', _('Status'), $opt_state, $task->taskstate);
form_create_select('responsible', _('Responsible'), $opt_user, $user->id);
?>
<div class="mb-3">
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($task->remarks)?></textarea>
</div>
<?php
form_edit_buttons($g_scriptname, $id);
echo "</form>\n";
+3 -3
View File
@@ -1,4 +1,4 @@
.TH YMS 1 "August 2026" "YMS 0.2" "User Commands"
.TH YMS 1 "September 2026" "YMS 0.2" "User Commands"
.SH NAME
yms - Yacht Management Software
.SH SYNOPSIS
@@ -50,7 +50,7 @@ the application is running.
Per-user configuration file for the YMS graphical user interface.
.TP
.I /var/local/yms/
.I /var/local/lib/yms/
Persistent storage for files managed by YMS.
The directory contains photos, documents and other media associated
@@ -60,7 +60,7 @@ SVG and PDF.
YMS stores application data in two separate locations.
The directory
.I /var/local/yms/
.I /var/local/lib/yms/
contains user-managed photos and documents and should be included
in regular backups.
+1 -1
View File
@@ -5,7 +5,7 @@ GenericName=Yacht Management
GenericName[de]=Yacht-Verwaltungssoftware
Comment=Yacht Management Software
Comment[de]=Verwaltung von Yachten, Dokumenten und technischen Daten
Exec=/usr/local/bin/yms
Exec=@PREFIX@/bin/yms
Icon=yms
StartupNotify=true
Terminal=false
+2 -2
View File
@@ -1,7 +1,7 @@
table Icon
Caption: Yacht Management
Command: /usr/local/bin/yms
Icon: /usr/local/share/icons/hicolor/48x48/apps/yms.png
Command: @PREFIX@/bin/yms
Icon: @PREFIX@/share/icons/hicolor/48x48/apps/yms.png
Width: 48
Height: 48
X: 168
+4 -2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: WTFPL
from gi.repository import Gtk
def load_from_dict(combobox, dictionary, selected=None, sort=False):
@@ -33,7 +35,7 @@ def refresh_dict(combobox, dictionary, keep_selection=True):
model = combobox.get_model()
selected = get_value(combobox)
model.clear()
for item in dictionary.iteritems():
for item in dictionary.items():
model.append(item)
if keep_selection:
activate_row(combobox, selected)
@@ -70,7 +72,7 @@ def get_value(combobox, decode=False):
if active < 0:
return None
else:
if type(model) == gtk.TreeStore:
if type(model) == Gtk.TreeStore:
it = combobox.get_active_iter()
val = model.get_value(it, 0)
if decode:
+113 -1
View File
@@ -1,6 +1,7 @@
import MySQLdb
import secrets
class Database():
class Database:
def __init__(self, hostname, dbname):
self.hostname = hostname
@@ -20,6 +21,7 @@ class Database():
except MySQLdb.Error as e:
self.error = e
return False
self.conn.autocommit(False)
self.cur = self.conn.cursor()
self.dcur = self.conn.cursor(MySQLdb.cursors.DictCursor)
return True
@@ -47,6 +49,10 @@ class Database():
def is_connected(self):
return self.conn.open
def get_timestamp(self):
self.cur.execute("SELECT CURRENT_TIMESTAMP")
return self.cur.fetchone()[0]
def last_error(self):
if not self.error:
return(0, '')
@@ -54,3 +60,109 @@ class Database():
text = self.error.args[1]
self.error = None
return(code, text)
def load_enum(self, table, column):
"""
TODO this is only an example! perhaps other keys needed
Load an enum directly from a database table and provide it as a
dictionary for use in, for example, selection lists.
"""
sql = (
"SELECT TRIM(TRAILING ')' FROM SUBSTRING(column_type,6)) "
"FROM information_schema.columns "
"WHERE table_schema=DATABASE() AND table_name=%s AND column_name=%s AND data_type='enum'"
)
self.cur.execute(sql, (table, column))
row = self.cur.fetchone()
if not row:
return {}
return {
i: _(value.strip("'"))
for i, value in enumerate(row[0].split(','), 1)
}
def lock_acquire(self, table, key, userid):
token = secrets.token_hex(8)
# first try new lock
sql = (
"INSERT INTO recordlock (lock_table, lock_key, token, userid)"
"VALUES (%s, %s, %s, %s)"
)
try:
self.cur.execute(sql, (table, key, token, userid))
self.conn.commit()
return token
except self.conn.IntegrityError as e:
self.conn.rollback()
if e.errno != 1062:
raise
# lazy locking: lock exists but is old, so we use it
sql = (
"UPDATE recordlock "
"SET token=%s, userid=%s,"
" created_at=CURRENT_TIMESTAMP, last_seen=CURRENT_TIMESTAMP "
"WHERE lock_table=%s AND lock_key=%s AND last_seen<CURRENT_TIMESTAMP-INTERVAL 5 MINUTE"
)
self.cur.execute(sql, (token, userid, table, key))
self.conn.commit()
if self.cur.rowcount == 1:
return token
return None
def lock_refresh(self, token):
sql = (
"UPDATE recordlock "
"SET last_seen=current_timestamp() "
"WHERE token=%s"
)
self.cur.execute(sql, (token,))
self.conn.commit()
return self.cur.rowcount == 1
def lock_release(self, token):
sql = "DELETE FROM recordlock WHERE token=%s"
self.cur.execute(sql, (token,))
self.conn.commit()
return self.cur.rowcount == 1
def load_setting(self, sno):
sql = "SELECT valstr, valint FROM settings WHERE userid=0 AND sno=%s"
self.cur.execute(sql, (sno,))
row = self.cur.fetchone()
if not row:
sql = "INSERT INTO settings (userid, sno) VALUES (0, %s)"
self.cur.execute(sql, (sno,))
self.conn.commit()
return (None, None)
return row
def save_setting(self, sno, valstr, valint):
sql = "UPDATE settings SET valstr=%s, valint=%s WHERE userid=0 AND sno=%s"
values = (valstr, valint, sno)
return self.execute_write(sql, values, 1)
def execute_write(self, sql, values=(), expected_rows=None):
"""
Execute an INSERT, UPDATE, or DELETE statement.
expected_rows:
None = do not check the number of affected rows
1 = expect exactly one affected row
0 = expect no affected rows
"""
try:
self.cur.execute(sql, values)
except MySQLdb.Error as e:
self.rollback()
self.error = e
return False
if (expected_rows is not None and self.cur.rowcount != expected_rows):
self.rollback()
self.error = RuntimeError(
"Expected {} affected rows, got {}".format(
expected_rows,
self.cur.rowcount
)
)
return False
self.error = None
return True
-33
View File
@@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
import MySQLdb.cursors
class Equipment():
fields = ('vid' 'ename', 'shortname', 'model', 'ecat', 'serial', 'supplier',
'manufacturer', 'purchdate', 'price', 'weight', 'remarks', 'flags')
def __init__(self, dbconn, eid=None):
self.conn = dbconn
self.dcur = dbconn.cursor(MySQLdb.cursors.DictCursor)
self.remarks = None
self.data = {} # for old/new checks
def load(self):
sql = (
"SELECT {}".format(', '.join(self.fields))
"FROM equipment "
"WHERE eid=%s"
)
self.dcur.execute(sql, (self.eid,))
self.data = self.dcur.fetchone()
if self.data:
for field in self.fields:
setattr(self, field, self.data.get(field))
else:
for field in self.fields:
setattr(self, field, None)
def save(self):
pass
+8 -3
View File
@@ -50,9 +50,7 @@ def messagebox(messagetext, symbol=None, title=None, parent=None):
def questionbox(messagetext, symbol=None, title=None, parent=None):
"""
Ja/Nein-Nachfrage bei wirklich wichtigen Entscheidungen
Die Entscheidung wird als Rückgabewert geliefert: True falls
zugestimmt wurde, False bei Ablehnung
The decision is returned as a value: True if agreed to, False if rejected
"""
if not symbol:
symbol = Gtk.MessageType.QUESTION
@@ -69,3 +67,10 @@ def questionbox(messagetext, symbol=None, title=None, parent=None):
response = md.run()
md.destroy()
return response == Gtk.ResponseType.YES
def get_text_contents(textview):
"""
Convenience function to get all contents from GtkTextView
"""
buf = textview.get_buffer()
return buf.get_text(buf.get_start_iter(), buf.get_end_iter(), True)
+191
View File
@@ -0,0 +1,191 @@
# SPDX-License-Identifier: WTFPL
"""
Dropdowns and database enums
dropdowns can change
enums are static
"""
class Dropdown:
HULL_TYPE = 1
COMPANY_TYPE = 2
STORAGE_TYPE = 3
EQUIPMENT_CATEGORY = 4
PROVISION_CATEGORY = 5
PROVISION_UNIT = 6
FUSE_TYPE = 7
UNIT = 8
BOX_TYPE = 9
FUSE_BLOCK = 10
CABLE_TYPE = 11
CABLE_TECHNAME = 12
INVENTORY_CATEGORY = 13
BBN_VESSELDATA = 14
MEASUREMENT_CATEGORY = 15
Dependencies = {
HULL_TYPE: (
# unused
),
COMPANY_TYPE: (
('company', 'comptype'),
('company', 'comptype2')
),
STORAGE_TYPE: (
('storage', 'stype'),
),
EQUIPMENT_CATEGORY: (
('equipment', 'ecat'),
),
PROVISION_CATEGORY: (
('provisions', 'provcat'),
),
PROVISION_UNIT: (
('provisions', 'unit'),
),
FUSE_TYPE: (
('fuse', 'ftype'),
),
UNIT: (
('measurement', 'unit'),
),
BOX_TYPE: (
('box', 'boxtype'),
),
FUSE_BLOCK: (
('fuse', 'location'),
),
CABLE_TYPE: (
('cable', 'cabletype'),
),
CABLE_TECHNAME: (
('cable', 'techname'),
),
INVENTORY_CATEGORY: (
('inventory', 'invcat'),
),
BBN_VESSELDATA: (
#unused
),
MEASUREMENT_CATEGORY: (
('measurement', 'mcat'),
)
}
class Lookup:
def __init__(self, db):
self.db = db
self._enums = {}
self._dropdowns = {}
def load(self):
self._load_enums()
self._load_dropdowns()
def _load_enums(self):
"""
TODO translation via gettext needed
"""
db_enums = {
'cable.cablecond': ('cable', 'cablecond'),
'checkitem.checkresult': ('checkitem', 'checkresult'),
'checklist.clstate': ('checklist', 'clstate'),
'company.flags': ('company', 'flags'),
'docref.reftype': ('docref', 'reftype'),
'document.doctype': ('document', 'doctype'),
'document.roleaccess': ('document', 'roleaccess'),
'dropdown.flags': ('dropdown', 'flags'),
'inventory.conttype': ('inventory', 'conttype'),
'inventory.invcond': ('inventory', 'invcond'),
'maintenance.maintstate': ('maintenance', 'maintstate'),
'measurement.accuracy': ('measurement', 'accuracy'),
'note.notetype': ('note', 'notetype'),
'project.projstate': ('project', 'projstate'),
'signalk.datatype': ('signalk', 'datatype'),
'signalk.objtype': ('signalk', 'objtype'),
'storage.capaunit': ('storage', 'capaunit'),
'tagref.objtype': ('tagref', 'objtype'),
'task.priority': ('task', 'priority'),
'task.taskstate': ('task', 'taskstate'),
'user.role': ('user', 'role'),
'vessel.vtype': ('vessel', 'vtype')
}
for key, (table, column) in db_enums.items():
self._enums[key] = self.db.load_enum(table, column)
def _load_dropdowns(self):
self._dropdowns.clear()
sql = (
"SELECT ddid, ddval, ddtext "
"FROM dropdown "
"WHERE ddid>0 "
"ORDER BY ddid, sort, ddval"
)
self.db.cur.execute(sql)
for ddid, ddval, ddtext in self.db.cur.fetchall():
if ddid not in self._dropdowns:
self._dropdowns[ddid] = {}
self._dropdowns[ddid][ddval] = ddtext
def enum(self, name):
return self._enums[name]
def dropdown(self, ddid):
return self._dropdowns[ddid]
def user(self):
userlist = {}
sql = "SELECT userid, displayname FROM user ORDER BY displayname"
self.db.cur.execute(sql)
for row in self.db.cur.fetchall():
userlist[row[0]] = row[1]
return userlist
def refresh(self):
# TODO ugly hack please improve
self._load_dropdowns()
class ListDefinition:
pass
"""
EQUIPMENT_LIST = ListDefinition(
name="equipment",
query=
"SELECT
e.eid,
e.ename,
c.name AS manufacturer,
e.model,
e.ecat,
e.weight
FROM equipment e
LEFT JOIN company c
ON c.cid = e.manufacturer"
,
columns=[
Column("ename", _("Name")),
Column("manufacturer", _("Manufacturer")),
Column(
"model",
_("Model")
),
Column(
"ecat",
_("Category"),
formatter=dropdown(Dropdown.EQUIPMENT_CATEGORY)
),
Column(
"weight",
_("Weight"),
formatter=weight()
),
]
)
"""
View File
+14
View File
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Box(DbRecord):
table = "box"
pk_field = "boxid"
fields = ('boxid', 'sid', 'boxtype', 'parent', 'label', 'color', 'content',
'wx', 'wy', 'wz', 'weight', 'weight_net', 'price', 'remarks')
def __init__(self, db, boxid=None):
super().__init__(db, boxid)
self.title = _("Box({})")
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Cable(DbRecord):
table = "cable"
pk_field = "cableid"
fields = ('vid', 'cablename', 'cabletype', 'techname', 'length',
'conductors', 'diameter', 'xsection', 'weight', 'color', 'supplier',
'manufacturer', 'cablecond', 'remarks')
def __init__(self, db, cableid=None):
super().__init__(db, cableid)
self.title = _("Cable({})")
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Company(DbRecord):
table = "company"
pk_field = "compid"
fields = ('compid', 'compname', 'comptype', 'comptype2', 'shortname',
'street', 'zip', 'city', 'country', 'contact', 'phone', 'email',
'web', 'customerno', 'contractno', 'remarks', 'flags' )
def __init__(self, db, compid=None):
super().__init__(db, compid)
self.title = _("Company({})")
+149
View File
@@ -0,0 +1,149 @@
# SPDX-License-Identifier: WTFPL
"""
No commits here: Has to be done elsewhere to support transactions!
"""
from datetime import datetime
class DbRecord:
def __init__(self, db, record_id=None):
if not hasattr(self, "table"):
raise TypeError("DbRecord subclass must define 'table'")
if not hasattr(self, "pk_field"):
raise TypeError("DbRecord subclass must define 'pk_field'")
if not hasattr(self, "fields"):
raise TypeError("DbRecord subclass must define 'fields'")
self.db = db
self.cur = db.cur
self.dcur = db.dcur
self.conn = db.conn
self.last_update = None
self._title = _("DbRecord({})") # for pretty print
if record_id is not None:
self.pk_value = int(record_id)
self.load()
else:
self.clear()
def clear(self):
self.pk_value = None
self.data = {} # for old/new checks
for field in self.fields:
setattr(self, field, None)
self.data[field] = None
def load(self, record_id=None):
if record_id is not None:
self.pk_value = int(record_id)
if self.pk_value is None:
self.clear()
return
sql = ("SELECT {} FROM {} WHERE {}=%s").format(', '.join(self.fields), self.table, self.pk_field)
try:
self.dcur.execute(sql, (self.pk_value,))
self.data = self.dcur.fetchone()
except Exception as e:
print(e)
print(sql)
self.db.error = e
self.clear()
return False
if self.data:
for field, value in self.data.items():
setattr(self, field, value)
return True
else:
self.clear()
return False
def save(self):
self.last_update = datetime.now()
if self.pk_value is not None:
return self._update()
else:
return self._insert()
def _update(self):
sqlfield = []
values = []
for field in self.fields:
newdata = getattr(self, field)
if self.data[field] != newdata:
sqlfield.append("{}=%s".format(field))
values.append(newdata)
if values:
# only save if there are changes
sql = (
f"UPDATE {self.table} SET " + ",".join(sqlfield) +
f" WHERE {self.pk_field}=%s"
)
values.append(self.pk_value)
try:
self.dcur.execute(sql, values)
except Exception as e:
print(e)
print(sql)
print(values)
self.db.error = e
return False
for field in self.fields:
self.data[field] = getattr(self, field)
return True
def _insert(self):
sql = (
"INSERT INTO {} ({}) "
"VALUES ({})"
).format(
self.table,
','.join(self.fields),
','.join(["%s"] * len(self.fields))
)
values = []
for field in self.fields:
newdata = getattr(self, field)
values.append(newdata)
self.data[field] = newdata
try:
self.dcur.execute(sql, values)
except Exception as e:
print(e)
print(sql)
print(values)
self.db.error = e
return False
self.pk_value = self.dcur.lastrowid
return True
def delete(self, record_id=None):
if record_id is None:
if self.pk_value is None:
return False
record_id = self.pk_value
sql = "DELETE FROM {} WHERE {}=%s".format(self.table, self.pk_field)
try:
self.dcur.execute(sql, (record_id,))
except Exception as e:
print(e)
print(sql)
self.db.error = e
return False
if self.dcur.rowcount != 1:
return False
if self.pk_value == record_id:
self.pk_value = None
self.clear()
return True
def __str__(self):
out = [self._title.format(self.pk_value)]
for field in self.fields:
value = getattr(self, field, None)
out.append(" {:15}: {}".format(field, value))
return "\n".join(out)
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Document(DbRecord):
table = "document"
pk_field = "docid"
fields = ('doctype', 'mimetype', 'filename', 'extension',
'hash', 'docsize', 'doctime', 'docdate', 'title', 'pages', 'remarks',
'roleaccess')
def __init__(self, db, docid=None):
super().__init__(db, docid)
self.title = _("Document({})")
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Equipment(DbRecord):
table = "equipment"
pk_field = "eid"
fields = ('eid', 'vid', 'ename', 'shortname', 'model', 'ecat', 'serial',
'supplier', 'manufacturer', 'purchdate', 'price', 'weight', 'remarks',
'flags')
def __init__(self, db, eid=None):
super().__init__(db, eid)
self.title = _("Equipment({})")
+14
View File
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Fuse(DbRecord):
table = "fuse"
pk_field = "fuseid"
fields = ('fuseid', 'vid', 'fnumber', 'ftype', 'current', 'cableid',
'eid', 'location', 'description', 'remarks')
def __init__(self, db, fuseid=None):
super().__init__(db, fuseid)
self.title = _("Fuse({})")
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Inventory(DbRecord):
table = "inventory"
pk_field = "invid"
fields = ('invid', 'invname', 'icat', 'conttype', 'sid', 'boxid', 'eid',
'number', 'weight', 'price', 'purchdate', 'invcond', 'remarks',
'flags')
def __init__(self, db, invid=None):
super().__init__(db, invid)
self.title = _("Inventory({})")
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Maintenance(DbRecord):
table = "maintenance"
pk_field = "maintid"
fields = ('maintid', 'vid', 'eid', 'series', 'activities', 'plan_date',
'completion_date', 'interval_hours', 'last_hours', 'remarks',
'maintstate')
def __init__(self, db, maintid=None):
super().__init__(db, maintid)
self.title = _("Maintenance({})")
+14
View File
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Measurement(DbRecord):
table = "measurement"
pk_field = "mid"
fields = ('mid', 'mname', 'vid', 'eid', 'nval', 'val1', 'val2', 'val3',
'unit', 'accuracy', 'mdate', 'note')
def __init__(self, db, mid=None):
super().__init__(db, mid)
self.title = _("Measurement({})")
+14
View File
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Project(DbRecord):
table = "project"
pk_field = "projid"
fields = ('projname', 'vid', 'responsible', 'startdate', 'duration',
'costs_plan', 'costs_final', 'remarks', 'projstate')
def __init__(self, db, projid=None):
super().__init__(db, projid)
self.title = _("Project({})")
+15
View File
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Provision(DbRecord):
table = "provisions"
pk_field = "provid"
fields = ('provid', 'provname', 'provcat', 'sid', 'boxid', 'number',
'target', 'weight', 'weight_net', 'unit', 'calories', 'storedate',
'shelflife', 'price', 'remarks')
def __init__(self, db, provid=None):
super().__init__(db, provid)
self.title = _("Provision({})")
+23
View File
@@ -0,0 +1,23 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Storage(DbRecord):
table = "storage"
pk_field = "sid"
fields = ('vid', 'sname', 'stype', 'capacity', 'capaunit',
'x', 'y', 'z', 'wx', 'wy', 'wz', 'angle', 'color', 'remarks')
def __init__(self, db, sid=None):
super().__init__(db, sid)
self.title = _("Storage({})")
def save(self, commit=True):
super().save()
if commit:
self.conn.commit()
def delete(self):
# there must be no assiciated data!
pass
+14
View File
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Task(DbRecord):
table = "task"
pk_field = "taskid"
fields = ('vid', 'projid', 'taskname', 'priority', 'taskstate', 'state_ts',
'plandate', 'duedate', 'started', 'finished', 'responsible', 'remarks')
def __init__(self, db, taskid=None):
super().__init__(db, taskid)
self.title = _("Task({})")
+5 -5
View File
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: WTFPL
import MySQLdb.cursors
import bcrypt
@@ -11,9 +11,9 @@ class User(object):
def genpass(cls, length=12):
return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
def __init__(self, dbconn, user_id=None):
self.conn = dbconn
self.cur = dbconn.cursor(MySQLdb.cursors.DictCursor)
def __init__(self, db, user_id=None):
self.conn = db.conn
self.cur = db.conn.cursor(MySQLdb.cursors.DictCursor)
if user_id is not None:
self.user_id = int(user_id)
self.load()
@@ -123,7 +123,7 @@ class User(object):
def __repr__(self):
# Unique description
out = "User(%d)" % self.user_id
out = "User({})".format(self.user_id)
return out
def __str__(self):
+46
View File
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: WTFPL
from .dbrecord import DbRecord
class Vessel(DbRecord):
table = "vessel"
pk_field = "vid"
fields = ('vid', 'vtype', 'vesselname', 'model', 'shipyard', 'loa', 'lwl',
'beam', 'draught', 'draught_min', 'displacement', 'ballast',
'beltpos_aft', 'beltpos_bow', 'shapefile', 'sid_default', 'year_built',
'remarks')
def __init__(self, db, vid=None):
super().__init__(db, vid)
self.title = _("Vessel({})")
def create(self):
sql = (
"SELECT MIN(v1.vid+1) AS newid "
"FROM vessel AS v1 LEFT JOIN vessel AS v2 ON v2.vid=v1.vid+1 "
"WHERE v1.vid>=0 AND v2.vid IS NULL"
)
self.dcur.execute(sql)
row = self.dcur.fetchone()
if row is None:
# vessel table empty: create first vessel
self.pk_value = 1
else:
# create additional vessel
self.pk_value = row['newid']
self.clear()
self.vid = self.pk_value
self.vesselname = f"Vessel #{self.pk_value}"
self.vtype = 1 # monohull
self._insert()
self.conn.commit()
def save(self, commit=True):
super().save()
if commit:
self.conn.commit()
def delete(self):
# there must be no assiciated data!
pass
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: WTFPL
from gi.repository import Gtk
def add_column(treeview, label, index, xalign=None, col_fg=None, col_bg=None, visible=True):
+1966
View File
File diff suppressed because it is too large Load Diff
+914
View File
@@ -0,0 +1,914 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_price">
<property name="upper">90</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_weight">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_weight_net">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_width_x">
<property name="upper">9999</property>
<property name="step-increment">10</property>
<property name="page-increment">100</property>
</object>
<object class="GtkAdjustment" id="adj_width_y">
<property name="upper">9999</property>
<property name="step-increment">10</property>
<property name="page-increment">100</property>
</object>
<object class="GtkAdjustment" id="adj_width_z">
<property name="upper">9999</property>
<property name="step-increment">10</property>
<property name="page-increment">100</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_flt_type">
<property name="name">cmb_flt_type</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_flt_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Box</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_box">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_box_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_box_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Box Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Label</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_content">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Content</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_content">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_color">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Color</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_color">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight net</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_box_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Box</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=7 n-rows=9 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Label</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_label">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">6</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="width">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Dimensions (L x W x H)</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">4</property>
<property name="margin-end">4</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">4</property>
<property name="margin-end">4</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="left-attach">4</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_wx">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">4</property>
<property name="width-chars">4</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">adj_width_x</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_wy">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">4</property>
<property name="width-chars">4</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">adj_width_y</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_wz">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">4</property>
<property name="width-chars">4</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">adj_width_z</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left-attach">5</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
<property name="width">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight net</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">4</property>
<property name="margin-end">4</property>
<property name="label" translatable="yes">mm</property>
</object>
<packing>
<property name="left-attach">6</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Content</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_content">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="width">6</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_weight_net">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">adj_weight_net</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_weight">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">adj_weight</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_price">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">adj_price</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Color</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_color">
<property name="label" translatable="yes">#FFFFFF</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">half</property>
<signal name="clicked" handler="on_but_color_clicked" swapped="no"/>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
<property name="width">3</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+1021
View File
File diff suppressed because it is too large Load Diff
+1088
View File
File diff suppressed because it is too large Load Diff
+720
View File
@@ -0,0 +1,720 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_documents">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Reference</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Documents</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_documents">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_documents_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_doc_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Document Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=9 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lbl_lb_title">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Title</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_title">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_filename">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filename</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_extents">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Image extents</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_mimetype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Mimetype</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_filename">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_extents">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_mimetype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_filesize">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">File size</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_date">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Upload date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_doctype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Document type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_filesize">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_date">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_doctype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_doctype1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_roleaccess">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Role access</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_roleaccess">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkImage" id="img_preview">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="yalign">0</property>
<property name="stock">gtk-missing-image</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">9</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_doc_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Document</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=4 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Title</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_title">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filename</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_filename">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">False</property>
<property name="vexpand">False</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Document type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_doctype">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+1005
View File
File diff suppressed because it is too large Load Diff
+796
View File
@@ -0,0 +1,796 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_current">
<property name="upper">500</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_fnumber">
<property name="upper">10000</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_fuses">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_flt_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_flt_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_flt_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Fuses</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_fuses">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_fuses_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_fuse_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Fuse Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_fnumber">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Current</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Cable</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Location</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_location">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_description">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_current">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_cable">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_fuse_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Fuse</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Current</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Cable</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Location</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_fnumber">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_fnumber</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_description">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_ftype">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_current">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_current</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_cable">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_location">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+49
View File
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg
viewBox="0 0 1536 1536"
xmlns="http://www.w3.org/2000/svg">
<g
id="database"
transform="matrix(1.2722662,0,0,1.272228,-90.933152,-28.35833)">
<path
d="m 117,608.4 v 178.5 c 1.5,93.7 155.7,169.5 395,169.5 239.3,0 393.4,-75.8 395,-169.5 V 608.4 Z"
fill="#1b9bdb"
style="stroke-width:0.617813" />
<path
d="m 907,607.7 c 0,99.4 -154.8,180 -395,180 -240.2,0 -395,-80.6 -395,-180 0,-99.4 154.8,-180 395,-180 240.2,0 395,80.5 395,180 z"
fill="#ffffff"
style="stroke-width:0.617813" />
<path
d="m 117,428.4 v 158.5 c 1.5,93.7 155.7,179.5 395,179.5 239.3,0 393.4,-85.8 395,-179.5 V 428.4 Z"
fill="#1b9bdb"
style="stroke-width:0.617813" />
<path
d="m 907,427.7 c 0,99.4 -154.8,180 -395,180 -240.2,0 -395,-80.6 -395,-180 0,-99.4 154.8,-180 395,-180 240.2,0 395,80.5 395,180 z"
fill="#ffffff"
style="stroke-width:0.617813" />
<path
d="m 117,248.4 v 158.5 c 1.5,93.7 155.7,179.5 395,179.5 239.3,0 393.4,-85.8 395,-179.5 V 248.4 Z"
fill="#1b9bdb"
style="stroke-width:0.617813" />
<path
d="m 907,247.7 c 0,99.4 -154.8,180 -395,180 -240.2,0 -395,-80.6 -395,-180 0,-99.4 154.8,-180 395,-180 240.2,0 395,80.5 395,180 z"
fill="#3ed6ff"
style="stroke-width:0.617813" />
</g>
<g
id="vessel"
transform="matrix(1.1909726,0,0,1.1909662,-198.75012,-148.39229)">
<path
d="M 1037.0086,942.8165 C 974.9073,737.83301 942.30445,523.89181 951.83243,309.49199 c 1.5097,-38.97292 5.19683,-77.86596 8.09496,-116.78033 1.33545,-17.93774 14.12957,-29.73918 29.76885,-28.01762 15.18766,1.67139 24.69326,15.34216 22.63436,33.07917 -33.49361,282.57064 3.9464,579.18885 117.5337,840.84319 14.0515,28.6031 34.323,54.1283 42.0974,85.5486 -0.8685,0.8127 -1.7384,1.6268 -2.6068,2.4395 22.4824,0.4363 45.4611,-0.9256 67.6396,2.0896 24.6445,3.8083 31.7539,27.8852 14.8155,46.1268 -42.8084,33.5071 -93.4092,57.5965 -144.1675,76.5923 -45.2046,15.5791 -92.8194,15.752 -140.07182,14.7971 -86.06691,-2.4785 -172.62034,-4.5918 -258.15753,-14.5378 -49.89263,-6.6633 -89.41252,-33.7999 -122.0572,-71.3733 -13.21372,-15.2083 -26.37865,-30.4626 -39.73874,-45.5441 -9.4764,-10.6974 -10.62506,-25.0345 -2.49944,-35.8518 7.82173,-10.413 21.13582,-11.584 34.42482,-7.7519 58.20923,12.4036 118.76875,12.9598 177.93008,19.0738 116.70842,6.7176 232.51074,16.4769 349.60533,15.8078 -107.60982,-101.9209 -250.59373,-174.55152 -386.30655,-76.5421 -36.41405,23.8245 -62.39401,63.1905 -94.97736,7.8272 -161.7569,-288.68926 58.74593,-585.96682 271.1984,-776.50727 10.62367,-9.71744 23.00936,-11.36791 32.93463,-4.62244 10.06468,6.84027 13.4744,18.81456 8.23018,32.2149 -107.65021,209.91817 -24.71143,451.69299 97.1213,635.25935 0.5771,-0.28437 1.1529,-0.56456 1.73,-0.84614 z M 629.22054,855.6216 c 2.64024,35.38899 6.80412,87.08895 19.83243,124.46576 3.86278,12.49983 15.35351,17.36761 25.40425,13.65265 10.09116,-3.73169 14.12679,-14.04296 10.64179,-26.96238 -50.10731,-188.23341 43.24326,-376.97144 157.7854,-522.04023 7.43699,-8.44334 11.91451,-23.02159 4.19454,-31.75907 -12.41217,-8.27327 -26.32149,3.53793 -34.90295,12.81905 C 698.60268,542.0512 635.33044,690.09335 629.22054,855.6216 Z"
fill="#000000"
style="fill:#044a6c;fill-opacity:1;stroke-width:0.689852" />
<path
d="m 976.33894,1356.0705 c -106.98667,25.935 -160.80619,60.3789 -268.18457,0.9479 -83.80725,-45.1288 -152.96774,47.5988 -271.91213,-6.3594 -59.29377,-30.832 -86.0014,-16.994 -139.15153,16.1855 -12.44423,7.2878 -23.33834,6.6061 -31.00534,-2.0644 -7.54153,-8.5284 -8.05034,-21.3029 1.8596,-31.0008 49.1605,-48.1007 101.79234,-72.3253 166.37634,-46.3094 81.32174,40.1062 120.05401,16.0991 200.59093,-0.9702 92.29392,-18.6557 148.72441,75.2624 246.39219,32.0253 70.72316,-27.9312 115.42315,-28.2797 187.00917,-3.485 45.8612,16.2051 88.8145,-7.7826 131.3747,-23.0369 66.9956,-28.7494 133.4782,6.9866 198.992,22.6201 42.7219,10.7058 34.2534,66.196 -10.6752,61.8231 -29.3883,-6.5698 -59.0972,-13.3655 -87.2644,-24.2748 -92.043,-34.5247 -143.9527,62.0098 -261.4404,19.63 -20.3914,-6.2952 -41.45474,-10.4283 -62.96136,-15.731 z"
fill="#000000"
style="fill:#044a6c;fill-opacity:1;stroke-width:0.689852" />
<path
d="m 629.22333,855.62439 c 6.09457,-165.49758 69.39608,-313.59968 182.95406,-429.82561 8.56334,-9.26022 22.53958,-21.18433 34.90574,-12.81626 7.66282,8.87408 3.26754,23.24881 -4.19872,31.75627 -114.52681,145.02977 -207.89968,333.85143 -157.78122,522.04302 3.48361,12.91663 -0.55202,23.2293 -10.64318,26.96099 -10.05074,3.71635 -21.54008,-1.15282 -25.40564,-13.65126 -13.02693,-37.33638 -17.20892,-89.08095 -19.83104,-124.46715 z"
fill="#ffffff"
style="stroke-width:0.689852" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

+962
View File
@@ -0,0 +1,962 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_number">
<property name="upper">1000</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_price">
<property name="upper">10000</property>
<property name="step-increment">10</property>
<property name="page-increment">100</property>
</object>
<object class="GtkAdjustment" id="adj_weight">
<property name="upper">1000</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_inventory">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Condition</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Inventory</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_inventory">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_inventory_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">2</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_inv_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Inventory details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=12 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Box</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_number">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_purchdate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Purchase Date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_condition">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Condition</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_conttype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_number">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_purchdate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_condition">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">10</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_inv_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit inventory</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=12 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Box</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Puchase date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Condition</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmd_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_condition">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_date">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_number">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_number</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_weight">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_weight</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_price">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_price</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">10</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+1 -2653
View File
File diff suppressed because it is too large Load Diff
+804
View File
@@ -0,0 +1,804 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_maintenance">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_flt_equip">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_flt_text">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Maintenance</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_maintenance">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_maintenance_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_maint_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Maintenance Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lbl_lb_activities">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Activities</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_activities">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_series">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Series</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_interval">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Interval hours</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_last">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Last hours</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_plandate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Plan date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_completion">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Completion date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_series">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_interval">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_last">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_plandate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_completion">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_maint_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Maintenance</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Activities</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Series</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Interval</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Last hours</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Plan date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Completion date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="txt_activities">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_series">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_interval">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_last_hours">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_plandate">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_completion">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+844
View File
@@ -0,0 +1,844 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_val1">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_val2">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_val3">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_measurement">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_flt_equip">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_flt_text">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Measurement</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_measurement">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_measurement_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_measure_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Measurement Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=10 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Dimensions</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 1</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 2</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 3</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Accuracy</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Note</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_dimensions">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_val1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_val2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_val3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_accuracy">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_note">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_measure_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Measurement</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Dimensions</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 1</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 2</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 3</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Accuracy</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Note</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_dimensions">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_val1">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adj_val1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_val2">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adj_val2</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_val3">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adj_val3</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_date">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_note">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_accuracy">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+785
View File
@@ -0,0 +1,785 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_const_final">
<property name="upper">99999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_costs_plan">
<property name="upper">99999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_duration">
<property name="upper">1000</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_projects">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Clear</property>
<property name="name">but_flt_clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Apply</property>
<property name="name">but_flt_apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Projects</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_projects">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_projects_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="name">but_new</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="name">but_edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_proj_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Project Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Responsible</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Date start</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Duration, days</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Costs plan</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Costs final</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_responsible">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_date_start">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_duration">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_costs_plan">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_costs_final">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_proj_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Project</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Responsible</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Date start</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Duration days</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Costs plan</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Costs final</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_responsible">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_date_start">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_duration">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_duration</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_costs_plan">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_costs_plan</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_costs_final">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adj_const_final</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_remarks">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+913
View File
@@ -0,0 +1,913 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_provisions">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=4 n-rows=2 -->
<object class="GtkGrid" id="grd_provisions">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">2</property>
<property name="column-spacing">2</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Kategorie</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_prov_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_prov_filter">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Provisions</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_provisions">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_provisions_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_prov_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit provision</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=10 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Box</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight net</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storedate</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Shelflife</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_number">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_weight">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_weight_net">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_storedate">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_shelflife">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_prov_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">View Provision</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=13 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Box</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_number">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight net</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_storedate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storedate</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_shelflife">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Shelflife</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_number">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_storedate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_shelflife">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_target">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Target</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_target">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_shelflife1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">12</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+190
View File
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkBox" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="ntb_status">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox" id="box_info">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_dbinfo">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_infotext">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">This is an early release of YMS native GUI.
Please use the web frontend wich is already
in an usable state.
For further assistance please consult the related
thread in "Segeln Forum"</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkDrawingArea" id="drw_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<signal name="draw" handler="on_drw_status_draw" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Info</property>
</object>
<packing>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_tables">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Tables</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_config">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_config">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_config">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="editable">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Config</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_version">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">YMS version x.x.x</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</interface>

Some files were not shown because too many files have changed in this diff Show More