Merge lp:~azzar1/software-properties/fix-1768797 into lp:software-properties

Proposed by Andrea Azzarone
Status: Merged
Merged at revision: 1042
Proposed branch: lp:~azzar1/software-properties/fix-1768797
Merge into: lp:software-properties
Diff against target: 45 lines (+13/-3)
1 file modified
softwareproperties/gtk/SoftwarePropertiesGtk.py (+13/-3)
To merge this branch: bzr merge lp:~azzar1/software-properties/fix-1768797
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Brian Murray Approve
Review via email: mp+348460@code.launchpad.net

Commit message

Allow the user to disable livepatch if the gnome-online-account expired.

To post a comment you must log in.
1042. By Andrea Azzarone

Allow the user to disable livepatch if the gnome-online-account expired.

Revision history for this message
Brian Murray (brian-murray) :
review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwareproperties/gtk/SoftwarePropertiesGtk.py'
2--- softwareproperties/gtk/SoftwarePropertiesGtk.py 2018-05-02 14:08:37 +0000
3+++ softwareproperties/gtk/SoftwarePropertiesGtk.py 2018-06-25 14:56:23 +0000
4@@ -1530,13 +1530,21 @@
5 text = "<span color='red'>" + text + "</span>"
6 self.label_livepatch_login.set_markup(text)
7 else:
8- self.checkbutton_livepatch.set_sensitive(False)
9+ if self.is_livepatch_enabled() and not self.waiting_livepatch_response:
10+ # Allow the user to disable livepatch even if
11+ # the account expired (see LP: #1768797)
12+ self.checkbutton_livepatch.set_sensitive(True)
13+ self.label_livepatch_login.set_label(_('Livepatch is active.'))
14+ else:
15+ self.checkbutton_livepatch.set_sensitive(False)
16+ self.label_livepatch_login.set_label(_('To use Livepatch you need to sign in.'))
17+
18 self.button_ubuntuone.set_label(_('Sign In…'))
19- self.label_livepatch_login.set_label(_('To use Livepatch you need to sign in.'))
20
21 def on_livepatch_status_changed(self, file_monitor, file, other_file, event_type):
22 if not self.waiting_livepatch_response:
23 self.checkbutton_livepatch.set_active(self.is_livepatch_enabled())
24+ self.on_goa_auth_changed()
25
26 def on_button_ubuntuone_clicked(self, button):
27 if self.goa_auth.logged:
28@@ -1561,8 +1569,8 @@
29 self.checkbutton_livepatch.set_active(True)
30
31 def do_logout(self):
32+ self.checkbutton_livepatch.set_active(False)
33 self.goa_auth.logout()
34- self.checkbutton_livepatch.set_active(False)
35
36 def on_checkbutton_livepatch_toggled(self, checkbutton):
37 if self.waiting_livepatch_response:
38@@ -1622,5 +1630,7 @@
39 error_handler=self.livepatch_enabled_error_handler,
40 timeout=LIVEPATCH_TIMEOUT)
41
42+ self.on_goa_auth_changed()
43+
44 if self.quit_when_livepatch_responds:
45 self.on_close_button(self.button_close)

Subscribers

People subscribed via source and target branches

to status/vote changes: