More work on native gui. Make data editable.
This commit is contained in:
1 parent
5641e1706f
commit
7aa5d2af3b
43 files changed
+2686
-1037
No files matched your search
+4
-2
@@ -76,6 +76,7 @@ class StorageView(View):
|
||||
combobox.activate_row(self.combo['type'], storage.GENERIC)
|
||||
combobox.activate_row(self.combo['unit'], "-1")
|
||||
self.text['remarks'].get_buffer().set_text('')
|
||||
self.entry['sname'].grab_focus()
|
||||
|
||||
def display_record(self):
|
||||
self.label['name'].set_text(self.storage.sname)
|
||||
@@ -108,6 +109,7 @@ class StorageView(View):
|
||||
rgba.parse('#' + (self.storage.color or '000000'))
|
||||
self.button['color'].set_rgba(rgba)
|
||||
self.text['remarks'].get_buffer().set_text(self.storage.remarks or '')
|
||||
self.entry['sname'].grab_focus()
|
||||
|
||||
def save_record(self):
|
||||
# fields must have been validated beforehand
|
||||
@@ -187,10 +189,10 @@ class StorageView(View):
|
||||
self.storage.save()
|
||||
if self.newrecord:
|
||||
self.load_list()
|
||||
self.newrecord = False
|
||||
else:
|
||||
pass
|
||||
# TODO aktuelle Listenzeile aktualisieren!
|
||||
self.newrecord = False
|
||||
self.display_record()
|
||||
self.topwidget.set_visible_child(self.box['stor_detail'])
|
||||
|
||||
@@ -206,7 +208,7 @@ class StorageView(View):
|
||||
self.set_color_from_entry(entry)
|
||||
|
||||
def on_ent_color_focus_out_event(self, entry, event):
|
||||
self.set_color_from_entry(entry)
|
||||
self.set_color_from_entry(entry, self.button['color'])
|
||||
return False
|
||||
|
||||
def on_but_cancel_clicked(self, widget):
|
||||
|
||||
Reference in new issue
Block a user