Merge lp:~kiwinote/software-center/optin into lp:software-center

Proposed by Kiwinote
Status: Merged
Merged at revision: 2780
Proposed branch: lp:~kiwinote/software-center/optin
Merge into: lp:software-center
Diff against target: 71 lines (+33/-20)
2 files modified
debian/changelog (+11/-0)
softwarecenter/ui/gtk3/widgets/recommendations.py (+22/-20)
To merge this branch: bzr merge lp:~kiwinote/software-center/optin
Reviewer Review Type Date Requested Status
software-store-developers Pending
Review via email: mp+94802@code.launchpad.net

Description of the change

fixes to the opt in pane - see the changelog entry for details

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-23 16:41:24 +0000
3+++ debian/changelog 2012-02-27 17:01:38 +0000
4@@ -1,3 +1,14 @@
5+software-center (5.1.11) UNRELEASED; urgency=low
6+
7+ * softwarecenter/ui/gtk3/widgets/recommendations.py:
8+ refactor _show_opt_in_view:
9+ - use normal sized text rather than big text
10+ - use saner padding values
11+ - resolve unescaped markup issues
12+ - line wrap text so we don't get horizontal scrollbar (LP: #933497)
13+
14+ -- Kiwinote <kiwinote@gmail.com> Fri, 24 Feb 2012 17:31:49 +0000
15+
16 software-center (5.1.10) precise; urgency=low
17
18 [ Michael Vogt ]
19
20=== modified file 'softwarecenter/ui/gtk3/widgets/recommendations.py'
21--- softwarecenter/ui/gtk3/widgets/recommendations.py 2012-02-15 15:40:41 +0000
22+++ softwarecenter/ui/gtk3/widgets/recommendations.py 2012-02-27 17:01:38 +0000
23@@ -96,26 +96,28 @@
24 self.header_implements_more_button()
25
26 def _show_opt_in_view(self):
27- self.opt_in_vbox = Gtk.VBox(spacing=12)
28- self.opt_in_button = Gtk.Button()
29- opt_in_button_label = Gtk.Label()
30- opt_in_button_label.set_markup('<big>%s</big>' % _("Turn On Recommendations"))
31- opt_in_button_label.set_padding(StockEms.SMALL, StockEms.SMALL)
32- self.opt_in_button.add(opt_in_button_label)
33- self.opt_in_button.connect("clicked", self._on_opt_in_button_clicked)
34- opt_in_button_hbox = Gtk.HBox()
35- opt_in_button_hbox.pack_start(self.opt_in_button, False, False, 0)
36- opt_in_text = _("To make recommendations, Ubuntu Software Center "
37- "will occasionally send to Canonical an anonymous list "
38- "of software currently installed.")
39- opt_in_label = Gtk.Label()
40- opt_in_label.set_markup('<big>%s</big>' % opt_in_text)
41- opt_in_label.set_use_markup(True)
42- self.opt_in_vbox.pack_start(opt_in_button_hbox, False, False, 0)
43- self.opt_in_vbox.pack_start(opt_in_label, False, False, 10)
44- self.recommended_for_you_content = Gtk.Alignment.new(0.5, 0.5, 1.0, 1.0)
45- self.recommended_for_you_content.set_padding(50, 50, 50, 50)
46- self.recommended_for_you_content.add(self.opt_in_vbox)
47+ # opt in box
48+ vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, StockEms.MEDIUM)
49+ vbox.set_border_width(StockEms.LARGE)
50+ self.opt_in_vbox = vbox # for tests
51+ self.recommended_for_you_content = vbox # hook it up to the rest
52+
53+ # opt in button
54+ button = Gtk.Button(_("Turn On Recommendations"))
55+ button.connect("clicked", self._on_opt_in_button_clicked)
56+ hbox = Gtk.Box(Gtk.Orientation.HORIZONTAL)
57+ hbox.pack_start(button, False, False, 0)
58+ vbox.pack_start(hbox, False, False, 0)
59+ self.opt_in_button = button # for tests
60+
61+ # opt in text
62+ text = _("To make recommendations, Ubuntu Software Center "
63+ "will occasionally send to Canonical an anonymous list "
64+ "of software currently installed.")
65+ label = Gtk.Label(text)
66+ label.set_alignment(0, 0.5)
67+ label.set_line_wrap(True)
68+ vbox.pack_start(label, False, False, 0)
69
70 def _on_opt_in_button_clicked(self, button):
71 # we upload the user profile here, and only after this is finished

Subscribers

People subscribed via source and target branches