Merge lp://staging/~nataliabidart/ubuntu-sso-client/split-gui into lp://staging/ubuntu-sso-client

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 657
Merged at revision: 653
Proposed branch: lp://staging/~nataliabidart/ubuntu-sso-client/split-gui
Merge into: lp://staging/ubuntu-sso-client
Diff against target: 1130 lines (+329/-227)
14 files modified
.bzrignore (+1/-0)
data/ui.glade (+148/-101)
po/POTFILES.in (+1/-1)
setup.py (+2/-3)
ubuntu_sso/credentials.py (+11/-11)
ubuntu_sso/gtk/__init__.py (+19/-0)
ubuntu_sso/gtk/gui.py (+13/-19)
ubuntu_sso/gtk/tests/__init__.py (+19/-0)
ubuntu_sso/gtk/tests/test_gui.py (+12/-13)
ubuntu_sso/main.py (+6/-3)
ubuntu_sso/tests/__init__.py (+2/-0)
ubuntu_sso/tests/bin/show_gui (+1/-1)
ubuntu_sso/tests/test_credentials.py (+89/-73)
ubuntu_sso/tests/test_main.py (+5/-2)
To merge this branch: bzr merge lp://staging/~nataliabidart/ubuntu-sso-client/split-gui
Reviewer Review Type Date Requested Status
Vincenzo Di Somma (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+41369@code.staging.launchpad.net

Commit message

* Make UI more friendly to resizes and big fonts (LP: #627496).
* Splitting GUI code out of backend (LP: #677518).

Description of the change

This branch introduces 2 main changes:

** The gtk ui has been tweaked a bit so it looks good even on small screens or with big fonts

To test this you can follow the procedure described in the bug report LP: #627496.

** All the gtk ui code is separated into a new gtk package

To accomplish the former, besides moving modules around, 2 new parameters were added to the (new since Natty) dbus methods for the CredentialsManagement interface:

* 'ui_module': string describing the import path to the module providing the UI
* 'ui_class': string describing the name of the class within 'ui_module' that opens the graphical interface to login/register

To test this new parameters you should:

* run from this branch the following:

nessita@dali:~/canonical/ubuntu-sso-client/split-gui$ killall ubuntu-sso-login; DEBUG=True PYTHONPATH=. ./bin/ubuntu-sso-login

* open d-feet and execute the 'login' or 'register' method for the CredentialsManagement interface (com.ubuntu.sso dbus service) and pass parameters like:

'Test Me', {'help_text': 'Lorem Ipsum sir Amet', 'tc_url': 'http://google.com', 'ui_module': 'test.me', 'ui_class': 'yadda'}

this would throw ImportError such as:

Traceback (most recent call last):
  File "/home/nessita/canonical/ubuntu-sso-client/split-gui/ubuntu_sso/credentials.py", line 86, in inner
    result = f(self, *a, **kw)
  File "/home/nessita/canonical/ubuntu-sso-client/split-gui/ubuntu_sso/credentials.py", line 248, in _show_ui
    __import__(self.ui_module)
ImportError: No module named me

A successful call would be achieved passing parameters like:

'Test Me', {'help_text': 'Lorem Ipsum sir Amet', 'tc_url': 'http://google.com', 'ui_module': 'ubuntu_sso.gtk.gui', 'ui_class': 'UbuntuSSOClientGUI'}

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

"""
* open d-feet and execute the 'login' or 'register' method for the CredentialsManagement interface (com.ubuntu.sso dbus service) and pass parameters like:

'Test Me', {'help_text': 'Lorem Ipsum sir Amet', 'tc_url': 'http://google.com', 'ui_module': 'test.me', 'ui_class': 'yadda'}

this would throw ImportError such as:

...
"""

It does not, I see:

'This method did not return anything' for both login and register.

I'm probably doing it wrong™.

review: Needs Information
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Strike that, was looking in the wrong place.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Yep, works like a charm! +1

review: Approve
Revision history for this message
Vincenzo Di Somma (vds) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches