Work on native gui. Display records and add missing tasks and measurements.

This commit is contained in:
2026-09-30 16:18:44 +02:00
parent c3109b9d2a
commit 131af7d9e7
45 changed files with 6043 additions and 1966 deletions
+1
View File
@@ -14,6 +14,7 @@ Yacht Management Software (YMS) Installation
1.2 Native GUI
- Python GTK3
- python3-gi
- python3-fitz
- python3-pyudev
- gir1.2-gtk-3.0
- gir1.2-rsvg-2.0
+1
View File
@@ -326,6 +326,7 @@ CREATE TABLE measurement (
unit tinyint(3) NOT NULL DEFAULT 1,
accuracy enum('unknown','precise','normal','rough','estimated') NOT NULL DEFAULT 'unknown',
mdate date DEFAULT NULL,
mcat tinyint(3) DEFAULT NULL,
note varchar(80) DEFAULT NULL,
PRIMARY KEY (mid),
FOREIGN KEY fk_measurement_vessel (vid)
+17 -16
View File
@@ -64,22 +64,23 @@ INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 212, 'fuse filter json');
/* List of lists is always required */
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(0, 0, 'Liste der Listen'),
(0, 1, 'Rumpftypen'),
(0, 2, 'Firmentypen'),
(0, 3, 'Stauraumtypen'),
(0, 4, 'Ausrüstungskategorien'),
(0, 5, 'Proviantkategorien'),
(0, 6, 'Provianteinheiten'),
(0, 7, 'Sicherungstypen'),
(0, 8, 'Einheiten'),
(0, 9, 'Kistentypen'),
(0, 10, 'Sicherungsblöcke'), -- fuse locations
(0, 11, 'Kabeltypen'),
(0, 12, 'Technische Kabel-Bezeichnung'),
(0, 13, 'Inventarkategorien'),
(0, 14, 'BBN vessel.data Felder');
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(0, 0, 'Liste der Listen', NULL),
(0, 1, 'Rumpftypen', NULL),
(0, 2, 'Firmentypen', NULL),
(0, 3, 'Stauraumtypen', NULL),
(0, 4, 'Ausrüstungskategorien', NULL),
(0, 5, 'Proviantkategorien', NULL),
(0, 6, 'Provianteinheiten', NULL),
(0, 7, 'Sicherungstypen', NULL),
(0, 8, 'Einheiten', NULL),
(0, 9, 'Kistentypen', NULL),
(0, 10, 'Sicherungsblöcke', NULL), -- fuse locations
(0, 11, 'Kabeltypen', NULL),
(0, 12, 'Technische Kabel-Bezeichnung', NULL),
(0, 13, 'Inventarkategorien', NULL),
(0, 14, 'BBN vessel.data Felder', 'locked'),
(0, 15, 'Messungskategorien', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 1, 'Lieferant', 'fixed'),
+17 -16
View File
@@ -63,22 +63,23 @@ INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 212, 'fuse filter json');
/* List of lists is always required */
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(0, 0, 'list of lists'),
(0, 1, 'hull type'),
(0, 2, 'company type'),
(0, 3, 'storage type'),
(0, 4, 'equipment category'),
(0, 5, 'provision category'),
(0, 6, 'provision unit'),
(0, 7, 'fuse type'),
(0, 8, 'unit'),
(0, 9, 'box types'),
(0, 10, 'fuse blocks'),
(0, 11, 'cable types'),
(0, 12, 'cable desc. technical'),
(0, 13, 'inventory category'),
(0, 14, 'BBN vessel.data fields');
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(0, 0, 'list of lists', NULL),
(0, 1, 'hull type', NULL),
(0, 2, 'company type', NULL),
(0, 3, 'storage type', NULL),
(0, 4, 'equipment category', NULL),
(0, 5, 'provision category', NULL),
(0, 6, 'provision unit', NULL),
(0, 7, 'fuse type', NULL),
(0, 8, 'unit', NULL),
(0, 9, 'box types', NULL),
(0, 10, 'fuse blocks', NULL),
(0, 11, 'cable types', NULL),
(0, 12, 'cable desc. technical', NULL),
(0, 13, 'inventory category', NULL),
(0, 14, 'BBN vessel.data fields', 'locked'),
(0, 15, 'measurement category', NULL);
INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 1, 'Supplier', 'fixed'),
+1096 -335
View File
File diff suppressed because it is too large Load Diff
+16
View File
@@ -125,6 +125,22 @@ class Database:
self.conn.commit()
return self.cur.rowcount == 1
def load_setting(self, sno):
sql = "SELECT valstr, valint FROM settings WHERE userid=0 AND sno=%s"
self.cur.execute(sql, (sno,))
row = self.cur.fetchone()
if not row:
sql = "INSERT INTO settings (userid, sno) VALUES (0, %s)"
self.cur.execute(sql, (sno,))
self.conn.commit()
return (None, None)
return row
def save_setting(self, sno, valstr, valint):
sql = "UPDATE settings SET valstr=%s, valint=%s WHERE userid=0 AND sno=%s"
values = (valstr, valint, sno)
return self.execute_write(sql, values, 1)
def execute_write(self, sql, values=(), expected_rows=None):
"""
Execute an INSERT, UPDATE, or DELETE statement.
+75 -14
View File
@@ -21,6 +21,58 @@ class Dropdown:
FUSE_BLOCK = 10
CABLE_TYPE = 11
CABLE_TECHNAME = 12
INVENTORY_CATEGORY = 13
BBN_VESSELDATA = 14
MEASUREMENT_CATEGORY = 15
Dependencies = {
HULL_TYPE: (
# unused
),
COMPANY_TYPE: (
('company', 'comptype'),
('company', 'comptype2')
),
STORAGE_TYPE: (
('storage', 'stype'),
),
EQUIPMENT_CATEGORY: (
('equipment', 'ecat'),
),
PROVISION_CATEGORY: (
('provisions', 'provcat'),
),
PROVISION_UNIT: (
('provisions', 'unit'),
),
FUSE_TYPE: (
('fuse', 'ftype'),
),
UNIT: (
('measurement', 'unit'),
),
BOX_TYPE: (
('box', 'boxtype'),
),
FUSE_BLOCK: (
('fuse', 'location'),
),
CABLE_TYPE: (
('cable', 'cabletype'),
),
CABLE_TECHNAME: (
('cable', 'techname'),
),
INVENTORY_CATEGORY: (
('inventory', 'invcat'),
),
BBN_VESSELDATA: (
#unused
),
MEASUREMENT_CATEGORY: (
('measurement', 'mcat'),
)
}
class Lookup:
@@ -38,27 +90,28 @@ class Lookup:
TODO translation via gettext needed
"""
db_enums = {
'user.role': ('user', 'role'),
'dropdown.flags': ('dropdown', 'flags'),
'vessel.vtype': ('vessel', 'vtype'),
'storage.capaunit': ('storage', 'capaunit'),
'tagref.objtype': ('tagref', 'objtype'),
'inventory.conttype': ('inventory', 'conttype'),
'inventory.invcond': ('inventory', 'invcond'),
'cable.cablecond': ('cable', 'cablecond'),
'measurement.accuracy': ('measurement', 'accuracy'),
'checkitem.checkresult': ('checkitem', 'checkresult'),
'checklist.clstate': ('checklist', 'clstate'),
'company.flags': ('company', 'flags'),
'docref.reftype': ('docref', 'reftype'),
'document.doctype': ('document', 'doctype'),
'document.roleaccess': ('document', 'roleaccess'),
'docref.reftype': ('docref', 'reftype'),
'dropdown.flags': ('dropdown', 'flags'),
'inventory.conttype': ('inventory', 'conttype'),
'inventory.invcond': ('inventory', 'invcond'),
'maintenance.maintstate': ('maintenance', 'maintstate'),
'measurement.accuracy': ('measurement', 'accuracy'),
'note.notetype': ('note', 'notetype'),
'project.projstate': ('project', 'projstate'),
'signalk.datatype': ('signalk', 'datatype'),
'signalk.objtype': ('signalk', 'objtype'),
'storage.capaunit': ('storage', 'capaunit'),
'tagref.objtype': ('tagref', 'objtype'),
'task.priority': ('task', 'priority'),
'task.taskstate': ('task', 'taskstate'),
'note.notetype': ('note', 'notetype'),
'checklist.clstate': ('checklist', 'clstate'),
'checkitem.checkresult': ('checkitem', 'checkresult'),
'signalk.objtype': ('signalk', 'objtype'),
'signalk.datatype': ('signalk', 'datatype')
'user.role': ('user', 'role'),
'vessel.vtype': ('vessel', 'vtype')
}
for key, (table, column) in db_enums.items():
self._enums[key] = self.db.load_enum(table, column)
@@ -83,6 +136,14 @@ class Lookup:
def dropdown(self, ddid):
return self._dropdowns[ddid]
def user(self):
userlist = {}
sql = "SELECT userid, displayname FROM user ORDER BY displayname"
self.db.cur.execute(sql)
for row in self.db.cur.fetchall():
userlist[row[0]] = row[1]
return userlist
def refresh(self):
# TODO ugly hack please improve
self._load_dropdowns()
+1 -1
View File
@@ -6,7 +6,7 @@ class Cable(DbRecord):
table = "cable"
pk_field = "cableid"
fields = ('cableid', 'vid', 'cablename', 'cabletype', 'techname', 'length',
fields = ('vid', 'cablename', 'cabletype', 'techname', 'length',
'conductors', 'diameter', 'xsection', 'weight', 'color', 'supplier',
'manufacturer', 'cablecond', 'remarks')
+2 -2
View File
@@ -23,7 +23,7 @@ class DbRecord:
self.conn = db.conn
self.last_update = None
self.title = _("DbRecord({})") # for pretty print
self._title = _("DbRecord({})") # for pretty print
if record_id is not None:
self.pk_value = int(record_id)
@@ -142,7 +142,7 @@ class DbRecord:
return True
def __str__(self):
out = [self.title.format(self.pk_value)]
out = [self._title.format(self.pk_value)]
for field in self.fields:
value = getattr(self, field, None)
out.append(" {:15}: {}".format(field, value))
+1 -1
View File
@@ -6,7 +6,7 @@ class Document(DbRecord):
table = "document"
pk_field = "docid"
fields = ('docid', 'doctype', 'mimetype', 'filename', 'extension',
fields = ('doctype', 'mimetype', 'filename', 'extension',
'hash', 'docsize', 'doctime', 'docdate', 'title', 'pages', 'remarks',
'roleaccess')
+1 -1
View File
@@ -6,7 +6,7 @@ class Equipment(DbRecord):
table = "equipment"
pk_field = "eid"
fields = ('eid', 'vid' 'ename', 'shortname', 'model', 'ecat', 'serial',
fields = ('eid', 'vid', 'ename', 'shortname', 'model', 'ecat', 'serial',
'supplier', 'manufacturer', 'purchdate', 'price', 'weight', 'remarks',
'flags')
+3 -2
View File
@@ -6,8 +6,9 @@ class Inventory(DbRecord):
table = "inventory"
pk_field = "invid"
fields = ('invid', 'invname', 'conttype', 'sid', 'boxid', 'eid', 'number',
'weight', 'price', 'purchdate', 'invcond', 'remarks', 'flags')
fields = ('invid', 'invname', 'icat', 'conttype', 'sid', 'boxid', 'eid',
'number', 'weight', 'price', 'purchdate', 'invcond', 'remarks',
'flags')
def __init__(self, db, invid=None):
super().__init__(db, invid)
+3 -3
View File
@@ -5,9 +5,9 @@ from .dbrecord import DbRecord
class Project(DbRecord):
table = "project"
pk_field = "prokid"
fields = ('projid', 'projname', 'vid', 'responsible', 'startdate',
'duration', 'costs_plan', 'costs_final', 'remarks', 'projstate')
pk_field = "projid"
fields = ('projname', 'vid', 'responsible', 'startdate', 'duration',
'costs_plan', 'costs_final', 'remarks', 'projstate')
def __init__(self, db, projid=None):
super().__init__(db, projid)
+2 -2
View File
@@ -6,8 +6,8 @@ class Task(DbRecord):
table = "task"
pk_field = "taskid"
fields = ('taskid', 'vid', 'projid', 'taskname', 'priority', 'taskstate',
'state_ts', 'plandate', 'duedate', 'started', 'finished', 'responsible')
fields = ('vid', 'projid', 'taskname', 'priority', 'taskstate', 'state_ts',
'plandate', 'duedate', 'started', 'finished', 'responsible', 'remarks')
def __init__(self, db, taskid=None):
super().__init__(db, taskid)
+360 -13
View File
@@ -62,12 +62,7 @@
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkNotebook" id="ntb_basedata">
<object class="GtkNotebook" id="topobject">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
@@ -200,6 +195,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -211,6 +207,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -222,6 +219,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -233,6 +231,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -244,6 +243,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -255,6 +255,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -266,6 +267,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -277,6 +279,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -288,6 +291,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -321,10 +325,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="sls_shipyard">
<object class="GtkLabel" id="lbl_shipyard">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -347,6 +352,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -357,7 +363,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Belt position, front</property>
<property name="label" translatable="yes">Belt position, bow</property>
</object>
<packing>
<property name="left-attach">0</property>
@@ -376,10 +382,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_belt_front">
<object class="GtkLabel" id="lbl_belt_bow">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -391,6 +398,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -413,6 +421,7 @@
<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>
@@ -424,6 +433,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -435,6 +447,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -457,6 +470,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -536,6 +550,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_vessel">
<property name="visible">True</property>
@@ -562,6 +577,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -1479,7 +1497,7 @@
</packing>
</child>
<child>
<object class="GtkEntry" id="spi_sys_currency">
<object class="GtkEntry" id="ent_sys_currency">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
@@ -1550,7 +1568,7 @@
</packing>
</child>
<child>
<object class="GtkComboBox">
<object class="GtkComboBox" id="cmb_datefmt">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
@@ -1609,10 +1627,339 @@
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_backup">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Backup to USB stick</property>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=10 -->
<object class="GtkGrid" id="grd_backup">
<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">UUID</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Device</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_usbdevice">
<property name="label" translatable="yes">Detect</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_usbdevice_clicked" swapped="no"/>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_uuid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_device">
<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="GtkButton" id="but_usbinit">
<property name="label" translatable="yes">Initialize</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_usbinit_clicked" swapped="no"/>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Last Backup</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_last_backup">
<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">9</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Serial</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_serial">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Vendor</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">Model</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Partition</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_vendor">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_model">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_partition">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_infotext">
<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>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filesystem</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_usb_fstype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkTreeView" id="tvw_backuplist">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Backup</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>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Restore</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">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="position">4</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Backup</property>
</object>
<packing>
<property name="position">4</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
+5
View File
@@ -158,6 +158,7 @@
<object class="GtkTreeView" id="tvw_box">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_box_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -295,6 +296,7 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -507,6 +509,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
@@ -527,6 +530,8 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
+24 -4
View File
@@ -172,6 +172,7 @@
<object class="GtkTreeView" id="tvw_cables">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_cables_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -420,6 +421,7 @@
<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>
@@ -552,6 +554,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -632,6 +636,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
@@ -649,14 +654,19 @@
</child>
<child>
<!-- n-columns=2 n-rows=13 -->
<object class="GtkGrid">
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -679,6 +689,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -701,6 +714,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Length</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -712,6 +728,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Conductors</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -734,6 +753,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Cross section</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -800,6 +822,7 @@
<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>
@@ -952,9 +975,6 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
+106 -42
View File
@@ -110,6 +110,10 @@
<object class="GtkTreeView" id="tvw_companies">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_companies_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
@@ -183,9 +187,12 @@
<object class="GtkBox" id="box_comp_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit company</property>
@@ -204,11 +211,16 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -220,6 +232,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -242,7 +257,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type2</property>
<property name="label" translatable="yes">Secondary type</property>
</object>
<packing>
<property name="left-attach">0</property>
@@ -281,7 +296,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_shortname">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">20</property>
@@ -413,7 +428,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_street">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">40</property>
@@ -424,7 +439,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_zip">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">10</property>
@@ -435,7 +450,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_city">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">30</property>
@@ -446,7 +461,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_country">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">30</property>
@@ -457,7 +472,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_contact">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">30</property>
@@ -468,7 +483,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_phone">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">30</property>
@@ -480,7 +495,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_email">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">50</property>
@@ -492,7 +507,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_web">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">40</property>
@@ -503,7 +518,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_customerno">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">20</property>
@@ -514,7 +529,7 @@
</packing>
</child>
<child>
<object class="GtkEntry">
<object class="GtkEntry" id="ent_contractno">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">20</property>
@@ -595,7 +610,7 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Company details</property>
@@ -610,12 +625,12 @@
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=15 -->
<!-- n-columns=2 n-rows=16 -->
<object class="GtkGrid" id="grd_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
@@ -626,7 +641,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_type">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
@@ -637,7 +652,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_type2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type secondary</property>
@@ -648,7 +663,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_shortname">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Short name</property>
@@ -659,7 +674,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_street">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Street</property>
@@ -670,7 +685,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_zip">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">ZIP</property>
@@ -681,7 +696,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_city">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">City</property>
@@ -692,7 +707,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_country">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Country</property>
@@ -707,6 +722,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -718,6 +735,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -729,6 +748,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -740,6 +761,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -751,6 +774,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -762,6 +787,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -773,6 +800,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -784,6 +813,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -791,10 +822,9 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_contact">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Contact</property>
</object>
<packing>
@@ -803,10 +833,9 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_phone">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Phone</property>
</object>
<packing>
@@ -815,10 +844,9 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_email">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Email</property>
</object>
<packing>
@@ -827,10 +855,9 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_web">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Web</property>
</object>
<packing>
@@ -839,10 +866,9 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_customerno">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Customer no.</property>
</object>
<packing>
@@ -851,10 +877,9 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_contractno">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Contract no.</property>
</object>
<packing>
@@ -863,15 +888,15 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</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">14</property>
<property name="top-attach">15</property>
</packing>
</child>
<child>
@@ -879,6 +904,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -890,6 +917,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -901,6 +930,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -912,6 +943,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -919,10 +952,12 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_custno">
<object class="GtkLabel" id="lbl_customerno">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -934,6 +969,8 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -945,6 +982,33 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">15</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_flags">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Flags</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">14</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_flags">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -993,12 +1057,12 @@
</packing>
</child>
<child>
<object class="GtkButton" id="but_cance">
<property name="label" translatable="yes">Cancel</property>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
+55 -3
View File
@@ -147,6 +147,7 @@
<object class="GtkTreeView" id="tvw_documents">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_documents_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -240,7 +241,7 @@
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<!-- n-columns=3 n-rows=9 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -260,6 +261,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -304,6 +306,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -315,6 +318,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -326,6 +330,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -370,6 +375,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -381,6 +387,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -392,6 +399,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -403,10 +411,11 @@
<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>
<property name="top-attach">8</property>
</packing>
</child>
<child>
@@ -415,15 +424,54 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_roleaccess">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Role access</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_roleaccess">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkImage" id="img_preview">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="yalign">0</property>
<property name="stock">gtk-missing-image</property>
</object>
<packing>
<property name="expand">False</property>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">9</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -494,6 +542,8 @@
<object class="GtkBox" id="box_doc_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
@@ -515,6 +565,8 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
+37 -2
View File
@@ -334,7 +334,7 @@
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=11 -->
<!-- n-columns=2 n-rows=12 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -457,7 +457,7 @@
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
@@ -465,6 +465,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -476,6 +477,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -487,6 +489,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -498,6 +501,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -509,6 +513,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">False</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -520,6 +525,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -531,6 +537,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -542,6 +549,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -553,6 +561,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -564,6 +573,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -576,6 +586,31 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_flags">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Flags</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_flags">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
+31 -2
View File
@@ -157,6 +157,7 @@
<object class="GtkTreeView" id="tvw_fuses">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_fuses_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -235,7 +236,7 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_details">
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Fuse Details</property>
@@ -261,6 +262,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -349,6 +351,7 @@
<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>
@@ -360,6 +363,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -371,6 +375,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -382,6 +387,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -393,6 +399,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -404,6 +413,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -415,6 +425,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -426,6 +437,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -505,7 +517,10 @@
<object class="GtkBox" id="box_fuse_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
@@ -523,14 +538,19 @@
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid">
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -542,6 +562,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -553,6 +576,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -564,6 +590,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Current</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
+25 -1
View File
@@ -388,7 +388,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">ddd</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -400,6 +400,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -411,6 +412,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -422,6 +424,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -433,6 +436,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -444,6 +448,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -455,6 +460,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -466,6 +472,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -477,6 +484,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -488,6 +496,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -500,6 +509,8 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -522,6 +533,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -602,6 +614,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
@@ -622,11 +635,16 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -638,6 +656,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -682,6 +703,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
+30
View File
@@ -127,6 +127,7 @@
<object class="GtkTreeView" id="tvw_maintenance">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_maintenance_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -240,6 +241,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -262,6 +264,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -339,6 +342,7 @@
<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>
@@ -350,6 +354,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -361,6 +366,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -372,6 +378,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -383,6 +390,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -394,6 +402,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -405,6 +414,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -416,6 +426,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -446,6 +459,7 @@
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
@@ -494,7 +508,10 @@
<object class="GtkBox" id="box_maint_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
@@ -515,11 +532,16 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Activities</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -531,6 +553,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -629,6 +654,7 @@
<object class="GtkComboBox" id="cmb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -639,6 +665,7 @@
<object class="GtkSpinButton" id="spi_series">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -649,6 +676,7 @@
<object class="GtkSpinButton" id="spi_interval">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -659,6 +687,7 @@
<object class="GtkSpinButton" id="spi_last_hours">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -691,6 +720,7 @@
<object class="GtkComboBox" id="cmb_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
+844
View File
@@ -0,0 +1,844 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adj_val1">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_val2">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adj_val3">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_measurement">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_flt_equip">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_flt_text">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Measurement</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_measurement">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_measurement_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_measure_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Measurement Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=10 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Dimensions</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 1</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 2</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 3</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Accuracy</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Note</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_dimensions">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_val1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_val2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_val3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_accuracy">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_note">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_measure_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Measurement</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=9 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Dimensions</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 1</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 2</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Value 3</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Accuracy</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Equipment</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Note</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_name">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_dimensions">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_val1">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adj_val1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_val2">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adj_val2</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spi_val3">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adj_val3</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ent_date">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_equipment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTextView" id="txt_note">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_accuracy">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+26 -7
View File
@@ -165,6 +165,7 @@
<object class="GtkTreeView" id="tvw_projects">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_projects_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -183,12 +184,13 @@
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton">
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="name">but_new</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -197,12 +199,13 @@
</packing>
</child>
<child>
<object class="GtkButton">
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="name">but_edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -211,11 +214,12 @@
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Delete</property>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -343,6 +347,7 @@
<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>
@@ -431,6 +436,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -439,7 +447,7 @@
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -455,6 +463,7 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -464,11 +473,12 @@
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -482,6 +492,7 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -507,12 +518,18 @@
<object class="GtkBox" id="box_proj_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="label" translatable="yes">Edit Project</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -525,6 +542,8 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
+160 -40
View File
@@ -114,7 +114,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Providions (here selection description)</property>
<property name="label" translatable="yes">Filter Provisions</property>
</object>
</child>
</object>
@@ -133,6 +133,7 @@
<object class="GtkTreeView" id="tvw_provisions">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_provisions_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -211,10 +212,13 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit provision</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -227,11 +231,16 @@
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -276,6 +285,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -341,6 +353,7 @@
<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>
@@ -351,6 +364,7 @@
<object class="GtkComboBox" id="cmb_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -361,6 +375,7 @@
<object class="GtkComboBox" id="cmb_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -371,6 +386,7 @@
<object class="GtkComboBox" id="cmb_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -381,6 +397,7 @@
<object class="GtkComboBox" id="cmb_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -391,6 +408,7 @@
<object class="GtkSpinButton" id="spi_number">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -401,6 +419,7 @@
<object class="GtkSpinButton" id="spi_weight">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -411,6 +430,7 @@
<object class="GtkSpinButton" id="spi_weight_net">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -421,6 +441,7 @@
<object class="GtkEntry" id="ent_storedate">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -431,6 +452,7 @@
<object class="GtkEntry" id="ent_shelflife">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -497,10 +519,13 @@
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_title_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">View Provision</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -509,12 +534,12 @@
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=10 -->
<!-- n-columns=2 n-rows=13 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
@@ -525,7 +550,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<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>
@@ -536,7 +561,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage</property>
@@ -550,7 +575,8 @@
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Placeholder</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -561,6 +587,8 @@
<object class="GtkLabel" id="lbl_category">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -571,6 +599,8 @@
<object class="GtkLabel" id="lbl_storage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -578,7 +608,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Box</property>
@@ -589,7 +619,7 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_number">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Number</property>
@@ -600,32 +630,21 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Weight net</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Unit</property>
<property name="label" translatable="yes">Weight net</property>
</object>
<packing>
<property name="left-attach">0</property>
@@ -633,10 +652,10 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storedate</property>
<property name="label" translatable="yes">Unit</property>
</object>
<packing>
<property name="left-attach">0</property>
@@ -644,20 +663,33 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="lbl_lb_storedate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storedate</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_shelflife">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Shelflife</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -668,6 +700,8 @@
<object class="GtkLabel" id="lbl_number">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -678,16 +712,8 @@
<object class="GtkLabel" id="lbl_weight">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -695,9 +721,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_unit">
<object class="GtkLabel" id="lbl_weight_net">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -705,25 +733,113 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_storedate">
<object class="GtkLabel" id="lbl_unit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_storedate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_shelflife">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Price</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_price">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_target">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Target</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_target">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_lb_shelflife1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">12</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
@@ -742,11 +858,13 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
@@ -755,6 +873,7 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -768,6 +887,7 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
+105 -28
View File
@@ -152,6 +152,7 @@
<object class="GtkTreeView" id="tvw_storage">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_storage_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
@@ -233,7 +234,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Storage Detais</property>
<property name="label" translatable="yes">Storage Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -245,8 +246,8 @@
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=7 -->
<object class="GtkGrid">
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grd_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
@@ -265,33 +266,13 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
</object>
<packing>
<property name="left-attach">0</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>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
@@ -352,6 +333,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -363,6 +345,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -374,6 +357,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -385,6 +369,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
@@ -396,12 +381,63 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Color</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_color">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="use-markup">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
@@ -475,7 +511,10 @@
<object class="GtkBox" id="box_stor_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
@@ -492,15 +531,20 @@
</packing>
</child>
<child>
<!-- n-columns=7 n-rows=7 -->
<object class="GtkGrid">
<!-- n-columns=7 n-rows=8 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -512,6 +556,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Typ</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -778,10 +825,11 @@
<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">6</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
@@ -798,7 +846,7 @@
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
<property name="top-attach">7</property>
<property name="width">6</property>
</packing>
</child>
@@ -835,6 +883,35 @@
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Color</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
+877
View File
@@ -0,0 +1,877 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkStack" id="topobject">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">8</property>
<child>
<object class="GtkBox" id="box_tasks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<!-- n-columns=3 n-rows=4 -->
<object class="GtkGrid" id="grd_filter">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="but_flt_clear">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_flt_apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Project</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="cmb_flt_priority">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Priority</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_flt_project">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkCheckButton">
<property name="label" translatable="yes">pending</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton">
<property name="label" translatable="yes">active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton">
<property name="label" translatable="yes">waiting</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton">
<property name="label" translatable="yes">deleted</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton">
<property name="label" translatable="yes">completed</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Filter Tasks</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="tvw_tasks">
<property name="visible">True</property>
<property name="can-focus">True</property>
<signal name="row-activated" handler="on_tvw_tasks_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_new">
<property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_new_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_detail">
<property name="label" translatable="yes">Details</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_detail_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title" translatable="yes">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_task_detail">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Task Details</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=10 -->
<object class="GtkGrid" id="grd_details">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_name">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Priority</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Status</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">Timestamp</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_priority">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_status">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_timestamp">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<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">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">Due date</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Started</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_plandate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_duedate">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_started">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<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">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_remarks">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selectable">True</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Finished</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lbl_finished">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<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">8</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>
<property name="selectable">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">8</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_delete">
<property name="label" translatable="yes">Delete</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_delete_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_edit2">
<property name="label" translatable="yes">Edit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_edit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_close">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title" translatable="yes">page1</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_task_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lbl_title_edit">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Edit Task</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=2 n-rows=8 -->
<object class="GtkGrid" id="grd_editor">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">4</property>
<property name="column-spacing">8</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="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">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Responsible</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Remarks</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="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">7</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">6</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">3</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">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Project</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Priority</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="cmb_priority">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="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">3</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="but_save">
<property name="label" translatable="yes">Save</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_save_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="but_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_but_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
+167 -8
View File
@@ -7,23 +7,35 @@ Notebook mit Vessel, User, Lists, Settings
"""
import os
import pyudev
from gi.repository import GLib, Gtk, Gdk, Rsvg
from datetime import datetime
import subprocess
import locale
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import user
class BaseView(View):
def __init__(self, context):
super().__init__(context, _("Base Data"), "base.ui")
#self.title = _("Base Data")
#builder = Gtk.Builder()
#builder.set_translation_domain(context.textdomain)
#builder.add_from_file(os.path.join(context.ui_path, "base.ui"))
#builder.connect_signals(self)
#self.topwidget = builder.get_object("topobject")
#gtkutils.init_named_controls(self, builder)
self.context = context
self.user = user.User(context.db) # current user record
self.newuser = False
self.backupdevice = None # USB-Stick detected only on demand
# Settings
self.sys_currency = context.db.load_setting(4)[0] or '€'
self.entry['sys_currency'].set_text(self.sys_currency)
self.sys_max_width = context.db.load_setting(20)[1] or 1024
self.spin['sys_max_width'].set_value(self.sys_max_width)
self.sys_max_height = context.db.load_setting(21)[1] or 768
self.spin['sys_max_height'].set_value(self.sys_max_height)
# combos
roles = {'captain': 'Captain', 'helmsman': 'Helmsman', 'sailor': 'Sailor'}
@@ -31,6 +43,14 @@ class BaseView(View):
langs = {'de': 'Deutsch', 'en': 'English'}
combobox.load_from_dict(self.combo['user_lang'], langs)
today = datetime.now()
datedict = {
key: f"{prefix} - {today.strftime(fmt)}"
for key, (fmt, prefix) in context.datefmt_map.items()
}
self.datefmt = context.db.load_setting(2)[0] or 'Y-m-d'
combobox.load_from_dict(self.combo['datefmt'], datedict, self.datefmt)
# shipyard
self.db.cur.execute("SELECT compid, compname FROM company WHERE comptype=3 ORDER BY compname")
shipyards = dict(self.db.cur.fetchall())
@@ -129,6 +149,132 @@ class BaseView(View):
storages = dict(self.db.cur.fetchall())
combobox.refresh_dict(self.combo['storage'], {-1: _("─── none ───")} | storages)
def find_usb_sticks(self):
result = []
for name in os.listdir("/sys/block"):
device = "/sys/block/" + name
removable = device + "/removable"
if not os.path.exists(removable):
continue
with open(removable) as f:
if f.read().strip() != "1":
continue
device_path = os.path.realpath(device + "/device")
if "/usb" in device_path.lower():
result.append(name)
return result
def is_mounted(self, device):
with open("/proc/mounts") as f:
for line in f:
mounted_device = line.split()[0]
if mounted_device == device:
return True
return False
def on_but_usbdevice_clicked(self, widget):
self.backupdevice = None
devlist = self.find_usb_sticks()
if len(devlist) == 0:
self.label['usb_device'].set_text('n/a')
return
if len(devlist) != 1:
print(devlist)
print("Multiple devices not supported yet")
self.label['usb_device'].set_text('multiple')
return
usbdev = devlist[0]
self.label['usb_device'].set_text(f"/dev/{usbdev}")
"""
serial number via python3-pyudev:
import pyudev
Settings
7 - usb backup device serial
8 - usb backup partition uuid
9 - last backup timestamp
"""
# first get stick hardware data
udevctx = pyudev.Context()
device = pyudev.Devices.from_sys_path(udevctx, os.path.join("/sys/class/block", usbdev))
serial = device.get("ID_SERIAL_SHORT")
vendor = device.get("ID_VENDOR")
model = device.get("ID_MODEL")
self.label['usb_serial'].set_text(serial or 'n/a')
self.label['usb_vendor'].set_text(vendor or 'n/a')
self.label['usb_model'].set_text(model or 'n/a')
# TODO second get partition, filesystem type and label
# there must be only one ext4 partition on disk
partitions = [
child for child in device.children
if child.device_type == "partition"
]
partition = partitions[0]
print(f"Partition={partition}")
if len(partitions) != 1:
print("error: more than one partition!")
return
partuuid = partition.properties.get("ID_PART_ENTRY_UUID")
fstype = partition.get("ID_FS_TYPE")
plabel = partition.get("ID_FS_LABEL")
self.label['usb_partition'].set_text(plabel)
self.label['usb_uuid'].set_text(partuuid)
self.label['usb_fstype'].set_text(fstype)
if fstype != "ext4":
print(f"error: invalid fileystem type {fstype}, ext4 expected")
return
self.backupdevice = f"/dev/{usbdev}1" # partition!
# check if device is mounted
if not self.is_mounted(self.backupdevice):
print("device is not mounted. trying to mount now")
pass
# For backup there must be an directory names ymsbackup which contains
# backup description and backup sets
# Desription and identification file backup.json?
# if plabel != 'BACKUP' or not os.path.isdir('ymsbackup')
mountpoint = os.path.join("/media", os.getlogin(), "BACKUP")
if not os.path.isdir(mountpoint):
print(f"Device is not mounted at {mountpoint}")
def on_but_usbinit_clicked(self, widget):
if self.backupdevice is None:
return
# UUID of devive -> settings
# check if backups already exist
answer = gtkutils.questionbox(
_("Initialize USB-Stick\n"
"All data on that device will be lost!\n"
"Are you really sure?"
), title="YMS")
if answer == False:
return
if self.label['usb_fstype'].get_text() != 'ext4':
print("formatting {self.backupdevice} with ext4")
#try:
# subprocess.run(["sudo", "mkfs.ext4", "-L", "BACKUP", self.backupdevice], check=True)
#except subprocess.CalledProcessError as e:
# print("formatting failed: ", e)
myself = os.getlogin()
mountpoint = os.path.join("/media", myself, "backup")
basedir = os.path.join(mountpoint, 'ymsbackup')
print(basedir)
# mkdir basedir
# chown (os.getlogin(), 'yms')
# chmod 770
else:
#
pass
def on_cmb_vessel_changed(self, widget):
self.context.vessel.load(combobox.get_list_value(widget))
sql = ("UPDATE settings SET valint=%s WHERE userid=0 AND sno=1")
@@ -189,7 +335,20 @@ class BaseView(View):
def display_vessel(self, vessel):
self.label['vesselname'].set_text(vessel.vesselname)
self.label['model'].set_text(vessel.model or '')
self.label['year_built'].set_text(self.format_int(vessel.year_built, default='n/a'))
self.label['shipyard'].set_text(str(vessel.shipyard))
self.label['year_built'].set_text(self.format_int(vessel.year_built, False, default='n/a'))
self.label['loa'].set_text(self.format_float(vessel.loa, 2, suffix="m"))
self.label['lwl'].set_text(self.format_float(vessel.lwl, 2, suffix="m"))
self.label['beam'].set_text(self.format_float(vessel.beam, 2, suffix="m"))
self.label['draught'].set_text(self.format_float(vessel.draught, 2, suffix="m"))
self.label['draught_min'].set_text(self.format_float(vessel.draught_min, 2, suffix="m"))
self.label['displacement'].set_text(self.format_int(vessel.displacement, 2, suffix="kg"))
self.label['ballast'].set_text(self.format_int(vessel.ballast, 2, suffix="kg"))
self.label['belt_bow'].set_text(self.format_float(vessel.beltpos_bow, 2, suffix="m"))
self.label['belt_aft'].set_text(self.format_float(vessel.beltpos_aft, 2, suffix="m"))
self.label['hull_shape'].set_text(vessel.shapefile or '')
self.label['storage_def'].set_text(str(vessel.sid_default))
self.label['remarks'].set_text(vessel.remarks or '')
def edit_vessel(self, vessel):
self.entry['vesselname'].set_text(vessel.vesselname)
+39 -3
View File
@@ -5,12 +5,14 @@ from gi.repository import GLib, Gtk, Gdk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import box
class BoxesView(View):
def __init__(self, context):
super().__init__(context, _("Box"), "boxes.ui")
super().__init__(context, _("Boxes"), "boxes.ui")
self.context = context
# box already used for controls so other name here
self.sbox = box.Box(context.db) # current record
@@ -33,12 +35,33 @@ class BoxesView(View):
treeview.add_column(self.tree['box'], _('Remarks'), 3)
self.tree['box'].set_model(self.lst_box)
self.dd_boxtype = self.context.lookup.dropdown(Dropdown.BOX_TYPE)
combobox.load_from_dict(self.combo['type'], self.dd_boxtype)
def load_list(self):
pass
def clear_record(self):
self.entry['label'].set_text('')
self.entry['content'].set_text('')
self.spin['wx'].set_value(0)
self.spin['wy'].set_value(0)
self.spin['wz'].set_value(0)
self.text['remarks'].get_buffer().set_text('')
def display_record(self):
self.label['label'].set_text(self.sbox.label)
# storage sid
self.label['content'].set_text(self.sbox.content or '')
self.label['type'].set_text(self.dd_boxtype[self.sbox.boxtype])
self.label['color'].set_text(self.sbox.color or '')
if self.sbox.color:
self.label['color'].set_markup(f'#{self.sbox.color} <span foreground="#{self.sbox.color}">●</span>')
else:
self.label['color'].set_text('')
self.label['weight'].set_text(self.format_float(self.sbox.weight, 2, suffix='kg'))
self.label['weight_net'].set_text(self.format_float(self.sbox.weight_net, 2, suffix='kg'))
self.label['price'].set_text(self.format_float(self.sbox.price, 2, suffix='€'))
self.label['remarks'].set_text(self.sbox.remarks or '')
def edit_record(self):
@@ -64,14 +87,27 @@ class BoxesView(View):
self.topwidget.set_visible_child(self.box['box_edit'])
def on_but_detail_clicked(self, widget):
sid = treeview.get_value(self.tree['box'], 0)
self.sbox.load(sid)
boxid = treeview.get_value(self.tree['box'], 0)
if not boxid:
return
self.sbox.load(boxid)
self.display_record()
self.topwidget.set_visible_child(self.box['box_detail'])
self.button['close'].grab_focus()
def on_tvw_box_row_activated(self, widget, path, column):
boxid = treeview.get_value(widget, 0)
self.sbox.load(boxid)
self.display_record()
self.topwidget.set_visible_child(self.box['box_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
def on_but_close_clicked(self, widget):
boxid = treeview.get_value(self.tree['box'], 0)
if not boxid:
return
self.topwidget.set_visible_child(self.box['box'])
def on_but_delete_clicked(self, widget):
+35 -1
View File
@@ -5,6 +5,7 @@ from gi.repository import Gtk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import cable
class CablesView(View):
@@ -36,6 +37,9 @@ class CablesView(View):
treeview.add_column(self.tree['cables'], _('Condition'), 2)
self.tree['cables'].set_model(self.lst_cables)
self.dd_type = self.context.lookup.dropdown(Dropdown.CABLE_TYPE)
self.dd_tech = self.context.lookup.dropdown(Dropdown.CABLE_TECHNAME)
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['cable_edit'])
@@ -44,6 +48,18 @@ class CablesView(View):
self.topwidget.set_visible_child(self.box['cable_edit'])
def on_but_detail_clicked(self, widget):
cableid = treeview.get_value(self.tree['cables'], 0)
if not cableid:
return
self.cable.load(cableid)
self.display_record()
self.topwidget.set_visible_child(self.box['cable_detail'])
self.button['close'].grab_focus()
def on_tvw_cables_row_activated(self, widget, path, column):
cableid = treeview.get_value(widget, 0)
self.cable.load(cableid)
self.display_record()
self.topwidget.set_visible_child(self.box['cable_detail'])
# buttons on detail page
@@ -62,7 +78,25 @@ class CablesView(View):
self.topwidget.set_visible_child(self.box['cables'])
def display_record(self):
pass
self.label['name'].set_text(self.cable.cablename)
self.label['type'].set_text(self.dd_type[self.cable.cabletype])
if self.cable.techname:
self.label['techname'].set_text(self.dd_tech[self.cable.techname])
else:
self.label['techname'].set_text('')
self.label['length'].set_text(self.format_int(self.cable.length))
self.label['conductors'].set_text(self.format_int(self.cable.conductors))
self.label['diameter'].set_text(self.format_float(self.cable.diameter, 1))
self.label['xsection'].set_text(self.format_float(self.cable.xsection, 1))
self.label['weight'].set_text(self.format_float(self.cable.weight))
if self.cable.color:
self.label['color'].set_markup(f'#{self.cable.color} <span foreground="#{self.cable.color}">●</span>')
else:
self.label['color'].set_text('')
self.label['supplier'].set_text(str(self.cable.supplier))
self.label['manufacturer'].set_text(str(self.cable.manufacturer))
self.label['condition'].set_text(self.cable.cablecond)
self.label['remarks'].set_text(self.cable.remarks or '')
def edit_record(self):
pass
+71 -16
View File
@@ -5,12 +5,14 @@ from gi.repository import Gtk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import company
class CompaniesView(View):
def __init__(self, context):
super().__init__(context, _("Companies"), "companies.ui")
self.context = context
self.comp = company.Company(context.db) # current record
self.newrecord = False
@@ -20,7 +22,13 @@ class CompaniesView(View):
self.comptype = dict(self.db.cur.fetchall())
combobox.load_from_dict(self.combo['flt_type'], {-2: _("─── all ───")} | self.comptype, -2)
# companied
self.dd_comptype = self.context.lookup.dropdown(Dropdown.COMPANY_TYPE)
combobox.load_from_dict(self.combo['comptype'], self.dd_comptype)
combobox.load_from_dict(self.combo['comptype2'], self.dd_comptype)
self.dd_flags = context.lookup.enum('company.flags')
# 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():
@@ -31,30 +39,77 @@ class CompaniesView(View):
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)
def clear_record(self):
self.entry['name'].set_text('')
self.entry['shortname'].set_text('')
self.entry['street'].set_text('')
self.entry['zip'].set_text('')
self.entry['city'].set_text('')
self.entry['country'].set_text('')
self.entry['contact'].set_text('')
self.entry['phone'].set_text('')
self.entry['email'].set_text('')
self.entry['web'].set_text('')
self.entry['customerno'].set_text('')
self.entry['contractno'].set_text('')
combobox.activate_row(self.combo['comptype'], -1)
combobox.activate_row(self.combo['comptype2'], -1)
def display_record(self):
self.label['name'].set_text(self.comp.compname)
self.label['shortname'].set_text(self.comp.shortname or '')
self.label['type'].set_text(self.dd_comptype.get(self.comp.comptype, ''))
self.label['type2'].set_text(self.dd_comptype.get(self.comp.comptype2, ''))
self.label['street'].set_text(self.comp.street or '')
self.label['zip'].set_text(self.comp.zip or '')
self.label['city'].set_text(self.comp.city or '')
self.label['country'].set_text(self.comp.country or '')
self.label['phone'].set_text(self.comp.phone or '')
self.label['email'].set_text(self.comp.email or '')
self.label['web'].set_text(self.comp.web or '')
self.label['customerno'].set_text(self.comp.customerno or '')
self.label['contractno'].set_text(self.comp.contractno or '')
self.label['flags'].set_text(self.comp.flags or '')
self.label['remarks'].set_text(self.comp.remarks or '')
def edit_record(self):
self.entry['compname'].set_text(self.comp.compname)
# Type self.dd_comptype.get(self.comp.comptype, -1)
# Type2 self.dd_comptype.get(self.comp.comptype2, -1)
self.entry['shortname'].set_text(self.comp.shortname or '')
self.entry['street'].set_text(self.comp.street or '')
self.entry['zip'].set_text(self.comp.zip or '')
self.entry['city'].set_text(self.comp.city or '')
self.entry['country'].set_text(self.comp.country or '')
self.entry['contact'].set_text(self.comp.contact or '')
self.entry['phone'].set_text(self.comp.phone or '')
self.entry['email'].set_text(self.comp.email or '')
self.entry['web'].set_text(self.comp.web or '')
self.entry['customerno'].set_text(self.comp.customerno or '')
self.entry['contractno'].set_text(self.comp.contractno or '')
# 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):
compid = treeview.get_value(self.tree['companies'], 0)
if not compid:
return
self.topwidget.set_visible_child(self.box['comp_edit'])
def on_but_detail_clicked(self, widget):
compid = treeview.get_value(self.tree['companies'], 0)
if not compid:
return
self.comp.load(compid)
self.display_record()
self.topwidget.set_visible_child(self.box['comp_detail'])
def on_tvw_companies_row_activated(self, widget, path, column):
compid = treeview.get_value(widget, 0)
self.comp.load(compid)
self.display_record()
self.topwidget.set_visible_child(self.box['comp_detail'])
# buttons on detail page
+75 -2
View File
@@ -1,7 +1,8 @@
# SPDX-License-Identifier: WTFPL
import os
from gi.repository import GLib, Gtk, Gdk
from gi.repository import GLib, Gtk, Gdk, GdkPixbuf, Rsvg
import fitz
from .view import View
from yms import gtkutils, combobox, treeview
@@ -11,6 +12,7 @@ class DocumentsView(View):
def __init__(self, context):
super().__init__(context, _("Documents"), "documents.ui")
self.context = context
self.doc = document.Document(context.db) # current record
self.newrecord = False
@@ -41,7 +43,18 @@ class DocumentsView(View):
self.topwidget.set_visible_child(self.box['doc_edit'])
def on_but_detail_clicked(self, widget):
docid = treeview.get_value(self.tree['documents'], 0)
self.doc.load(docid)
self.display_record()
self.topwidget.set_visible_child(self.box['doc_detail'])
self.button['close'].grab_focus()
def on_tvw_documents_row_activated(self, widget, path, column):
docid = treeview.get_value(widget, 0)
self.doc.load(docid)
self.display_record()
self.topwidget.set_visible_child(self.box['doc_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
@@ -58,8 +71,68 @@ class DocumentsView(View):
def on_but_cancel_clicked(self, widget):
self.topwidget.set_visible_child(self.box['documents'])
def pdf_to_pixbuf(self, filename, max_width=400, max_height=400):
doc = fitz.open(filename)
page = doc[0]
rect = page.rect
scale = min(max_width / rect.width, max_height / rect.height)
matrix = fitz.Matrix(scale, scale)
pix = page.get_pixmap(matrix=matrix, alpha=False)
pixbuf = GdkPixbuf.Pixbuf.new_from_data(
pix.samples,
GdkPixbuf.Colorspace.RGB,
pix.alpha,
8,
pix.width,
pix.height,
pix.stride,
None,
None
)
return pixbuf
def display_record(self):
pass
print(self.doc)
self.label['title'].set_text(self.doc.title or '')
self.label['filename'].set_text(self.doc.filename)
# self.label['extents'] -> see below
self.label['mimetype'].set_text(self.doc.mimetype)
self.label['filesize'].set_text(self.format_int(self.doc.docsize, suffix="Byte"))
self.label['date'].set_text(self.format_date(self.doc.docdate))
self.label['doctype'].set_text(self.doc.doctype)
self.label['roleaccess'].set_text(self.doc.roleaccess)
self.label['doctype'].set_text(self.doc.remarks or '')
# image preview
if self.doc.doctype == 'picture':
filename = f"pic-{self.doc.pk_value:06d}.{self.doc.extension}"
imgpath = os.path.join(self.context.cfg['docpath'], filename)
info = GdkPixbuf.Pixbuf.get_file_info(imgpath)
if info:
imgformat, imgwidth, imgheight = info
self.label['extents'].set_text(f"{imgwidth}x{imgheight} Pixel")
if imgwidth > 400 or imgheight > 400:
print("loading scaled")
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(imgpath, 400, 400, True)
else:
print("loading")
pixbuf = GdkPixbuf.Pixbuf.new_from_file(imgpath)
else:
print("cannot get image info")
self.image['preview'].set_from_pixbuf(pixbuf)
elif self.doc.doctype == 'drawing':
filename = f"drw-{self.doc.pk_value:06d}.{self.doc.extension}"
imgpath = os.path.join(self.context.cfg['docpath'], filename)
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(imgpath, 400, 400, True)
self.image['preview'].set_from_pixbuf(pixbuf)
elif self.doc.mimetype == "application/pdf":
filename = f"doc-{self.doc.pk_value:06d}.{self.doc.extension}"
imgpath = os.path.join(self.context.cfg['docpath'], filename)
print(imgpath)
pixbuf = self.pdf_to_pixbuf(imgpath)
self.image['preview'].set_from_pixbuf(pixbuf)
else:
self.image['preview'].clear()
def edit_record(self):
pass
+22 -1
View File
@@ -5,12 +5,14 @@ from gi.repository import GLib, Gtk, Gdk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import equipment
class EquipmentView(View):
def __init__(self, context):
super().__init__(context, _("Equipment"), "equipment.ui")
self.context = context
self.equip = equipment.Equipment(context.db) # current record
self.newrecord = False
@@ -36,11 +38,19 @@ class EquipmentView(View):
treeview.add_column(self.tree['equipment'], _('Remarks'), 6)
self.tree['equipment'].set_model(self.lst_equipment)
self.dd_category = self.context.lookup.dropdown(Dropdown.EQUIPMENT_CATEGORY)
#combobox.load_from_dict(self.combo['unit'], self.dd_unit)
# buttons on list page
def on_but_new_clicked(self, widget):
self.newrecord = True
self.label['title_editor'].set_text(_("Add new Equipment"))
self.clear_record()
self.equip.vid = self.context.vessel.vid
self.topwidget.set_visible_child(self.box['equip_edit'])
def on_but_edit_clicked(self, widget):
self.label['title_edit'].set_text(_("Edit Equipment"))
self.topwidget.set_visible_child(self.box['equip_edit'])
def on_but_detail_clicked(self, widget):
@@ -48,6 +58,7 @@ class EquipmentView(View):
self.equip.load(eid)
self.display_record()
self.topwidget.set_visible_child(self.box['equip_detail'])
self.button['close'].grab_focus()
def on_tvw_equipment_row_activated(self, widget, path, column):
eid = treeview.get_value(widget, 0)
@@ -72,7 +83,17 @@ class EquipmentView(View):
def display_record(self):
print(self.equip)
#self.label['name'].set_text(self.equip.sname)
self.label['name'].set_text(self.equip.ename)
self.label['shortname'].set_text(self.equip.shortname or '')
#lookup self.label['manufacturer'].set_text(self.equip.manufacturer)
self.label['model'].set_text(self.equip.model or '')
self.label['serial'].set_text(self.equip.serial or '')
self.label['weight'].set_text(self.format_float(self.equip.weight, 2, suffix='kg'))
self.label['price'].set_text(self.format_float(self.equip.price, 2, suffix='€'))
self.label['date_purch'].set_text(self.equip.purchdate or '')
#lookup self.label['supplier'].set_text(self.equip.supplier)
self.label['category'].set_text(self.dd_category[self.equip.ecat])
self.label['flags'].set_text(self.equip.flags or '')
self.label['remarks'].set_text(self.equip.remarks or '')
def edit_record(self):
+24 -1
View File
@@ -5,6 +5,7 @@ from gi.repository import Gtk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import fuse
class FusesView(View):
@@ -38,6 +39,8 @@ class FusesView(View):
treeview.add_column(self.tree['fuses'], _('Description'), 3)
self.tree['fuses'].set_model(self.lst_fuses)
self.dd_type = self.context.lookup.dropdown(Dropdown.FUSE_TYPE)
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['fuse_edit'])
@@ -46,7 +49,20 @@ class FusesView(View):
self.topwidget.set_visible_child(self.box['fuse_edit'])
def on_but_detail_clicked(self, widget):
fuseid = treeview.get_value(self.tree['fuses'], 0)
if not fuseid:
return
self.fuse.load(fuseid)
self.display_record()
self.topwidget.set_visible_child(self.box['fuse_detail'])
self.button['close'].grab_focus()
def on_tvw_fuses_row_activated(self, widget, path, column):
fuseid = treeview.get_value(widget, 0)
self.fuse.load(fuseid)
self.display_record()
self.topwidget.set_visible_child(self.box['fuse_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
@@ -64,7 +80,14 @@ class FusesView(View):
self.topwidget.set_visible_child(self.box['fuses'])
def display_record(self):
pass
self.label['fnumber'].set_text(f"F{self.fuse.fnumber}")
self.label['type'].set_text(self.dd_type[self.fuse.ftype])
self.label['current'].set_text(self.format_float(self.fuse.current, 2, suffix="A"))
self.label['cable'].set_text(str(self.fuse.cableid))
self.label['equipment'].set_text(str(self.fuse.eid))
self.label['location'].set_text(str(self.fuse.location))
self.label['description'].set_text(str(self.fuse.description or ''))
self.label['remarks'].set_text(str(self.fuse.remarks or ''))
def edit_record(self):
pass
+8
View File
@@ -5,6 +5,7 @@ from gi.repository import GLib, Gtk, Gdk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import inventory
class InventoryView(View):
@@ -39,6 +40,8 @@ class InventoryView(View):
treeview.add_column(self.tree['inventory'], _('Remarks'), 5)
self.tree['inventory'].set_model(self.lst_inventory)
self.dd_category = self.context.lookup.dropdown(Dropdown.INVENTORY_CATEGORY)
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['inv_edit'])
@@ -51,6 +54,7 @@ class InventoryView(View):
self.inv.load(invid)
self.display_record()
self.topwidget.set_visible_child(self.box['inv_detail'])
self.button['close'].grab_focus()
def on_tvw_inventory_row_activated(self, widget, path, column):
invid = treeview.get_value(widget, 0)
@@ -85,6 +89,10 @@ class InventoryView(View):
self.label['price'].set_text(self.format_float(self.inv.price, suffix='€'))
self.label['purchdate'].set_text(self.format_date(self.inv.purchdate))
self.label['condition'].set_text(self.inv.invcond)
if self.inv.icat is not None:
self.label['category'].set_text(self.dd_category[self.inv.icat])
else:
self.label['category'].set_text('')
self.label['remarks'].set_text(self.inv.remarks or '')
def edit_record(self):
+24 -2
View File
@@ -40,7 +40,20 @@ class MaintenanceView(View):
self.topwidget.set_visible_child(self.box['maint_edit'])
def on_but_detail_clicked(self, widget):
self.topwidget.set_visible_child(self.box['maintv_detail'])
maintid = treeview.get_value(self.tree['maintenance'], 0)
if not maintid:
return
self.maint.load(maintid)
self.display_record()
self.topwidget.set_visible_child(self.box['maint_detail'])
self.button['close'].grab_focus()
def on_tvw_maintenance_row_activated(self, widget, path, column):
maintid = treeview.get_value(widget, 0)
self.maint.load(maintid)
self.display_record()
self.topwidget.set_visible_child(self.box['maint_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
@@ -58,7 +71,16 @@ class MaintenanceView(View):
self.topwidget.set_visible_child(self.box['maintenance'])
def display_record(self):
pass
self.label['activities'].set_text(self.maint.activities)
self.label['equipment'].set_text(str(self.maint.eid))
self.label['series'].set_text(str(self.maint.series))
self.label['interval'].set_text(self.format_int(self.maint.interval_hours))
self.label['last'].set_text(self.format_int(self.maint.last_hours))
self.label['plandate'].set_text(self.format_date(self.maint.plan_date))
self.label['completion'].set_text(self.format_date(self.maint.completion_date))
self.label['status'].set_text(self.maint.maintstate)
self.label['remarks'].set_text(self.maint.remarks or '')
def edit_record(self):
pass
+102
View File
@@ -0,0 +1,102 @@
# SPDX-License-Identifier: WTFPL
import os
from gi.repository import Gtk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.lookup import Dropdown
from yms.model import measurement
class MeasurementView(View):
def __init__(self, context):
super().__init__(context, _("Measurements"), "measurement.ui")
self.measure = measurement.Measurement(context.db) # current record
self.newrecord = False
# measurement units
self.dd_unit = self.context.lookup.dropdown(Dropdown.UNIT)
self.lst_measurement = Gtk.ListStore(int, str, str, str, str, str)
sql = (
"SELECT m.mid, m.mname, m.nval, m.val1, m.val2, m.val3, m.unit, "
"m.accuracy, m.note, e.ename "
"FROM measurement AS m LEFT OUTER JOIN equipment AS e USING (eid) "
"WHERE m.vid=%s "
"ORDER BY m.mid"
)
self.db.dcur.execute(sql, (context.vessel.vid,))
for row in self.db.dcur.fetchall():
if row['nval'] == 1:
value = "{} {}".format(row['val1'], row['unit'])
elif row['nval'] == 2:
value = "{}x{} {}".format(row['val1'], row['val2'], row['unit'])
elif row['nval'] == 3:
value = "{}x{}x{} {}".format(row['val1'], row['val2'], row['val3'], row['unit'])
else:
#invalid
value = "#invalid"
data = (
row['mid'],
row['mname'],
value,
row['accuracy'],
row['ename'],
row['note'] or ''
)
self.lst_measurement.append(data)
treeview.add_column(self.tree['measurement'], _('ID'), 0)
treeview.add_column(self.tree['measurement'], _('Measurement'), 1)
treeview.add_column(self.tree['measurement'], _('Value'), 2)
treeview.add_column(self.tree['measurement'], _('Accuracy'), 3)
treeview.add_column(self.tree['measurement'], _('Equipment'), 4)
treeview.add_column(self.tree['measurement'], _('Note'), 5)
self.tree['measurement'].set_model(self.lst_measurement)
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['measure_edit'])
def on_but_edit_clicked(self, widget):
self.topwidget.set_visible_child(self.box['measure_edit'])
def on_but_detail_clicked(self, widget):
mid = treeview.get_value(self.tree['measurement'], 0)
if not mid:
return
self.measure.load(mid)
self.display_record()
self.topwidget.set_visible_child(self.box['measure_detail'])
self.button['close'].grab_focus()
def on_tvw_measurement_row_activated(self, widget, path, column):
mid = treeview.get_value(widget, 0)
self.measure.load(mid)
self.display_record()
self.topwidget.set_visible_child(self.box['measure_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
def on_but_close_clicked(self, widget):
self.topwidget.set_visible_child(self.box['measurement'])
def on_but_delete_clicked(self, widget):
self.topwidget.set_visible_child(self.box['measurement'])
# 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['measurement'])
def display_record(self):
self.label['name'].set_text(self.measure.mname)
self.label['note'].set_text(self.measure.note or '')
def edit_record(self):
pass
+25 -1
View File
@@ -11,6 +11,7 @@ class ProjectsView(View):
def __init__(self, context):
super().__init__(context, _("Projects"), "projects.ui")
self.context = context
self.project = project.Project(context.db) # current record
self.newrecord = False
@@ -42,6 +43,9 @@ class ProjectsView(View):
treeview.add_column(self.tree['projects'], _('Remarks'), 5)
self.tree['projects'].set_model(self.lst_projects)
self.dd_user = context.lookup.user()
self.dd_state = self.context.lookup.enum('project.projstate')
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['proj_edit'])
@@ -50,7 +54,20 @@ class ProjectsView(View):
self.topwidget.set_visible_child(self.box['proj_edit'])
def on_but_detail_clicked(self, widget):
projid = treeview.get_value(self.tree['projects'], 0)
if not projid:
return
self.project.load(projid)
self.display_record()
self.topwidget.set_visible_child(self.box['proj_detail'])
self.button['close'].grab_focus()
def on_tvw_projects_row_activated(self, widget, path, column):
projid = treeview.get_value(widget, 0)
self.project.load(projid)
self.display_record()
self.topwidget.set_visible_child(self.box['proj_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
@@ -68,7 +85,14 @@ class ProjectsView(View):
self.topwidget.set_visible_child(self.box['projects'])
def display_record(self):
pass
self.label['name'].set_text(self.project.projname)
self.label['responsible'].set_text(self.dd_user[self.project.responsible])
self.label['date_start'].set_text(self.format_date(self.project.startdate))
self.label['duration'].set_text(self.format_int(self.project.duration, suffix="Days"))
self.label['costs_plan'].set_text(self.format_float(self.project.costs_plan, 2, suffix="€"))
self.label['costs_final'].set_text(self.format_float(self.project.costs_final, 2, suffix="€"))
self.label['status'].set_text(self.project.projstate)
self.label['remarks'].set_text(self.project.remarks or '')
def edit_record(self):
pass
+30 -1
View File
@@ -11,6 +11,7 @@ class ProvisionsView(View):
def __init__(self, context):
super().__init__(context, _("Provisions"), "provisions.ui")
self.context = context
self.prov = provision.Provision(context.db) # current record
self.newrecord = False
@@ -21,7 +22,7 @@ class ProvisionsView(View):
sql = (
"SELECT p.provid, p.provname, p.number, p.unit, p.storedate, p.shelflife "
"FROM provisions AS p LEFT OUTER JOIN storage AS s USING (sid) "
"WHERE s.vid=%s"
"WHERE s.vid=%s OR vid IS NULL"
)
self.db.dcur.execute(sql, (context.vessel.vid,))
for row in self.db.dcur.fetchall():
@@ -55,7 +56,18 @@ class ProvisionsView(View):
self.topwidget.set_visible_child(self.box['prov_edit'])
def on_but_detail_clicked(self, widget):
provid = treeview.get_value(self.tree['provisions'], 0)
self.prov.load(provid)
self.display_record()
self.topwidget.set_visible_child(self.box['prov_detail'])
self.button['close'].grab_focus()
def on_tvw_provisions_row_activated(self, widget, path, column):
provid = treeview.get_value(widget, 0)
self.prov.load(provid)
self.display_record()
self.topwidget.set_visible_child(self.box['prov_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
@@ -71,3 +83,20 @@ class ProvisionsView(View):
def on_but_cancel_clicked(self, widget):
self.topwidget.set_visible_child(self.box['provisions'])
def display_record(self):
print(self.prov)
self.label['name'].set_text(self.prov.provname)
self.label['category'].set_text(str(self.prov.provcat))
self.label['storage'].set_text(str(self.prov.sid))
self.label['box'].set_text(str(self.prov.boxid))
self.label['number'].set_text(str(self.prov.number))
self.label['unit'].set_text(str(self.prov.unit))
self.label['target'].set_text(str(self.prov.target))
self.label['weight'].set_text(self.format_float(self.prov.weight, 2, suffix='kg'))
self.label['weight_net'].set_text(self.format_float(self.prov.weight_net, 2, suffix='kg'))
self.label['price'].set_text(self.format_float(self.prov.price, 2, suffix='€'))
self.label['remarks'].set_text(self.prov.remarks or '')
def edit_record(self):
pass
+1 -1
View File
@@ -11,7 +11,7 @@ class StatusView:
def __init__(self, context):
self.context = context
self.title = _("Status")
self._title = _("Status")
builder = Gtk.Builder()
builder.set_translation_domain(context.textdomain)
builder.add_from_file(os.path.join(context.ui_path, "status.ui"))
+40 -25
View File
@@ -5,14 +5,13 @@ from gi.repository import GLib, Gtk, Gdk
from .view import View
from yms import gtkutils, combobox, treeview
from yms.model import storage
from yms.lookup import Dropdown
from yms.model import storage
class StorageView(View):
def __init__(self, context):
super().__init__(context, _("Storage"), "storage.ui")
self.context = context
self.storage = storage.Storage(context.db) # current record
@@ -27,15 +26,11 @@ class StorageView(View):
treeview.add_column(self.tree['storage'], _('Remarks'), 3)
self.tree['storage'].set_model(self.lst_storage)
#combodict = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE)
#combobox.load_from_dict(self.combo['type'], combodict)
self.dd_stype = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE)
combobox.load_from_dict(self.combo['type'], self.dd_stype)
combodict = self.context.lookup.dropdown(Dropdown.STORAGE_TYPE)
print(combodict)
combobox.load_from_dict(self.combo['type'], combodict)
combodict = self.context.lookup.enum('storage.capaunit')
combobox.load_from_dict(self.combo['unit'], combodict)
self.dd_unit = self.context.lookup.enum('storage.capaunit')
combobox.load_from_dict(self.combo['unit'], self.dd_unit)
def add_row(self):
pass
@@ -55,8 +50,32 @@ class StorageView(View):
for row in self.db.cur.fetchall():
self.lst_storage.append(row)
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('')
def display_record(self):
self.label['name'].set_text(self.storage.sname)
self.label['type'].set_text(self.dd_stype[self.storage.stype])
self.label['position'].set_text(f"({self.storage.x}, {self.storage.y}, {self.storage.z})")
self.label['dimension'].set_text(f"({self.storage.wx}, {self.storage.wy}, {self.storage.wz})")
self.label['angle'].set_text(f"{self.storage.angle}°")
self.label['capacity'].set_text(f"{self.storage.capacity} {self.storage.capaunit}")
if self.storage.color:
self.label['color'].set_markup(f'#{self.storage.color} <span foreground="#{self.storage.color}">●</span>')
else:
self.label['color'].set_text('')
self.label['remarks'].set_text(self.storage.remarks or '')
def edit_record(self):
@@ -71,23 +90,9 @@ class StorageView(View):
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)
# flags
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
def on_but_new_clicked(self, widget):
self.newrecord = True
@@ -108,9 +113,19 @@ class StorageView(View):
def on_but_detail_clicked(self, widget):
sid = treeview.get_value(self.tree['storage'], 0)
if not sid:
return
self.storage.load(sid)
self.display_record()
self.topwidget.set_visible_child(self.box['stor_detail'])
self.button['close'].grab_focus()
def on_tvw_storage_row_activated(self, widget, path, column):
sid = treeview.get_value(widget, 0)
self.storage.load(sid)
self.display_record()
self.topwidget.set_visible_child(self.box['stor_detail'])
self.button['close'].grab_focus()
# buttons on detail page
# edit2 uses edit callback
+89
View File
@@ -0,0 +1,89 @@
# 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 task
class TasksView(View):
def __init__(self, context):
super().__init__(context, _("Tasks"), "tasks.ui")
self.context = context
self.task = task.Task(context.db) # current record
self.newrecord = False
self.lst_tasks = Gtk.ListStore(int, str, str, str, str)
sql = (
"SELECT t.taskid, t.taskname, t.priority, t.taskstate, "
"u.displayname AS responsible "
"FROM task AS t JOIN user AS u ON (t.responsible=u.userid)"
"WHERE t.vid=%s "
"ORDER BY t.taskid"
)
self.db.dcur.execute(sql, (context.vessel.vid,))
for row in self.db.dcur.fetchall():
data = (
row['taskid'],
row['taskname'],
row['priority'],
row['taskstate'],
row['responsible']
)
self.lst_tasks.append(data)
treeview.add_column(self.tree['tasks'], _('ID'), 0)
treeview.add_column(self.tree['tasks'], _('Name'), 1)
treeview.add_column(self.tree['tasks'], _('Priority'), 2)
treeview.add_column(self.tree['tasks'], _('Status'), 3)
treeview.add_column(self.tree['tasks'], _('Responsible'), 4)
self.tree['tasks'].set_model(self.lst_tasks)
# buttons on list page
def on_but_new_clicked(self, widget):
self.topwidget.set_visible_child(self.box['task_edit'])
def on_but_edit_clicked(self, widget):
self.topwidget.set_visible_child(self.box['task_edit'])
def on_but_detail_clicked(self, widget):
taskid = treeview.get_value(self.tree['tasks'], 0)
if not taskid:
return
self.task.load(taskid)
self.display_record()
self.topwidget.set_visible_child(self.box['task_detail'])
self.button['close'].grab_focus()
def on_tvw_tasks_row_activated(self, widget, path, column):
taskid = treeview.get_value(widget, 0)
self.task.load(taskid)
self.display_record()
self.topwidget.set_visible_child(self.box['task_detail'])
# buttons on detail page
# edit2 uses edit callback
def on_but_close_clicked(self, widget):
self.topwidget.set_visible_child(self.box['tasks'])
def on_but_delete_clicked(self, widget):
self.topwidget.set_visible_child(self.box['tasks'])
# 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['tasks'])
def display_record(self):
self.label['name'].set_text(self.task.taskname)
self.label['responsible'].set_text('')
self.label['status'].set_text(self.task.taskstate)
self.label['remarks'].set_text(self.task.remarks or '')
def edit_record(self):
pass
+1 -1
View File
@@ -17,7 +17,7 @@ class View:
self.db = context.db
self.vessel = context.vessel
self.user = context.user
self.title = title
self._title = title
builder = Gtk.Builder()
builder.set_translation_domain(context.textdomain)
builder.add_from_file(os.path.join(context.ui_path, ui_file))
+16 -15
View File
@@ -48,6 +48,8 @@ from yms.view.inventory import InventoryView
from yms.view.provisions import ProvisionsView
from yms.view.maintenance import MaintenanceView
from yms.view.projects import ProjectsView
from yms.view.tasks import TasksView
from yms.view.measurement import MeasurementView
from yms.view.cables import CablesView
from yms.view.fuses import FusesView
from yms.view.documents import DocumentsView
@@ -72,14 +74,14 @@ class AppContext:
# mapping between PHP and Python
datefmt_map = {
'Y-m-d': '%Y-%m-%d', # ISO / international / technical
'd.m.Y': '%d.%m.%Y', # Germany / Central & Northern Europe
'd/m/Y': '%d/%m/%Y', # UK / France / Spain / Italy / Australia / NZ
'd-m-Y': '%d-%m-%Y', # Netherlands / Denmark / Belgium
'd M Y': '%d %b %Y', # nautical documents / logbooks / unambiguous
'm.d.Y': '%m.%d.%Y', # USA
'm/d/Y': '%m/%d/%Y', # USA
'Y/m/d': '%Y/%m/%d' # Japan / China
'Y-m-d': ('%Y-%m-%d', 'YYYY-MM-DD'), # ISO / international / technical
'd.m.Y': ('%d.%m.%Y', 'DD.MM.YYYY'), # Germany / Central & Northern Europe
'd/m/Y': ('%d/%m/%Y', 'DD/MM/YYYY'), # UK / France / Spain / Italy / Australia / NZ
'd-m-Y': ('%d-%m-%Y', 'DD-MM-YYYY'), # Netherlands / Denmark / Belgium
'd M Y': ('%d %b %Y', 'DD Mon YYYY'), # nautical documents / logbooks / unambiguous
'm.d.Y': ('%m.%d.%Y', 'MM.DD.YYYY'), # USA
'm/d/Y': ('%m/%d/%Y', 'MM/DD/YYYY'), # USA
'Y/m/d': ('%Y/%m/%d', 'YYYY/MM/DD') # Japan / China
}
def __init__(self):
@@ -109,9 +111,10 @@ class AppContext:
if row is not None:
try:
self.datefmt = self.datefmt_map[row[0]]
print(row[0])
except KeyError:
# almost impossible case where db value is not in mapping
print("internal error: format mapping missinf")
print("internal error: date format mapping missing")
else:
# perhaps create missing record here?
pass
@@ -137,10 +140,12 @@ class Frontend:
"equipment": EquipmentView(context),
"inventory": InventoryView(context),
"provisions": ProvisionsView(context),
"measurement": MeasurementView(context),
"cables": CablesView(context),
"fuses": FusesView(context),
"maintenance": MaintenanceView(context),
"projects": ProjectsView(context),
"tasks": TasksView(context),
"documents": DocumentsView(context),
"status": StatusView(context)
}
@@ -152,13 +157,11 @@ class Frontend:
self.window = builder.get_object("wnd_main")
self.notebook = builder.get_object("ntb_modules")
for module in self.modules.values():
self.notebook.append_page(module.topwidget, Gtk.Label(label=module.title))
self.notebook.append_page(module.topwidget, Gtk.Label(label=module._title))
self.db_poll_ts = context.db.get_timestamp()
GLib.timeout_add_seconds(30, self.db_change_poller)
print("Frontend initialized.")
def run(self):
#self.label['vessel'].set_text(self._vessel.vesselname)
self.window.show_all()
@@ -195,14 +198,12 @@ def create_config(cfg, cfgfile):
if __name__ == "__main__":
print("Startup sequence entered...")
context = AppContext()
locale.setlocale(locale.LC_ALL, '')
gettext.bindtextdomain(context.textdomain, 'locale')
gettext.textdomain(context.textdomain)
gettext.install(context.textdomain)
gettext.install(context.textdomain, 'locale')
config = configparser.ConfigParser()
cfgfile = os.path.expanduser(context.cfg['cfgfile'])