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
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-23 16:41:24 +0000
+++ debian/changelog 2012-02-27 17:01:38 +0000
@@ -1,3 +1,14 @@
1software-center (5.1.11) UNRELEASED; urgency=low
2
3 * softwarecenter/ui/gtk3/widgets/recommendations.py:
4 refactor _show_opt_in_view:
5 - use normal sized text rather than big text
6 - use saner padding values
7 - resolve unescaped markup issues
8 - line wrap text so we don't get horizontal scrollbar (LP: #933497)
9
10 -- Kiwinote <kiwinote@gmail.com> Fri, 24 Feb 2012 17:31:49 +0000
11
1software-center (5.1.10) precise; urgency=low12software-center (5.1.10) precise; urgency=low
213
3 [ Michael Vogt ]14 [ Michael Vogt ]
415
=== modified file 'softwarecenter/ui/gtk3/widgets/recommendations.py'
--- softwarecenter/ui/gtk3/widgets/recommendations.py 2012-02-15 15:40:41 +0000
+++ softwarecenter/ui/gtk3/widgets/recommendations.py 2012-02-27 17:01:38 +0000
@@ -96,26 +96,28 @@
96 self.header_implements_more_button()96 self.header_implements_more_button()
9797
98 def _show_opt_in_view(self):98 def _show_opt_in_view(self):
99 self.opt_in_vbox = Gtk.VBox(spacing=12)99 # opt in box
100 self.opt_in_button = Gtk.Button()100 vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, StockEms.MEDIUM)
101 opt_in_button_label = Gtk.Label()101 vbox.set_border_width(StockEms.LARGE)
102 opt_in_button_label.set_markup('<big>%s</big>' % _("Turn On Recommendations"))102 self.opt_in_vbox = vbox # for tests
103 opt_in_button_label.set_padding(StockEms.SMALL, StockEms.SMALL)103 self.recommended_for_you_content = vbox # hook it up to the rest
104 self.opt_in_button.add(opt_in_button_label)104
105 self.opt_in_button.connect("clicked", self._on_opt_in_button_clicked)105 # opt in button
106 opt_in_button_hbox = Gtk.HBox()106 button = Gtk.Button(_("Turn On Recommendations"))
107 opt_in_button_hbox.pack_start(self.opt_in_button, False, False, 0)107 button.connect("clicked", self._on_opt_in_button_clicked)
108 opt_in_text = _("To make recommendations, Ubuntu Software Center "108 hbox = Gtk.Box(Gtk.Orientation.HORIZONTAL)
109 "will occasionally send to Canonical an anonymous list "109 hbox.pack_start(button, False, False, 0)
110 "of software currently installed.")110 vbox.pack_start(hbox, False, False, 0)
111 opt_in_label = Gtk.Label()111 self.opt_in_button = button # for tests
112 opt_in_label.set_markup('<big>%s</big>' % opt_in_text)112
113 opt_in_label.set_use_markup(True)113 # opt in text
114 self.opt_in_vbox.pack_start(opt_in_button_hbox, False, False, 0)114 text = _("To make recommendations, Ubuntu Software Center "
115 self.opt_in_vbox.pack_start(opt_in_label, False, False, 10)115 "will occasionally send to Canonical an anonymous list "
116 self.recommended_for_you_content = Gtk.Alignment.new(0.5, 0.5, 1.0, 1.0)116 "of software currently installed.")
117 self.recommended_for_you_content.set_padding(50, 50, 50, 50)117 label = Gtk.Label(text)
118 self.recommended_for_you_content.add(self.opt_in_vbox)118 label.set_alignment(0, 0.5)
119 label.set_line_wrap(True)
120 vbox.pack_start(label, False, False, 0)
119 121
120 def _on_opt_in_button_clicked(self, button):122 def _on_opt_in_button_clicked(self, button):
121 # we upload the user profile here, and only after this is finished123 # we upload the user profile here, and only after this is finished

Subscribers

People subscribed via source and target branches