Merge lp:~rodrigo-moya/ubuntuone-client/use-sso-in-u1-prefs into lp:ubuntuone-client
| Status: | Merged |
|---|---|
| Approved by: | dobey on 2010-08-24 |
| Approved revision: | 651 |
| Merged at revision: | 650 |
| Proposed branch: | lp:~rodrigo-moya/ubuntuone-client/use-sso-in-u1-prefs |
| Merge into: | lp:ubuntuone-client |
| Diff against target: |
517 lines (+71/-125) 2 files modified
bin/ubuntuone-preferences (+54/-82) tests/test_preferences.py (+17/-43) |
| To merge this branch: | bzr merge lp:~rodrigo-moya/ubuntuone-client/use-sso-in-u1-prefs |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| dobey (community) | Approve on 2010-08-24 | ||
| Natalia Bidart | 2010-08-24 | Approve on 2010-08-24 | |
|
Review via email:
|
|||
Commit Message
Make ubuntuone-
Description of the Change
Make ubuntuone-
- 648. By Rodrigo Moya on 2010-08-24
-
Some fixes
| dobey (dobey) wrote : | # |
Your change introduces a regression where multiple dialogs can be opened in the same process. There should only ever be one single dialog for this process.
- 649. By Rodrigo Moya on 2010-08-24
-
Create the dialog only once
| dobey (dobey) wrote : | # |
It looks like test_login_check in the tests is skipped at the moment, but it should be updated to comply with the changes here too. I'd also avoid using globals for the oauth_token and oauth_consumer variables, and store them as attributes in the dialog (and pass them on to the other classes and methods that might need them).
I'm still confused about the changes for the dialog creation though. Why did you change it to not create the dialog when starting up? Shouldn't the dialog be created and shown, and its window id passed over to ubuntu_sso for setting as the parent?
The dialog creation was how it was, in order to show the dialog to the user as soon as possible, so that they know things are happening. Is there a good reason to not do that now?
| Natalia Bidart (nataliabidart) wrote : | # |
The docstrings were not fixed (see lines 92-94 and 104-106)
| Rodrigo Moya (rodrigo-moya) wrote : | # |
> The docstrings were not fixed (see lines 92-94 and 104-106)
I think they're fixed now, I guess you wanted them on just 1 line?
- 650. By Rodrigo Moya on 2010-08-24
-
Fixed docstrings
| Rodrigo Moya (rodrigo-moya) wrote : | # |
> It looks like test_login_check in the tests is skipped at the moment, but it
> should be updated to comply with the changes here too. I'd also avoid using
> globals for the oauth_token and oauth_consumer variables, and store them as
> attributes in the dialog (and pass them on to the other classes and methods
> that might need them).
>
test_login_check still depends on the real DBus service to be run, not sure how we can make it work without depending on the tests in ubuntu-sso-client. If there's a way, I'm ok with doing it, but not in this branch, which is needed for the new release to be done today or tomorrow at the latest.
> I'm still confused about the changes for the dialog creation though. Why did
> you change it to not create the dialog when starting up? Shouldn't the dialog
> be created and shown, and its window id passed over to ubuntu_sso for setting
> as the parent?
>
well, what was the point of having a dialog with all the widgets showing temporary data ('Unknown', etc)? So, now, we create the dialog associated to the LoginHandler, and show it when we get the credentials or when calling _present
> The dialog creation was how it was, in order to show the dialog to the user as
> soon as possible, so that they know things are happening. Is there a good
> reason to not do that now?
>
if the credentials are in the keyring, the dialog will show up inmediately, if not, they will see the SSO login/register screen
- 651. By Rodrigo Moya on 2010-08-24
-
Move instantiation of dialog back to its original place


For the constants use those in ubuntuone/ clientdefs. py.
Please fix the docstrings "Helper that handles the REST response." (and the similar ones).
This needs to use APP_NAME instead of 'ubuntuone': iface.clear_ token(' ubuntuone' .
This also: + if app_name == "Ubuntu One":
Remove + print "Got credentials"
Remove _() for log messages.