Commit 1c8eb0da authored by Daniel Garcia Moreno's avatar Daniel Garcia Moreno

Merge branch 'remove_dialog_tweaks' into 'master'

UI Tweaks for the remove dialog

See merge request !8
parents cf7892f5 763682d5
Pipeline #57079 passed with stage
in 58 seconds
......@@ -428,9 +428,19 @@ class MainWindow(Gtk.ApplicationWindow):
index = selected.get_index()
act = self.activity_model.get_item(index)
aid = act.id
msg = _('Are you sure you want to remove <b>"{name}"</b>?')
confirm = Gtk.MessageDialog(text=_("Are you sure?"),
buttons=Gtk.ButtonsType.YES_NO)
confirm = Gtk.MessageDialog()
confirm.set_markup(msg.format(name=act.name))
confirm.add_button(button_text="Cancel",
response_id=Gtk.ResponseType.NO)
remove = confirm.add_button(button_text="Remove",
response_id=Gtk.ResponseType.YES)
remove.get_style_context().add_class("destructive-action")
confirm.set_transient_for(self)
confirm.set_attached_to(self)
confirm.set_destroy_with_parent(True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment