Commit a350f3ed authored by Philipp Hörist's avatar Philipp Hörist

Assistant: return page on add_default_page()

parent fe6842af
Pipeline #4663 passed with stages
in 6 minutes and 5 seconds
......@@ -105,6 +105,7 @@ class Assistant(Gtk.ApplicationWindow, EventHelper):
self._pages[name] = page
self._ui.stack.add_named(page, name)
return page
def get_current_page(self):
return self._ui.stack.get_visible_child_name()
......
......@@ -17,18 +17,15 @@ class TestAssistant(Assistant):
self.add_pages({'start': Start(),
'progress': Progress()})
self.add_default_page('error')
self.add_default_page('success')
success_page = self.get_page('success')
success_page.set_title('Success')
success_page.set_heading('Success Heading')
success_page.set_text('This is the success text')
error_page = self.get_page('error')
error_page.set_title('Error')
error_page.set_heading('Error Heading')
error_page.set_text('This is the error text')
error = self.add_default_page('error')
error.set_title('Error')
error.set_heading('Error Heading')
error.set_text('This is the error text')
success = self.add_default_page('success')
success.set_title('Success')
success.set_heading('Success Heading')
success.set_text('This is the success text')
self.add_button('forward', 'Forward', 'suggested-action')
self.add_button('close', 'Close', 'destructive-action')
......
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