Skip to content
Snippets Groups Projects
Commit 54548fdd authored by Nico's avatar Nico
Browse files

Use action instead of on_alias_back_pressed function

parent 2cb33ce8
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,18 @@ class AddContactActions(Actions):
def _setup_actions(self):
self._setup_proceed_from_links_action()
self._setup_return_from_alias_action()
def _setup_proceed_from_links_action(self):
self._setup_action("proceed-from-links", None, self._proceed_from_links)
def _setup_return_from_alias_action(self):
self._setup_action("return-from-alias", None, self._return_from_alias)
# pylint: disable=unused-argument
def _proceed_from_links(self, action, parameter):
self.widget.proceed_from_links()
# pylint: disable=unused-argument
def _return_from_alias(self, action, parameter):
self.widget.show_links_page()
......@@ -101,11 +101,7 @@ class AddContactContainer(Container):
def _on_alias_enter(self, widget):
self.on_add_contact_pressed(None)
# pylint: disable=unused-argument
def on_alias_back_pressed(self, button):
self._show_links_page()
def _show_links_page(self):
def show_links_page(self):
links_page = self.builder.get_object("links_page")
self.add_contact_flow_stack.set_visible_child(links_page)
......
......@@ -229,7 +229,7 @@
<object class="GtkButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="clicked" handler="on_alias_back_pressed"/>
<property name="action_name">add-contact.return-from-alias</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment