Merge ~nteodosio/software-properties:pin into software-properties:ubuntu/master

Proposed by Nathan Teodosio
Status: Merged
Approved by: Sebastien Bacher
Approved revision: e9cc3532af8a78374a69ba69169756cccc7b9690
Merge reported by: Sebastien Bacher
Merged at revision: e9cc3532af8a78374a69ba69169756cccc7b9690
Proposed branch: ~nteodosio/software-properties:pin
Merge into: software-properties:ubuntu/master
Diff against target: 36 lines (+10/-8)
1 file modified
softwareproperties/gtk/DialogUaAttach.py (+10/-8)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+436131@code.launchpad.net
To post a comment you must log in.
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
1diff --git a/softwareproperties/gtk/DialogUaAttach.py b/softwareproperties/gtk/DialogUaAttach.py
2index 7569c2f..7a6af10 100644
3--- a/softwareproperties/gtk/DialogUaAttach.py
4+++ b/softwareproperties/gtk/DialogUaAttach.py
5@@ -78,6 +78,16 @@ class DialogUaAttach:
6 self.token_field.set_sensitive(not self.attaching
7 and self.token_radio.get_active())
8
9+ # Unconditionally hide the "other radio section" icon/status.
10+ # Show icon/status of the "current radio section" only if case is set.
11+ self.token_status_icon.set_visible(False)
12+ self.token_status.set_visible(False)
13+ self.pin_status_icon.set_visible(False)
14+ self.pin_status.set_visible(False)
15+ if (case != None):
16+ icon.set_visible(True)
17+ status.set_visible(True)
18+
19 if (case == "fail"):
20 status.set_markup('<span foreground="red">%s</span>' % _('Invalid token'))
21 icon.set_from_icon_name('emblem-unreadable', 1)
22@@ -91,14 +101,6 @@ class DialogUaAttach:
23 status.set_markup(_('Code expired'))
24 icon.set_from_icon_name('gtk-dialog-warning', 1)
25
26- #Only show icons/status if case is set
27- self.token_status_icon.set_visible(False)
28- self.token_status.set_visible(False)
29- self.pin_status_icon.set_visible(False)
30- self.pin_status.set_visible(False)
31- icon.set_visible(case)
32- status.set_visible(case)
33-
34 def attach(self):
35 if self.attaching:
36 return

Subscribers

People subscribed via source and target branches