added a save button

This commit is contained in:
Lynne Megido 2020-08-23 22:44:57 +10:00
parent 381c2642d6
commit 6c5a93b0d8
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
2 changed files with 19 additions and 0 deletions

View File

@ -215,6 +215,9 @@ class BuypeebApp:
self.renderList()
self.updateItems()
def btnSaveClicked(self, widget):
self.settings.save()
def btnClearEndedClicked(self, widget):
if self.msgBox("Clear ended?", "Are you sure you want to clear all ended items from the watchlist?", buttons = Gtk.ButtonsType.OK_CANCEL) == Gtk.ResponseType.OK:
for id, item in self.settings.watchlist.items():

View File

@ -180,6 +180,22 @@
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Save</property>
<property name="label" translatable="yes">Save</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-save</property>
<signal name="clicked" handler="btnSaveClicked" swapped="no"/>
<accelerator key="s" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton">
<property name="visible">True</property>