Work on native gui: list views for objects; set version to 0.2.2

This commit is contained in:
2026-09-21 19:07:59 +02:00
parent d61faf2e71
commit 0adb07d75b
34 changed files with 3199 additions and 1133 deletions
+16
View File
@@ -1,6 +1,22 @@
CHANGELOG 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 0.2.1 - 2026-08-28
------------------ ------------------
+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');
+2 -1
View File
@@ -14,6 +14,7 @@
* 0.1.0 2024-03-12 Started development tho * 0.1.0 2024-03-12 Started development tho
* 0.2.0 2026-08-18 First public release 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.1 2026-08-28 Foreign keys, bugfixes and output sanitation tho
* 0.2.2 2026-09-21 Lots of improvements and fixes tho
* *
*/ */
@@ -49,7 +50,7 @@ define('ROLE_SAILOR', 'sailor');
// ========== PAGE START CODE ================================================= // ========== PAGE START CODE =================================================
// global version string // global version string
$g_version = 'v0.2.1'; $g_version = 'v0.2.2';
$g_scriptname = basename($_SERVER['SCRIPT_NAME']); $g_scriptname = basename($_SERVER['SCRIPT_NAME']);
+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): def questionbox(messagetext, symbol=None, title=None, parent=None):
""" """
Ja/Nein-Nachfrage bei wirklich wichtigen Entscheidungen The decision is returned as a value: True if agreed to, False if rejected
Die Entscheidung wird als Rückgabewert geliefert: True falls
zugestimmt wurde, False bei Ablehnung
""" """
if not symbol: if not symbol:
symbol = Gtk.MessageType.QUESTION symbol = Gtk.MessageType.QUESTION
@@ -69,3 +67,10 @@ def questionbox(messagetext, symbol=None, title=None, parent=None):
response = md.run() response = md.run()
md.destroy() md.destroy()
return response == Gtk.ResponseType.YES 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)
+1 -1
View File
@@ -29,10 +29,10 @@ class DbRecord:
self.pk_value = int(record_id) self.pk_value = int(record_id)
self.load() self.load()
else: else:
self.pk_value = None
self.clear() self.clear()
def clear(self): def clear(self):
self.pk_value = None
self.data = {} # for old/new checks self.data = {} # for old/new checks
for field in self.fields: for field in self.fields:
setattr(self, field, None) setattr(self, field, None)
+10 -1
View File
@@ -6,9 +6,18 @@ class Storage(DbRecord):
table = "storage" table = "storage"
pk_field = "sid" pk_field = "sid"
fields = ('sid', 'vid', 'sname', 'stype', 'capacity', 'capaunit', fields = ('vid', 'sname', 'stype', 'capacity', 'capaunit',
'x', 'y', 'z', 'wx', 'wy', 'wz', 'angle', 'color', 'remarks') 'x', 'y', 'z', 'wx', 'wy', 'wz', 'angle', 'color', 'remarks')
def __init__(self, db, sid=None): def __init__(self, db, sid=None):
super().__init__(db, sid) super().__init__(db, sid)
self.title = _("Storage({})") 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
+3 -2
View File
@@ -36,9 +36,10 @@ class Vessel(DbRecord):
self._insert() self._insert()
self.conn.commit() self.conn.commit()
def save(self): def save(self, commit=True):
super().save() super().save()
self.conn.commit() if commit:
self.conn.commit()
def delete(self): def delete(self):
# there must be no assiciated data! # there must be no assiciated data!
+429 -721
View File
File diff suppressed because it is too large Load Diff
+97 -32
View File
@@ -46,36 +46,92 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <object class="GtkEntry" id="ent_flt_name">
</child> <property name="visible">True</property>
<child> <property name="can-focus">True</property>
<placeholder/> </object>
</child> <packing>
<child> <property name="left-attach">1</property>
<placeholder/> <property name="top-attach">1</property>
</child> </packing>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child> </child>
</object> </object>
</child> </child>
@@ -180,10 +236,10 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Box Detais</property> <property name="label" translatable="yes">Box Details</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold"/>
</attributes> </attributes>
@@ -196,11 +252,11 @@
</child> </child>
<child> <child>
<!-- n-columns=2 n-rows=8 --> <!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Label</property> <property name="label" translatable="yes">Label</property>
@@ -214,7 +270,7 @@
<object class="GtkLabel" id="lbl_label"> <object class="GtkLabel" id="lbl_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Placeholder</property> <property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -222,10 +278,11 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property> <property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object> </object>
<packing> <packing>
<property name="left-attach">0</property> <property name="left-attach">0</property>
@@ -236,6 +293,8 @@
<object class="GtkLabel" id="lbl_remarks"> <object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -243,7 +302,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_content">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Content</property> <property name="label" translatable="yes">Content</property>
@@ -257,6 +316,7 @@
<object class="GtkLabel" id="lbl_content"> <object class="GtkLabel" id="lbl_content">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -264,7 +324,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_type">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property> <property name="label" translatable="yes">Type</property>
@@ -275,7 +335,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_color">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Color</property> <property name="label" translatable="yes">Color</property>
@@ -286,7 +346,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property> <property name="label" translatable="yes">Weight</property>
@@ -300,6 +360,7 @@
<object class="GtkLabel" id="lbl_type"> <object class="GtkLabel" id="lbl_type">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -310,6 +371,7 @@
<object class="GtkLabel" id="lbl_color"> <object class="GtkLabel" id="lbl_color">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -320,6 +382,7 @@
<object class="GtkLabel" id="lbl_weight"> <object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -327,7 +390,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_weight_net">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Weight net</property> <property name="label" translatable="yes">Weight net</property>
@@ -341,6 +404,7 @@
<object class="GtkLabel" id="lbl_weight_net"> <object class="GtkLabel" id="lbl_weight_net">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -348,7 +412,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property> <property name="label" translatable="yes">Price</property>
@@ -362,6 +426,7 @@
<object class="GtkLabel" id="lbl_price"> <object class="GtkLabel" id="lbl_price">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -459,7 +524,7 @@
</child> </child>
<child> <child>
<!-- n-columns=7 n-rows=9 --> <!-- n-columns=7 n-rows=9 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_editor">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
@@ -728,7 +793,7 @@
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Colour</property> <property name="label" translatable="yes">Color</property>
</object> </object>
<packing> <packing>
<property name="left-attach">0</property> <property name="left-attach">0</property>
+56 -8
View File
@@ -2,6 +2,31 @@
<!-- Generated with glade 3.40.0 --> <!-- Generated with glade 3.40.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_conductors">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_diameter">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_length">
<property name="upper">100</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_xsection">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject"> <object class="GtkStack" id="topobject">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@@ -27,7 +52,7 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="layout-style">start</property> <property name="layout-style">start</property>
<child> <child>
<object class="GtkButton"> <object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property> <property name="label" translatable="yes">Clear</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -40,7 +65,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton"> <object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property> <property name="label" translatable="yes">Apply</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -93,7 +118,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry"> <object class="GtkEntry" id="ent_flt_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
@@ -103,7 +128,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry"> <object class="GtkEntry" id="ent_flt_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
@@ -113,7 +138,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox"> <object class="GtkComboBox" id="cmb_flt_status">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
</object> </object>
@@ -261,7 +286,7 @@
<object class="GtkLabel" id="lbl_name"> <object class="GtkLabel" id="lbl_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Platzhalter</property> <property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -405,6 +430,7 @@
<object class="GtkLabel" id="lbl_type"> <object class="GtkLabel" id="lbl_type">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -415,6 +441,7 @@
<object class="GtkLabel" id="lbl_techname"> <object class="GtkLabel" id="lbl_techname">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -425,6 +452,7 @@
<object class="GtkLabel" id="lbl_length"> <object class="GtkLabel" id="lbl_length">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -435,6 +463,7 @@
<object class="GtkLabel" id="lbl_conductors"> <object class="GtkLabel" id="lbl_conductors">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -445,6 +474,7 @@
<object class="GtkLabel" id="lbl_diameter"> <object class="GtkLabel" id="lbl_diameter">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -455,6 +485,7 @@
<object class="GtkLabel" id="lbl_xsection"> <object class="GtkLabel" id="lbl_xsection">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">False</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -465,6 +496,7 @@
<object class="GtkLabel" id="lbl_weight"> <object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -475,6 +507,7 @@
<object class="GtkLabel" id="lbl_color"> <object class="GtkLabel" id="lbl_color">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -485,6 +518,7 @@
<object class="GtkLabel" id="lbl_supplier"> <object class="GtkLabel" id="lbl_supplier">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -495,6 +529,7 @@
<object class="GtkLabel" id="lbl_manufacturer"> <object class="GtkLabel" id="lbl_manufacturer">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -505,6 +540,7 @@
<object class="GtkLabel" id="lbl_condition"> <object class="GtkLabel" id="lbl_condition">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -515,6 +551,7 @@
<object class="GtkLabel" id="lbl_remarks"> <object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -596,10 +633,13 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">Edit Cable</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@@ -627,6 +667,7 @@
<object class="GtkEntry" id="ent_name"> <object class="GtkEntry" id="ent_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -789,6 +830,7 @@
<object class="GtkSpinButton" id="spi_length"> <object class="GtkSpinButton" id="spi_length">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="adjustment">adj_length</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -799,6 +841,7 @@
<object class="GtkSpinButton" id="spi_conductors"> <object class="GtkSpinButton" id="spi_conductors">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="adjustment">adj_conductors</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -809,6 +852,8 @@
<object class="GtkSpinButton" id="spi_diameter"> <object class="GtkSpinButton" id="spi_diameter">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="adjustment">adj_diameter</property>
<property name="digits">1</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -819,6 +864,8 @@
<object class="GtkSpinButton" id="spi_xsection"> <object class="GtkSpinButton" id="spi_xsection">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="adjustment">adj_xsection</property>
<property name="digits">1</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -829,6 +876,7 @@
<object class="GtkSpinButton" id="spi_weight"> <object class="GtkSpinButton" id="spi_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="adjustment">adj_weight</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
+1024
View File
File diff suppressed because it is too large Load Diff
+278 -44
View File
@@ -228,7 +228,10 @@
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">Document Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@@ -237,36 +240,186 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_title">
<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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_filename">
<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>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_extents">
<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>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_mimetype">
<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>
<child> <child>
<placeholder/> <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>
</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>
</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>
</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>
</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>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
@@ -292,6 +445,7 @@
<property name="expand">True</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">0</property>
<property name="secondary">True</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -342,44 +496,124 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_title_edit">
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <property name="label" translatable="yes">Edit Document</property>
<placeholder/> <attributes>
</child> <attribute name="weight" value="bold"/>
<child> </attributes>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</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>
<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> <property name="position">1</property>
</packing> </packing>
</child> </child>
+69 -76
View File
@@ -2,6 +2,16 @@
<!-- Generated with glade 3.40.0 --> <!-- Generated with glade 3.40.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_price">
<property name="upper">100</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="GtkStack" id="topobject"> <object class="GtkStack" id="topobject">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@@ -115,7 +125,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry"> <object class="GtkEntry" id="ent_flt_text">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
@@ -125,7 +135,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox"> <object class="GtkComboBox" id="cmb_flt_category">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
</object> </object>
@@ -135,7 +145,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox"> <object class="GtkComboBox" id="cmb_flt_manuf">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
</object> </object>
@@ -145,7 +155,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox"> <object class="GtkComboBox" id="cmb_flt_supp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
</object> </object>
@@ -155,7 +165,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton"> <object class="GtkCheckButton" id="chk_flt_ordered">
<property name="label" translatable="yes">ordered</property> <property name="label" translatable="yes">ordered</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -168,7 +178,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton"> <object class="GtkCheckButton" id="chk_flt_removed">
<property name="label" translatable="yes">removed</property> <property name="label" translatable="yes">removed</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -181,7 +191,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton"> <object class="GtkCheckButton" id="chk_flt_deleted">
<property name="label" translatable="yes">deleted</property> <property name="label" translatable="yes">deleted</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -309,7 +319,7 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment details</property> <property name="label" translatable="yes">Equipment details</property>
@@ -324,12 +334,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=11 --> <!-- n-columns=2 n-rows=11 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property> <property name="label" translatable="yes">Name</property>
@@ -340,7 +350,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_shortname">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Short name</property> <property name="label" translatable="yes">Short name</property>
@@ -351,7 +361,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_manufacturer">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Manufacturer</property> <property name="label" translatable="yes">Manufacturer</property>
@@ -362,7 +372,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_model">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Model</property> <property name="label" translatable="yes">Model</property>
@@ -373,7 +383,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_serial">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Serial no.</property> <property name="label" translatable="yes">Serial no.</property>
@@ -384,7 +394,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property> <property name="label" translatable="yes">Weight</property>
@@ -395,7 +405,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property> <property name="label" translatable="yes">Price</property>
@@ -406,7 +416,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_purchdate">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Date purchase</property> <property name="label" translatable="yes">Date purchase</property>
@@ -417,7 +427,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_supplier">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Supplier</property> <property name="label" translatable="yes">Supplier</property>
@@ -428,7 +438,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_category">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property> <property name="label" translatable="yes">Category</property>
@@ -439,10 +449,11 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property> <property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object> </object>
<packing> <packing>
<property name="left-attach">0</property> <property name="left-attach">0</property>
@@ -453,7 +464,7 @@
<object class="GtkLabel" id="lbl_name"> <object class="GtkLabel" id="lbl_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Placeholder</property> <property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -464,6 +475,7 @@
<object class="GtkLabel" id="lbl_shortname"> <object class="GtkLabel" id="lbl_shortname">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -474,6 +486,7 @@
<object class="GtkLabel" id="lbl_manufacturer"> <object class="GtkLabel" id="lbl_manufacturer">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -484,6 +497,7 @@
<object class="GtkLabel" id="lbl_model"> <object class="GtkLabel" id="lbl_model">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -494,6 +508,7 @@
<object class="GtkLabel" id="lbl_serial"> <object class="GtkLabel" id="lbl_serial">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">False</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -504,6 +519,7 @@
<object class="GtkLabel" id="lbl_weight"> <object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -514,6 +530,7 @@
<object class="GtkLabel" id="lbl_price"> <object class="GtkLabel" id="lbl_price">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -524,6 +541,7 @@
<object class="GtkLabel" id="lbl_date_purch"> <object class="GtkLabel" id="lbl_date_purch">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -534,6 +552,7 @@
<object class="GtkLabel" id="lbl_supplier"> <object class="GtkLabel" id="lbl_supplier">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -544,6 +563,7 @@
<object class="GtkLabel" id="lbl_category"> <object class="GtkLabel" id="lbl_category">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -554,45 +574,14 @@
<object class="GtkLabel" id="lbl_remarks"> <object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
<property name="top-attach">10</property> <property name="top-attach">10</property>
</packing> </packing>
</child> </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> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@@ -684,7 +673,7 @@
</child> </child>
<child> <child>
<!-- n-columns=2 n-rows=11 --> <!-- n-columns=2 n-rows=11 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_editor">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
@@ -825,26 +814,6 @@
<property name="top-attach">4</property> <property name="top-attach">4</property>
</packing> </packing>
</child> </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">5</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">6</property>
</packing>
</child>
<child> <child>
<object class="GtkEntry" id="ent_purchdate"> <object class="GtkEntry" id="ent_purchdate">
<property name="visible">True</property> <property name="visible">True</property>
@@ -918,6 +887,30 @@
<property name="top-attach">10</property> <property name="top-attach">10</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSpinButton">
<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">5</property>
</packing>
</child>
<child>
<object class="GtkSpinButton">
<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">6</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
+18 -8
View File
@@ -37,7 +37,7 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="layout-style">start</property> <property name="layout-style">start</property>
<child> <child>
<object class="GtkButton"> <object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property> <property name="label" translatable="yes">Clear</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -50,7 +50,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton"> <object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property> <property name="label" translatable="yes">Apply</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -103,7 +103,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry"> <object class="GtkEntry" id="ent_flt_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
@@ -113,7 +113,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry"> <object class="GtkEntry" id="ent_flt_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
@@ -123,7 +123,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox"> <object class="GtkComboBox" id="cmb_flt_status">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
</object> </object>
@@ -260,7 +260,7 @@
<object class="GtkLabel" id="lbl_fnumber"> <object class="GtkLabel" id="lbl_fnumber">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Platzhalter</property> <property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -359,6 +359,7 @@
<object class="GtkLabel" id="lbl_type"> <object class="GtkLabel" id="lbl_type">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -369,6 +370,7 @@
<object class="GtkLabel" id="lbl_location"> <object class="GtkLabel" id="lbl_location">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -379,6 +381,7 @@
<object class="GtkLabel" id="lbl_description"> <object class="GtkLabel" id="lbl_description">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -389,6 +392,7 @@
<object class="GtkLabel" id="lbl_remarks"> <object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -399,6 +403,7 @@
<object class="GtkLabel" id="lbl_equipment"> <object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -409,6 +414,7 @@
<object class="GtkLabel" id="lbl_current"> <object class="GtkLabel" id="lbl_current">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -419,6 +425,7 @@
<object class="GtkLabel" id="lbl_cable"> <object class="GtkLabel" id="lbl_cable">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -500,10 +507,10 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel" id="lbl_details"> <object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Fuse Details</property> <property name="label" translatable="yes">Edit Fuse</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold"/>
</attributes> </attributes>
@@ -622,6 +629,7 @@
<object class="GtkEntry" id="ent_description"> <object class="GtkEntry" id="ent_description">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -673,6 +681,7 @@
<object class="GtkEntry" id="ent_location"> <object class="GtkEntry" id="ent_location">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -688,6 +697,7 @@
<object class="GtkTextView" id="txt_remarks"> <object class="GtkTextView" id="txt_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object> </object>
</child> </child>
</object> </object>
+72 -48
View File
@@ -242,7 +242,7 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Inventory details</property> <property name="label" translatable="yes">Inventory details</property>
@@ -257,12 +257,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=2 n-rows=11 --> <!-- n-columns=2 n-rows=12 -->
<object class="GtkGrid" id="grd_details"> <object class="GtkGrid" id="grd_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property> <property name="label" translatable="yes">Name</property>
@@ -273,7 +273,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_type">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property> <property name="label" translatable="yes">Type</property>
@@ -284,7 +284,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_storage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property> <property name="label" translatable="yes">Storage</property>
@@ -295,7 +295,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_box">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Box</property> <property name="label" translatable="yes">Box</property>
@@ -306,7 +306,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_equipment">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property> <property name="label" translatable="yes">Equipment</property>
@@ -317,7 +317,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_number">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property> <property name="label" translatable="yes">Number</property>
@@ -328,7 +328,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property> <property name="label" translatable="yes">Weight</property>
@@ -339,7 +339,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property> <property name="label" translatable="yes">Price</property>
@@ -350,7 +350,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_purchdate">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Purchase Date</property> <property name="label" translatable="yes">Purchase Date</property>
@@ -361,7 +361,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_condition">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Condition</property> <property name="label" translatable="yes">Condition</property>
@@ -372,21 +372,23 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property> <property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object> </object>
<packing> <packing>
<property name="left-attach">0</property> <property name="left-attach">0</property>
<property name="top-attach">10</property> <property name="top-attach">11</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="lbl_name"> <object class="GtkLabel" id="lbl_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Placeholder</property> <property name="hexpand">True</property>
<property name="label" translatable="yes">ddd</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -397,6 +399,7 @@
<object class="GtkLabel" id="lbl_conttype"> <object class="GtkLabel" id="lbl_conttype">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -407,6 +410,7 @@
<object class="GtkLabel" id="lbl_storage"> <object class="GtkLabel" id="lbl_storage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -417,6 +421,7 @@
<object class="GtkLabel" id="lbl_box"> <object class="GtkLabel" id="lbl_box">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -427,6 +432,7 @@
<object class="GtkLabel" id="lbl_equipment"> <object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -437,6 +443,7 @@
<object class="GtkLabel" id="lbl_number"> <object class="GtkLabel" id="lbl_number">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -447,6 +454,7 @@
<object class="GtkLabel" id="lbl_weight"> <object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -457,6 +465,7 @@
<object class="GtkLabel" id="lbl_price"> <object class="GtkLabel" id="lbl_price">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -467,6 +476,7 @@
<object class="GtkLabel" id="lbl_purchdate"> <object class="GtkLabel" id="lbl_purchdate">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -477,6 +487,7 @@
<object class="GtkLabel" id="lbl_condition"> <object class="GtkLabel" id="lbl_condition">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -487,6 +498,30 @@
<object class="GtkLabel" id="lbl_remarks"> <object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">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_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>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -568,7 +603,7 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Edit inventory</property> <property name="label" translatable="yes">Edit inventory</property>
@@ -583,7 +618,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=11 --> <!-- n-columns=2 n-rows=12 -->
<object class="GtkGrid" id="grd_editor"> <object class="GtkGrid" id="grd_editor">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@@ -705,13 +740,14 @@
</object> </object>
<packing> <packing>
<property name="left-attach">0</property> <property name="left-attach">0</property>
<property name="top-attach">10</property> <property name="top-attach">11</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="ent_name"> <object class="GtkEntry" id="ent_name">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -725,7 +761,7 @@
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
<property name="top-attach">10</property> <property name="top-attach">11</property>
</packing> </packing>
</child> </child>
<child> <child>
@@ -824,37 +860,25 @@
</packing> </packing>
</child> </child>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <object class="GtkComboBox" id="cmb_category">
</child> <property name="visible">True</property>
<child> <property name="can-focus">False</property>
<placeholder/> </object>
</child> <packing>
<child> <property name="left-attach">1</property>
<placeholder/> <property name="top-attach">10</property>
</child> </packing>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child> </child>
</object> </object>
<packing> <packing>
+383 -31
View File
@@ -27,7 +27,7 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="layout-style">start</property> <property name="layout-style">start</property>
<child> <child>
<object class="GtkButton"> <object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property> <property name="label" translatable="yes">Clear</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -40,7 +40,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton"> <object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property> <property name="label" translatable="yes">Apply</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@@ -82,9 +82,10 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox"> <object class="GtkComboBox" id="cmb_flt_equip">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -92,7 +93,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry"> <object class="GtkEntry" id="ent_flt_text">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
@@ -204,10 +205,13 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">Maintenance Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@@ -216,40 +220,211 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_activities">
<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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <object class="GtkLabel" id="lbl_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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
@@ -321,10 +496,13 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">Edit Maintenance</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@@ -333,36 +511,210 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_editor">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <object class="GtkLabel">
<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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
</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>
</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>
</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>
</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>
</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> </child>
</object> </object>
<packing> <packing>
+355 -28
View File
@@ -2,6 +2,21 @@
<!-- Generated with glade 3.40.0 --> <!-- Generated with glade 3.40.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <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"> <object class="GtkStack" id="topobject">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@@ -29,6 +44,7 @@
<child> <child>
<object class="GtkButton"> <object class="GtkButton">
<property name="label" translatable="yes">Clear</property> <property name="label" translatable="yes">Clear</property>
<property name="name">but_flt_clear</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
@@ -42,6 +58,7 @@
<child> <child>
<object class="GtkButton"> <object class="GtkButton">
<property name="label" translatable="yes">Apply</property> <property name="label" translatable="yes">Apply</property>
<property name="name">but_flt_apply</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
@@ -96,6 +113,7 @@
<object class="GtkEntry"> <object class="GtkEntry">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@@ -167,6 +185,7 @@
<child> <child>
<object class="GtkButton"> <object class="GtkButton">
<property name="label" translatable="yes">New</property> <property name="label" translatable="yes">New</property>
<property name="name">but_new</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
@@ -180,6 +199,7 @@
<child> <child>
<object class="GtkButton"> <object class="GtkButton">
<property name="label" translatable="yes">Edit</property> <property name="label" translatable="yes">Edit</property>
<property name="name">but_edit</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
@@ -222,10 +242,13 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">Project Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@@ -234,36 +257,185 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_details">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
@@ -337,7 +509,7 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">label</property>
@@ -349,36 +521,192 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid"> <object class="GtkGrid" id="grd_editor">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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> </child>
</object> </object>
<packing> <packing>
@@ -392,15 +720,13 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="layout-style">end</property> <property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkButton" id="but_save"> <object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property> <property name="label" translatable="yes">Save</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@@ -414,6 +740,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
+27 -20
View File
@@ -22,17 +22,6 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkDrawingArea" id="drw_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<object class="GtkNotebook" id="ntb_status"> <object class="GtkNotebook" id="ntb_status">
<property name="visible">True</property> <property name="visible">True</property>
@@ -42,6 +31,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">4</property>
<child> <child>
<object class="GtkLabel" id="lbl_dbinfo"> <object class="GtkLabel" id="lbl_dbinfo">
<property name="visible">True</property> <property name="visible">True</property>
@@ -62,17 +52,27 @@ Please use the web frontend wich is already
in an usable state. in an usable state.
For further assistance please consult the related For further assistance please consult the related
thread in "Segeln Forum" thread in "Segeln Forum"</property>
</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<placeholder/> <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> </child>
</object> </object>
</child> </child>
@@ -87,11 +87,18 @@ thread in "Segeln Forum"
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkTreeView" id="tvw_tables"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<child internal-child="selection"> <property name="shadow-type">in</property>
<object class="GtkTreeSelection"/> <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> </child>
</object> </object>
<packing> <packing>
@@ -164,14 +171,14 @@ thread in "Segeln Forum"
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="lbl_version"> <object class="GtkLabel" id="lbl_version">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">YMS-GUI version 0.2.1</property> <property name="label" translatable="yes">YMS version x.x.x</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
+65 -17
View File
@@ -56,30 +56,70 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<child> <child>
<placeholder/> <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>
<child> <child>
<placeholder/> <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">0</property>
</packing>
</child> </child>
<child> <child>
<placeholder/> <object class="GtkEntry" id="ent_flt_text">
</child> <property name="visible">True</property>
<child> <property name="can-focus">True</property>
<placeholder/> <property name="hexpand">True</property>
</child> </object>
<child> <packing>
<placeholder/> <property name="left-attach">1</property>
</child> <property name="top-attach">0</property>
<child> </packing>
<placeholder/>
</child>
<child>
<placeholder/>
</child> </child>
<child> <child>
<placeholder/> <placeholder/>
@@ -785,7 +825,15 @@
</packing> </packing>
</child> </child>
<child> <child>
<placeholder/> <object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Degrees</property>
</object>
<packing>
<property name="left-attach">4</property>
<property name="top-attach">4</property>
</packing>
</child> </child>
<child> <child>
<placeholder/> <placeholder/>
+10 -53
View File
@@ -2,14 +2,11 @@
""" """
Spezial: Spezial:
Notebook mit Vessel, User, Lists, Company Notebook mit Vessel, User, Lists, Settings
""" """
import os import os
import gi
gi.require_version("Gtk", "3.0")
gi.require_version('Rsvg', '2.0')
from gi.repository import GLib, Gtk, Gdk, Rsvg from gi.repository import GLib, Gtk, Gdk, Rsvg
from .view import View from .view import View
@@ -28,22 +25,6 @@ class BaseView(View):
#self.topwidget = builder.get_object("topobject") #self.topwidget = builder.get_object("topobject")
#gtkutils.init_named_controls(self, builder) #gtkutils.init_named_controls(self, builder)
# company types
self.db.cur.execute("SELECT ddval, ddtext FROM dropdown WHERE ddid=2 ORDER BY ddval")
self.comptype = dict(self.db.cur.fetchall())
combobox.load_from_dict(self.combo['flt_type'], {-2: _("─── all ───")} | self.comptype, -1)
# companies
self.lst_companies = Gtk.ListStore(int, str, str, str)
self.db.cur.execute("SELECT compid, compname, comptype, remarks FROM company ORDER BY compname")
for row in self.db.cur.fetchall():
self.lst_companies.append((row[0], row[1], self.comptype[row[2]], row[3]))
treeview.add_column(self.tree['companies'], _('ID'), 0)
treeview.add_column(self.tree['companies'], _('Name'), 1)
treeview.add_column(self.tree['companies'], _('Type'), 2)
treeview.add_column(self.tree['companies'], _('Remarks'), 3)
self.tree['companies'].set_model(self.lst_companies)
# combos # combos
roles = {'captain': 'Captain', 'helmsman': 'Helmsman', 'sailor': 'Sailor'} roles = {'captain': 'Captain', 'helmsman': 'Helmsman', 'sailor': 'Sailor'}
combobox.load_from_dict(self.combo['user_role'], roles) combobox.load_from_dict(self.combo['user_role'], roles)
@@ -118,6 +99,9 @@ class BaseView(View):
treeview.add_column(self.tree['ddlists'], _('Records'), 2) treeview.add_column(self.tree['ddlists'], _('Records'), 2)
self.tree['ddlists'].set_model(self.lst_lists) self.tree['ddlists'].set_model(self.lst_lists)
# Settings date format selection list
# self.context.datefmt_map
# load shape of vessel if available # load shape of vessel if available
if self.context.vessel.vid > 0: if self.context.vessel.vid > 0:
self.db.cur.execute("SELECT shapefile FROM vessel WHERE vid=%s", (self.context.vessel.vid, )) self.db.cur.execute("SELECT shapefile FROM vessel WHERE vid=%s", (self.context.vessel.vid, ))
@@ -186,9 +170,7 @@ class BaseView(View):
vessel.draught_min = self.spin['draught_min'].get_value() vessel.draught_min = self.spin['draught_min'].get_value()
vessel.displacement = self.spin['displacement'].get_value_as_int() vessel.displacement = self.spin['displacement'].get_value_as_int()
vessel.ballast = self.spin['ballast'].get_value_as_int() vessel.ballast = self.spin['ballast'].get_value_as_int()
vessel.remarks = gtkutils.get_text_contents(self.text['vessel_remarks'])
txtbuf = self.text['vessel_remarks'].get_buffer()
vessel.remarks = txtbuf.get_text(txtbuf.get_start_iter(), txtbuf.get_end_iter(), True)
vessel.save() vessel.save()
self.stack['vessel'].set_visible_child(self.box['vessel']) self.stack['vessel'].set_visible_child(self.box['vessel'])
@@ -198,20 +180,11 @@ class BaseView(View):
def on_but_vessel_delete_clicked(self, widget): def on_but_vessel_delete_clicked(self, widget):
pass pass
def on_but_comp_new_clicked(self, widget): def on_but_settings_save_clicked(self, widget):
print("New company") print("Save settings")
#self.entry['sys_currency']
def on_but_comp_edit_clicked(self, widget): #self.spin['sys_max_width']
print("Edit company") #self.spin['sys_max_height']
def on_but_comp_detail_clicked(self, widget):
print("Company details")
def on_but_comp_save_clicked(self, widget):
print("Save company")
def on_but_comp_cancel_clicked(self, widget):
pass
def display_vessel(self, vessel): def display_vessel(self, vessel):
self.label['vesselname'].set_text(vessel.vesselname) self.label['vesselname'].set_text(vessel.vesselname)
@@ -242,22 +215,6 @@ class BaseView(View):
self.check['user_deleted'].set_active('deleted' in user.flags) self.check['user_deleted'].set_active('deleted' in user.flags)
self.entry['user_pass'].set_text('') self.entry['user_pass'].set_text('')
def display_company(self, company):
self.entry['compname'].set_text(company.compname)
# Type
# Type2
self.entry['shortname'].set_text(company.shortname)
self.entry['street'].set_text(company.street)
self.entry['zip'].set_text(company.zip)
self.entry['city'].set_text(company.city)
self.entry['country'].set_text(company.country)
self.entry['contact'].set_text(company.contact)
self.entry['phone'].set_text(company.phone)
self.entry['email'].set_text(company.email)
self.entry['web'].set_text(company.web)
self.entry['customerno'].set_text(company.customerno)
self.entry['contractno'].set_text(company.contractno)
def on_tvw_user_row_activated(self, widget, path, column): def on_tvw_user_row_activated(self, widget, path, column):
# load selected user # load selected user
self.context.user.user_id = treeview.get_value(widget, 0) self.context.user.user_id = treeview.get_value(widget, 0)
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Gdk from gi.repository import GLib, Gtk, Gdk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from .view import View from .view import View
+73
View File
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: WTFPL
import os
from gi.repository import Gtk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.model import company
class CompaniesView(View):
def __init__(self, context):
super().__init__(context, _("Companies"), "companies.ui")
self.comp = company.Company(context.db) # current record
self.newrecord = False
# company types
self.db.cur.execute("SELECT ddval, ddtext FROM dropdown WHERE ddid=2 ORDER BY ddval")
self.comptype = dict(self.db.cur.fetchall())
combobox.load_from_dict(self.combo['flt_type'], {-2: _("─── all ───")} | self.comptype, -2)
# companied
self.lst_companies = Gtk.ListStore(int, str, str, str)
self.db.cur.execute("SELECT compid, compname, comptype, remarks FROM company ORDER BY compname")
for row in self.db.cur.fetchall():
self.lst_companies.append((row[0], row[1], self.comptype[row[2]], row[3]))
treeview.add_column(self.tree['companies'], _('ID'), 0)
treeview.add_column(self.tree['companies'], _('Name'), 1)
treeview.add_column(self.tree['companies'], _('Type'), 2)
treeview.add_column(self.tree['companies'], _('Remarks'), 3)
self.tree['companies'].set_model(self.lst_companies)
def display_company(self, company):
self.entry['compname'].set_text(company.compname)
# Type
# Type2
self.entry['shortname'].set_text(company.shortname)
self.entry['street'].set_text(company.street)
self.entry['zip'].set_text(company.zip)
self.entry['city'].set_text(company.city)
self.entry['country'].set_text(company.country)
self.entry['contact'].set_text(company.contact)
self.entry['phone'].set_text(company.phone)
self.entry['email'].set_text(company.email)
self.entry['web'].set_text(company.web)
self.entry['customerno'].set_text(company.customerno)
self.entry['contractno'].set_text(company.contractno)
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['comp_edit'])
def on_but_edit_clicked(self, widget):
self.topwidget.set_visible_child(self.box['comp_edit'])
def on_but_detail_clicked(self, widget):
self.topwidget.set_visible_child(self.box['comp_detail'])
# buttons on detail page
# edit2 uses edit callback
def on_but_close_clicked(self, widget):
self.topwidget.set_visible_child(self.box['companies'])
def on_but_delete_clicked(self, widget):
self.topwidget.set_visible_child(self.box['companies'])
# buttons on edit page
def on_but_save_clicked(self, widget):
pass
def on_but_cancel_clicked(self, widget):
self.topwidget.set_visible_child(self.box['companies'])
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Gdk from gi.repository import GLib, Gtk, Gdk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Gdk from gi.repository import GLib, Gtk, Gdk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Gdk from gi.repository import GLib, Gtk, Gdk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from .view import View from .view import View
-2
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from .view import View from .view import View
+93 -3
View File
@@ -1,10 +1,9 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
import re import re
from gi.repository import Gtk, Rsvg
import xml.etree.ElementTree as ET
from yms import gtkutils, combobox, treeview from yms import gtkutils, combobox, treeview
@@ -21,6 +20,7 @@ class StatusView:
gtkutils.init_named_controls(self, builder) gtkutils.init_named_controls(self, builder)
# Generic information # Generic information
self.label['version'].set_text("YMS version {}".format(context.__version__))
self.label['dbinfo'].set_text("Database: {} on {}".format(context.cfg['db'], context.cfg['host'])) self.label['dbinfo'].set_text("Database: {} on {}".format(context.cfg['db'], context.cfg['host']))
# Load table status info # Load table status info
@@ -42,6 +42,96 @@ class StatusView:
contents = re.sub(r'(^\s*pass\s*=\s*).*$', r'\1********', contents, flags=re.MULTILINE) contents = re.sub(r'(^\s*pass\s*=\s*).*$', r'\1********', contents, flags=re.MULTILINE)
self.text ['config'].get_buffer().set_text(contents) self.text ['config'].get_buffer().set_text(contents)
# data for svg deck plan
self.svg = None
self.svg_width = 0
self.svg_height = 0
self.svg_scale = 1.0
self.svg_x = 0.0
self.svg_y = 0.0
self.svg_centerline_y = 0.0
self.load_svg()
def load_svg(self):
if not self.context.vessel.shapefile:
print("No Shapefile defined for current vessel")
return
shapefile = os.path.join(self.context.cfg['shapedir'], self.context.vessel.shapefile)
if not (os.path.isfile(shapefile) or os.access(shapefile, os.R_OK)):
print(f"Shapefile '{shapefile}' not found or not readable")
return
try:
self.svg = Rsvg.Handle.new_from_file(shapefile)
success, width, height = self.svg.get_intrinsic_size_in_pixels()
if not success:
raise RuntimeError("SVG has no pixelsize")
self.svg_width = width
self.svg_height = height
print(f"SVG: {self.svg_width} x {self.svg_height}")
self.area['status'].queue_draw()
except Exception as e:
print("Error trying to load svg deck plan:", e)
return
# try to detect centerline
self.svg_centerline_y = None
try:
tree = ET.parse(shapefile)
except Exception as e:
print("Error reading centerline from svg:", e)
self.svg_centerline_y = self.svg_height / 2
return
root = tree.getroot()
found = False
for element in root.iter():
if element.get("id") == "centerline":
found = True
print("\n--- centerline gefunden ---")
print("Tag:", element.tag)
print("Attribute:", element.attrib)
y1 = element.get("y1")
y2 = element.get("y2")
if y1 is not None and y2 is not None:
y1 = float(y1)
y2 = float(y2)
if not math.isclose(y1, y2, abs_tol=0.001):
raise ValueError(f"centerline not horizontal: y1={y1}, y2={y2}")
# calc arithmetic mean as fallback
self.centerline_y = (y1 + y2) / 2
else:
self.centerline_y = y1
print(f"centerline: SVG Y = {self.centerline_y}")
return
if not found:
print("No centerline with id='centerline' found!")
def on_drw_status_draw(self, area, cr):
cr.set_source_rgb(0.92, 0.97, 1.0)
cr.paint()
allocation = area.get_allocation()
scale_x = allocation.width / self.svg_width
scale_y = allocation.height / self.svg_height
self.svg_scale = min(scale_x, scale_y)
width = self.svg_width * self.svg_scale
height = self.svg_height * self.svg_scale
self.svg_x = (allocation.width - width) / 2
self.svg_y = (allocation.height - height) / 2
cr.save()
cr.translate(self.svg_x, self.svg_y)
cr.scale(self.svg_scale, self.svg_scale)
viewport = Rsvg.Rectangle()
viewport.x = 0
viewport.y = 0
viewport.width = self.svg_width
viewport.height = self.svg_height
self.svg.render_document(cr, viewport)
cr.restore()
return False
def get_table_counts(self): def get_table_counts(self):
# Detect all tables in database # Detect all tables in database
sql= ("SELECT table_name " sql= ("SELECT table_name "
+65 -16
View File
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: WTFPL # SPDX-License-Identifier: WTFPL
import os import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Gdk from gi.repository import GLib, Gtk, Gdk
from .view import View from .view import View
@@ -15,19 +13,13 @@ class StorageView(View):
def __init__(self, context): def __init__(self, context):
super().__init__(context, _("Storage"), "storage.ui") super().__init__(context, _("Storage"), "storage.ui")
self.context = context
self.storage = storage.Storage(context.db) # current record self.storage = storage.Storage(context.db) # current record
self.newrecord = False self.newrecord = False
self.lst_storage = Gtk.ListStore(int, str, str, str) self.lst_storage = Gtk.ListStore(int, str, str, str)
sql = ( self.load_list()
"SELECT sid, sname, CONCAT(x, ',', y, ',', z) AS position, remarks "
"FROM storage "
"WHERE vid=%s "
"ORDER BY sname"
)
self.db.cur.execute(sql, (context.vessel.vid,))
for row in self.db.cur.fetchall():
self.lst_storage.append(row)
treeview.add_column(self.tree['storage'], _('ID'), 0) treeview.add_column(self.tree['storage'], _('ID'), 0)
treeview.add_column(self.tree['storage'], _('Name'), 1) treeview.add_column(self.tree['storage'], _('Name'), 1)
@@ -35,18 +27,34 @@ class StorageView(View):
treeview.add_column(self.tree['storage'], _('Remarks'), 3) treeview.add_column(self.tree['storage'], _('Remarks'), 3)
self.tree['storage'].set_model(self.lst_storage) self.tree['storage'].set_model(self.lst_storage)
combodict = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE) #combodict = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE)
combobox.load_from_dict(self.combo['type'], combodict) #combobox.load_from_dict(self.combo['type'], combodict)
combodict = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE) combodict = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE)
print(combodict)
combobox.load_from_dict(self.combo['type'], combodict) combobox.load_from_dict(self.combo['type'], combodict)
combodict = self.context.lookup.enum('storage.capaunit') combodict = self.context.lookup.enum('storage.capaunit')
combobox.load_from_dict(self.combo['unit'], combodict) combobox.load_from_dict(self.combo['unit'], combodict)
def load_list(self): def add_row(self):
pass pass
def refresh_row(self):
pass
def load_list(self):
self.lst_storage.clear()
sql = (
"SELECT sid, sname, CONCAT(x, ',', y, ',', z) AS position, remarks "
"FROM storage "
"WHERE vid=%s "
"ORDER BY sname"
)
self.db.cur.execute(sql, (self.context.vessel.vid,))
for row in self.db.cur.fetchall():
self.lst_storage.append(row)
def display_record(self): def display_record(self):
self.label['name'].set_text(self.storage.sname) self.label['name'].set_text(self.storage.sname)
self.label['remarks'].set_text(self.storage.remarks or '') self.label['remarks'].set_text(self.storage.remarks or '')
@@ -56,12 +64,36 @@ class StorageView(View):
self.spin['x'].set_value(self.storage.x) self.spin['x'].set_value(self.storage.x)
self.spin['y'].set_value(self.storage.y) self.spin['y'].set_value(self.storage.y)
self.spin['z'].set_value(self.storage.z) self.spin['z'].set_value(self.storage.z)
self.spin['wx'].set_value(self.storage.wx)
self.spin['wy'].set_value(self.storage.wy)
self.spin['wz'].set_value(self.storage.wz)
self.spin['angle'].set_value(self.storage.angle)
self.spin['capacity'].set_value(self.storage.capacity)
combobox.activate_row(self.combo['type'], self.storage.stype)
combobox.activate_row(self.combo['unit'], self.storage.capaunit)
self.text['remarks'].get_buffer().set_text(self.storage.remarks or '') self.text['remarks'].get_buffer().set_text(self.storage.remarks or '')
def clear_record(self):
self.storage.clear()
self.entry['sname'].set_text('')
self.spin['x'].set_value(0)
self.spin['y'].set_value(0)
self.spin['z'].set_value(0)
self.spin['wx'].set_value(0)
self.spin['wy'].set_value(0)
self.spin['wz'].set_value(0)
self.spin['angle'].set_value(0)
self.spin['capacity'].set_value(0)
combobox.activate_row(self.combo['type'], -1)
combobox.activate_row(self.combo['unit'], .1)
self.text['remarks'].get_buffer().set_text('')
# buttons on list page # buttons on list page
def on_but_new_clicked(self, widget): def on_but_new_clicked(self, widget):
self.newrecord = True self.newrecord = True
self.label['title_edit'].set_text("Add new Storage") self.label['title_edit'].set_text("Add new Storage")
self.clear_record()
self.storage.vid = self.context.vessel.vid
self.topwidget.set_visible_child(self.box['stor_edit']) self.topwidget.set_visible_child(self.box['stor_edit'])
def on_but_edit_clicked(self, widget): def on_but_edit_clicked(self, widget):
@@ -91,12 +123,29 @@ class StorageView(View):
# buttons on edit page # buttons on edit page
def on_but_save_clicked(self, widget): def on_but_save_clicked(self, widget):
self.newrecord = False
# check mandatory fields # check mandatory fields
sname = self.entry['sname'].get_text().strip() sname = self.entry['sname'].get_text().strip()
if not sname: if not sname:
# TODO error marker
return return
# here be dragons # get fields from ui form
self.storage.sname = sname
self.storage.stype = combobox.get_list_value(self.combo['type'])
self.storage.x = self.spin['x'].get_value()
self.storage.y = self.spin['y'].get_value()
self.storage.z = self.spin['z'].get_value()
self.storage.wx = self.spin['wx'].get_value()
self.storage.wy = self.spin['wy'].get_value()
self.storage.wz = self.spin['wz'].get_value()
self.storage.angle = self.spin['angle'].get_value()
self.storage.capacity = self.spin['capacity'].get_value()
self.storage.capaunit = combobox.get_list_value(self.combo['unit'])
self.storage.remarks = gtkutils.get_text_contents(self.text['remarks'])
self.storage.save()
if self.newrecord:
self.load_list()
self.newrecord = False
self.topwidget.set_visible_child(self.box['storage'])
def on_but_cancel_clicked(self, widget): def on_but_cancel_clicked(self, widget):
self.topwidget.set_visible_child(self.box['storage']) self.topwidget.set_visible_child(self.box['storage'])
-2
View File
@@ -7,8 +7,6 @@ SPDX-License-Identifier: WTFPL
""" """
import os import os
import locale import locale
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Gdk from gi.repository import GLib, Gtk, Gdk
from yms import gtkutils from yms import gtkutils
+15
View File
@@ -42,6 +42,7 @@ from yms.lookup import Lookup
from yms.view.base import BaseView from yms.view.base import BaseView
from yms.view.storage import StorageView from yms.view.storage import StorageView
from yms.view.boxes import BoxesView from yms.view.boxes import BoxesView
from yms.view.companies import CompaniesView
from yms.view.equipment import EquipmentView from yms.view.equipment import EquipmentView
from yms.view.inventory import InventoryView from yms.view.inventory import InventoryView
from yms.view.provisions import ProvisionsView from yms.view.provisions import ProvisionsView
@@ -52,6 +53,12 @@ from yms.view.fuses import FusesView
from yms.view.documents import DocumentsView from yms.view.documents import DocumentsView
from yms.view.status import StatusView from yms.view.status import StatusView
__author__ = "Thomas Hooge"
__copyright__ = "Copyright 2024-2026"
__version__ = "0.2.2"
__email__ = "thomas@hoogi.de"
__status__ = "Development"
class AppContext: class AppContext:
cfg = { cfg = {
@@ -76,12 +83,17 @@ class AppContext:
} }
def __init__(self): def __init__(self):
self.__version__ = __version__
self.db = None self.db = None
self.user = None self.user = None
self.vessel = None self.vessel = None
self.ui_path = os.path.join(self.get_sharepath(), "yms", "ui") self.ui_path = os.path.join(self.get_sharepath(), "yms", "ui")
self.textdomain = "ymsgui" self.textdomain = "ymsgui"
self.datefmt = '%d.%m.%Y' self.datefmt = '%d.%m.%Y'
# system settings stored in database
self.curr_sym = '€'
self.img_max_width = 1024
self.img_max_height = 768
def set_db(self, db): def set_db(self, db):
self.db = db self.db = db
@@ -121,6 +133,7 @@ class Frontend:
"base": BaseView(context), "base": BaseView(context),
"storage": StorageView(context), "storage": StorageView(context),
"box": BoxesView(context), "box": BoxesView(context),
"companies": CompaniesView(context),
"equipment": EquipmentView(context), "equipment": EquipmentView(context),
"inventory": InventoryView(context), "inventory": InventoryView(context),
"provisions": ProvisionsView(context), "provisions": ProvisionsView(context),
@@ -182,6 +195,8 @@ def create_config(cfgfile):
if __name__ == "__main__": if __name__ == "__main__":
print("Startup sequence entered...")
context = AppContext() context = AppContext()
locale.setlocale(locale.LC_ALL, '') locale.setlocale(locale.LC_ALL, '')