Philipp Hörist pushed to branch master at gajim / gajim


Commits:
a350f3ed by Philipp Hörist at 2019-11-29T22:48:44Z
Assistant: return page on add_default_page()

- - - - -


2 changed files:

- gajim/gtk/assistant.py
- test/gtk/assistant.py


Changes:

=====================================
gajim/gtk/assistant.py
=====================================
@@ -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()


=====================================
test/gtk/assistant.py
=====================================
@@ -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')



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/a350f3ed88a03817606e4d7218f10691469441bd

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/a350f3ed88a03817606e4d7218f10691469441bd
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to