more stuff
This commit is contained in:
@@ -132,13 +132,25 @@ class InactiveLocationCard:
|
||||
details_label.set_halign(Gtk.Align.START)
|
||||
info_vbox.pack_start(details_label, False, False, 0)
|
||||
|
||||
# Button box for multiple buttons
|
||||
button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=4)
|
||||
location_hbox.pack_end(button_box, False, False, 0)
|
||||
|
||||
# Set as Current button
|
||||
current_btn = Gtk.Button(label="Set as Current")
|
||||
current_btn.connect("clicked", self._on_set_current_clicked)
|
||||
button_box.pack_start(current_btn, False, False, 0)
|
||||
|
||||
# Activate button
|
||||
activate_btn = Gtk.Button(label="Set Active")
|
||||
activate_btn.get_style_context().add_class("suggested-action")
|
||||
activate_btn.connect("clicked", self._on_activate_clicked)
|
||||
location_hbox.pack_end(activate_btn, False, False, 0)
|
||||
button_box.pack_start(activate_btn, False, False, 0)
|
||||
|
||||
return location_hbox
|
||||
|
||||
def _on_activate_clicked(self, button):
|
||||
self.callbacks['set_location_active'](self.location, self.customer_name)
|
||||
self.callbacks['set_location_active'](self.location, self.customer_name)
|
||||
|
||||
def _on_set_current_clicked(self, button):
|
||||
self.callbacks['set_current_location'](self.location, self.customer_name)
|
||||
Reference in New Issue
Block a user