Merge lp:~dobey/ubuntu/oneiric/ubuntuone-installer/release-173 into lp:ubuntu/oneiric/ubuntuone-installer
- Oneiric (11.10)
- release-173
- Merge into oneiric
Proposed by
dobey
Status: | Merged |
---|---|
Merged at revision: | 5 |
Proposed branch: | lp:~dobey/ubuntu/oneiric/ubuntuone-installer/release-173 |
Merge into: | lp:ubuntu/oneiric/ubuntuone-installer |
Diff against target: |
392 lines (+174/-64) 7 files modified
MANIFEST (+0/-17) PKG-INFO (+1/-1) debian/changelog (+9/-0) po/ubuntuone-installer.pot (+0/-22) setup.py (+1/-1) ubuntuone-installer.desktop.in (+1/-1) ubuntuone/installer/gui.py (+162/-22) |
To merge this branch: | bzr merge lp:~dobey/ubuntu/oneiric/ubuntuone-installer/release-173 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Approve | ||
Review via email: mp+72785@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file 'MANIFEST' | |||
2 | --- MANIFEST 2011-08-17 12:00:40 +0000 | |||
3 | +++ MANIFEST 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,17 +0,0 @@ | |||
5 | 1 | # file GENERATED by distutils, do NOT edit | ||
6 | 2 | COPYING | ||
7 | 3 | MANIFEST | ||
8 | 4 | run-tests | ||
9 | 5 | setup.py | ||
10 | 6 | ubuntuone-installer.desktop.in | ||
11 | 7 | ubuntuone.installer.pth | ||
12 | 8 | bin/ubuntuone-installer | ||
13 | 9 | data/header.png | ||
14 | 10 | po/LINGUAS | ||
15 | 11 | po/POTFILES.in | ||
16 | 12 | po/ubuntuone-installer.pot | ||
17 | 13 | ubuntuone/__init__.py | ||
18 | 14 | ubuntuone/installer/__init__.py | ||
19 | 15 | ubuntuone/installer/gui.py | ||
20 | 16 | ubuntuone/installer/tests/__init__.py | ||
21 | 17 | ubuntuone/installer/tests/test_gui.py | ||
22 | 18 | 0 | ||
23 | === modified file 'PKG-INFO' | |||
24 | --- PKG-INFO 2011-08-17 12:00:40 +0000 | |||
25 | +++ PKG-INFO 2011-08-24 20:37:24 +0000 | |||
26 | @@ -1,6 +1,6 @@ | |||
27 | 1 | Metadata-Version: 1.1 | 1 | Metadata-Version: 1.1 |
28 | 2 | Name: ubuntuone-installer | 2 | Name: ubuntuone-installer |
30 | 3 | Version: 1.7.2 | 3 | Version: 1.7.3 |
31 | 4 | Summary: Ubuntu One Installer | 4 | Summary: Ubuntu One Installer |
32 | 5 | Home-page: https://launchpad.net/ubuntuone-installer | 5 | Home-page: https://launchpad.net/ubuntuone-installer |
33 | 6 | Author: Ubuntu One Hackers | 6 | Author: Ubuntu One Hackers |
34 | 7 | 7 | ||
35 | === removed file 'data/header.png' | |||
36 | 8 | Binary files data/header.png 2011-08-17 12:00:40 +0000 and data/header.png 1970-01-01 00:00:00 +0000 differ | 8 | Binary files data/header.png 2011-08-17 12:00:40 +0000 and data/header.png 1970-01-01 00:00:00 +0000 differ |
37 | === added directory 'data/icons' | |||
38 | === added directory 'data/icons/16x16' | |||
39 | === added directory 'data/icons/16x16/apps' | |||
40 | === added file 'data/icons/16x16/apps/ubuntuone-installer.png' | |||
41 | 9 | Binary files data/icons/16x16/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/16x16/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ | 9 | Binary files data/icons/16x16/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/16x16/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ |
42 | === added directory 'data/icons/24x24' | |||
43 | === added directory 'data/icons/24x24/apps' | |||
44 | === added file 'data/icons/24x24/apps/ubuntuone-installer.png' | |||
45 | 10 | Binary files data/icons/24x24/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/24x24/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ | 10 | Binary files data/icons/24x24/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/24x24/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ |
46 | === added directory 'data/icons/32x32' | |||
47 | === added directory 'data/icons/32x32/apps' | |||
48 | === added file 'data/icons/32x32/apps/ubuntuone-installer.png' | |||
49 | 11 | Binary files data/icons/32x32/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/32x32/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ | 11 | Binary files data/icons/32x32/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/32x32/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ |
50 | === added directory 'data/icons/48x48' | |||
51 | === added directory 'data/icons/48x48/apps' | |||
52 | === added file 'data/icons/48x48/apps/ubuntuone-installer.png' | |||
53 | 12 | Binary files data/icons/48x48/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/48x48/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ | 12 | Binary files data/icons/48x48/apps/ubuntuone-installer.png 1970-01-01 00:00:00 +0000 and data/icons/48x48/apps/ubuntuone-installer.png 2011-08-24 20:37:24 +0000 differ |
54 | === added file 'data/share.png' | |||
55 | 13 | Binary files data/share.png 1970-01-01 00:00:00 +0000 and data/share.png 2011-08-24 20:37:24 +0000 differ | 13 | Binary files data/share.png 1970-01-01 00:00:00 +0000 and data/share.png 2011-08-24 20:37:24 +0000 differ |
56 | === added file 'data/stream.png' | |||
57 | 14 | Binary files data/stream.png 1970-01-01 00:00:00 +0000 and data/stream.png 2011-08-24 20:37:24 +0000 differ | 14 | Binary files data/stream.png 1970-01-01 00:00:00 +0000 and data/stream.png 2011-08-24 20:37:24 +0000 differ |
58 | === added file 'data/sync.png' | |||
59 | 15 | Binary files data/sync.png 1970-01-01 00:00:00 +0000 and data/sync.png 2011-08-24 20:37:24 +0000 differ | 15 | Binary files data/sync.png 1970-01-01 00:00:00 +0000 and data/sync.png 2011-08-24 20:37:24 +0000 differ |
60 | === added file 'data/u1logo.png' | |||
61 | 16 | Binary files data/u1logo.png 1970-01-01 00:00:00 +0000 and data/u1logo.png 2011-08-24 20:37:24 +0000 differ | 16 | Binary files data/u1logo.png 1970-01-01 00:00:00 +0000 and data/u1logo.png 2011-08-24 20:37:24 +0000 differ |
62 | === modified file 'debian/changelog' | |||
63 | --- debian/changelog 2011-08-22 14:39:30 +0000 | |||
64 | +++ debian/changelog 2011-08-24 20:37:24 +0000 | |||
65 | @@ -1,3 +1,12 @@ | |||
66 | 1 | ubuntuone-installer (1.7.3-0ubuntu1) oneiric; urgency=low | ||
67 | 2 | |||
68 | 3 | * New upstream release. | ||
69 | 4 | - Add icons for the installer app (LP: #833231) | ||
70 | 5 | - Update the UI to match the final design (LP: #828195) | ||
71 | 6 | - Add a learn more button (LP: #828169) | ||
72 | 7 | |||
73 | 8 | -- Rodney Dawes <rodney.dawes@ubuntu.com> Wed, 24 Aug 2011 16:30:01 -0400 | ||
74 | 9 | |||
75 | 1 | ubuntuone-installer (1.7.2-0ubuntu2) oneiric; urgency=low | 10 | ubuntuone-installer (1.7.2-0ubuntu2) oneiric; urgency=low |
76 | 2 | 11 | ||
77 | 3 | * Require new DistUtilsExtra, avoid override with xvfb, fixes FTBFS | 12 | * Require new DistUtilsExtra, avoid override with xvfb, fixes FTBFS |
78 | 4 | 13 | ||
79 | === removed file 'po/ubuntuone-installer.pot' | |||
80 | --- po/ubuntuone-installer.pot 2011-08-17 12:00:40 +0000 | |||
81 | +++ po/ubuntuone-installer.pot 1970-01-01 00:00:00 +0000 | |||
82 | @@ -1,22 +0,0 @@ | |||
83 | 1 | # SOME DESCRIPTIVE TITLE. | ||
84 | 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
85 | 3 | # This file is distributed under the same license as the PACKAGE package. | ||
86 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
87 | 5 | # | ||
88 | 6 | #, fuzzy | ||
89 | 7 | msgid "" | ||
90 | 8 | msgstr "" | ||
91 | 9 | "Project-Id-Version: PACKAGE VERSION\n" | ||
92 | 10 | "Report-Msgid-Bugs-To: \n" | ||
93 | 11 | "POT-Creation-Date: 2011-08-11 14:12-0400\n" | ||
94 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
95 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
96 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | ||
97 | 15 | "Language: \n" | ||
98 | 16 | "MIME-Version: 1.0\n" | ||
99 | 17 | "Content-Type: text/plain; charset=CHARSET\n" | ||
100 | 18 | "Content-Transfer-Encoding: 8bit\n" | ||
101 | 19 | |||
102 | 20 | #: ../ubuntuone-installer.desktop.in.h:1 | ||
103 | 21 | msgid "Configure and manage your Ubuntu One account" | ||
104 | 22 | msgstr "" | ||
105 | 23 | 0 | ||
106 | === modified file 'setup.py' | |||
107 | --- setup.py 2011-08-17 12:00:40 +0000 | |||
108 | +++ setup.py 2011-08-24 20:37:24 +0000 | |||
109 | @@ -52,7 +52,7 @@ | |||
110 | 52 | 52 | ||
111 | 53 | DistUtilsExtra.auto.setup( | 53 | DistUtilsExtra.auto.setup( |
112 | 54 | name='ubuntuone-installer', | 54 | name='ubuntuone-installer', |
114 | 55 | version='1.7.2', | 55 | version='1.7.3', |
115 | 56 | license='GPL v3', | 56 | license='GPL v3', |
116 | 57 | author='Ubuntu One Hackers', | 57 | author='Ubuntu One Hackers', |
117 | 58 | author_email='ubuntuone-users@lists.launchpad.net', | 58 | author_email='ubuntuone-users@lists.launchpad.net', |
118 | 59 | 59 | ||
119 | === modified file 'ubuntuone-installer.desktop.in' | |||
120 | --- ubuntuone-installer.desktop.in 2011-08-17 12:00:40 +0000 | |||
121 | +++ ubuntuone-installer.desktop.in 2011-08-24 20:37:24 +0000 | |||
122 | @@ -2,7 +2,7 @@ | |||
123 | 2 | Name=Ubuntu One | 2 | Name=Ubuntu One |
124 | 3 | _Comment=Configure and manage your Ubuntu One account | 3 | _Comment=Configure and manage your Ubuntu One account |
125 | 4 | Exec=ubuntuone-installer | 4 | Exec=ubuntuone-installer |
127 | 5 | Icon=ubuntuone | 5 | Icon=ubuntuone-installer |
128 | 6 | Terminal=false | 6 | Terminal=false |
129 | 7 | Type=Application | 7 | Type=Application |
130 | 8 | Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings | 8 | Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings |
131 | 9 | 9 | ||
132 | === modified file 'ubuntuone/installer/gui.py' | |||
133 | --- ubuntuone/installer/gui.py 2011-08-17 12:00:40 +0000 | |||
134 | +++ ubuntuone/installer/gui.py 2011-08-24 20:37:24 +0000 | |||
135 | @@ -19,7 +19,7 @@ | |||
136 | 19 | import aptdaemon.client as aptclient | 19 | import aptdaemon.client as aptclient |
137 | 20 | import os | 20 | import os |
138 | 21 | 21 | ||
140 | 22 | from gi.repository import Gtk, GObject, GLib, Gdk | 22 | from gi.repository import Gtk, GObject, GLib, Gdk, Pango |
141 | 23 | 23 | ||
142 | 24 | # Some shenanigans to deal with pyflakes complaining | 24 | # Some shenanigans to deal with pyflakes complaining |
143 | 25 | inline_callbacks = None | 25 | inline_callbacks = None |
144 | @@ -36,6 +36,29 @@ | |||
145 | 36 | """Exception for when on an unsupported distribution.""" | 36 | """Exception for when on an unsupported distribution.""" |
146 | 37 | 37 | ||
147 | 38 | 38 | ||
148 | 39 | class VSeparator(Gtk.VSeparator): | ||
149 | 40 | """A dotted line separator.""" | ||
150 | 41 | |||
151 | 42 | def do_draw(self, cairo_context): | ||
152 | 43 | """Draw some magic.""" | ||
153 | 44 | sc = self.get_style_context() | ||
154 | 45 | state = self.get_state_flags() | ||
155 | 46 | width = self.get_allocated_width() | ||
156 | 47 | height = self.get_allocated_height() | ||
157 | 48 | |||
158 | 49 | sc.save() | ||
159 | 50 | sc.set_state(state) | ||
160 | 51 | |||
161 | 52 | y = 0 | ||
162 | 53 | x = width / 2 | ||
163 | 54 | while y < height: | ||
164 | 55 | Gtk.render_activity(sc, cairo_context, float(x), float(y), 1, 1) | ||
165 | 56 | y += 3 | ||
166 | 57 | |||
167 | 58 | sc.restore() | ||
168 | 59 | return True | ||
169 | 60 | |||
170 | 61 | |||
171 | 39 | class Window(Gtk.Window): | 62 | class Window(Gtk.Window): |
172 | 40 | """The main dialog to use.""" | 63 | """The main dialog to use.""" |
173 | 41 | 64 | ||
174 | @@ -47,28 +70,54 @@ | |||
175 | 47 | def __init__(self): | 70 | def __init__(self): |
176 | 48 | Gtk.Window.__init__(self) | 71 | Gtk.Window.__init__(self) |
177 | 49 | self.set_title('Ubuntu One') | 72 | self.set_title('Ubuntu One') |
178 | 73 | self.set_default_icon_name('ubuntuone-installer') | ||
179 | 50 | self.set_type_hint(Gdk.WindowTypeHint.DIALOG) | 74 | self.set_type_hint(Gdk.WindowTypeHint.DIALOG) |
180 | 51 | self.set_position(Gtk.WindowPosition.CENTER) | 75 | self.set_position(Gtk.WindowPosition.CENTER) |
181 | 52 | 76 | ||
182 | 53 | vbox = Gtk.VBox() | 77 | vbox = Gtk.VBox() |
183 | 78 | vbox.set_spacing(24) | ||
184 | 54 | self.add(vbox) | 79 | self.add(vbox) |
185 | 55 | vbox.show() | 80 | vbox.show() |
186 | 56 | 81 | ||
189 | 57 | self.__header = Gtk.Image() | 82 | self.__header = Gtk.HBox() |
190 | 58 | self.__header.set_size_request(734, 162) | 83 | self.__header.set_border_width(12) |
191 | 84 | self.__header.set_spacing(64) | ||
192 | 59 | vbox.pack_start(self.__header, False, False, 0) | 85 | vbox.pack_start(self.__header, False, False, 0) |
193 | 60 | self.__header.show() | 86 | self.__header.show() |
194 | 61 | 87 | ||
198 | 62 | header = self.__find_data_file('header.png') | 88 | self.__hlabelbox = Gtk.VBox() |
199 | 63 | if header: | 89 | self.__hlabelbox.set_spacing(12) |
200 | 64 | self.__header.set_from_file(header) | 90 | self.__header.pack_start(self.__hlabelbox, True, True, 0) |
201 | 91 | self.__hlabelbox.show() | ||
202 | 92 | |||
203 | 93 | self.__hlabel = Gtk.Label((u'<span size="xx-large">{}</span>').format( | ||
204 | 94 | u'Install Ubuntu One')) | ||
205 | 95 | self.__hlabel.set_use_markup(True) | ||
206 | 96 | self.__hlabel.set_alignment(0.0, 0.0) | ||
207 | 97 | self.__hlabelbox.pack_start(self.__hlabel, False, False, 0) | ||
208 | 98 | self.__hlabel.show() | ||
209 | 99 | |||
210 | 100 | self.__hlabel2 = Gtk.Label((u'<span size="large">{}</span>').format( | ||
211 | 101 | u'Discover the freedom of your personal cloud')) | ||
212 | 102 | self.__hlabel2.set_use_markup(True) | ||
213 | 103 | self.__hlabel2.set_alignment(0.0, 0.0) | ||
214 | 104 | self.__hlabelbox.pack_start(self.__hlabel2, False, False, 0) | ||
215 | 105 | self.__hlabel2.show() | ||
216 | 106 | |||
217 | 107 | self.__hlogo = Gtk.Image() | ||
218 | 108 | self.__header.pack_end(self.__hlogo, False, False, 0) | ||
219 | 109 | self.__hlogo.show() | ||
220 | 110 | |||
221 | 111 | logo = self.__find_data_file('u1logo.png') | ||
222 | 112 | if logo: | ||
223 | 113 | self.__hlogo.set_from_file(logo) | ||
224 | 65 | 114 | ||
225 | 66 | self.__notebook = Gtk.Notebook() | 115 | self.__notebook = Gtk.Notebook() |
226 | 67 | self.__notebook.set_show_tabs(False) | 116 | self.__notebook.set_show_tabs(False) |
227 | 68 | self.__notebook.set_show_border(False) | 117 | self.__notebook.set_show_border(False) |
228 | 69 | self.__notebook.set_scrollable(False) | 118 | self.__notebook.set_scrollable(False) |
229 | 70 | self.__notebook.popup_disable() | 119 | self.__notebook.popup_disable() |
231 | 71 | self.__notebook.set_size_request(734, 240) | 120 | #self.__notebook.set_size_request(734, 240) |
232 | 72 | 121 | ||
233 | 73 | self.__info_page = self.__construct_info_page() | 122 | self.__info_page = self.__construct_info_page() |
234 | 74 | self.__notebook.append_page(self.__info_page, None) | 123 | self.__notebook.append_page(self.__info_page, None) |
235 | @@ -81,7 +130,7 @@ | |||
236 | 81 | self.__notebook.append_page(self.__progress_page, None) | 130 | self.__notebook.append_page(self.__progress_page, None) |
237 | 82 | self.__progress_page.show() | 131 | self.__progress_page.show() |
238 | 83 | 132 | ||
240 | 84 | vbox.add(self.__notebook) | 133 | vbox.pack_start(self.__notebook, False, False, 0) |
241 | 85 | self.__notebook.show() | 134 | self.__notebook.show() |
242 | 86 | 135 | ||
243 | 87 | self.__action_area = Gtk.HButtonBox() | 136 | self.__action_area = Gtk.HButtonBox() |
244 | @@ -97,8 +146,7 @@ | |||
245 | 97 | self.__action_area.add(self.__cancel_button) | 146 | self.__action_area.add(self.__cancel_button) |
246 | 98 | self.__cancel_button.show() | 147 | self.__cancel_button.show() |
247 | 99 | 148 | ||
250 | 100 | self.__main_button = Gtk.Button.new_with_mnemonic( | 149 | self.__main_button = Gtk.Button.new_with_mnemonic('I_nstall') |
249 | 101 | 'I_nstall Ubuntu One') | ||
251 | 102 | self.__main_button.set_image(Gtk.Image.new_from_stock( | 150 | self.__main_button.set_image(Gtk.Image.new_from_stock( |
252 | 103 | Gtk.STOCK_OK, Gtk.IconSize.BUTTON)) | 151 | Gtk.STOCK_OK, Gtk.IconSize.BUTTON)) |
253 | 104 | self.__main_button.connect('clicked', lambda x: self.emit( | 152 | self.__main_button.connect('clicked', lambda x: self.emit( |
254 | @@ -107,6 +155,12 @@ | |||
255 | 107 | self.__main_button.grab_focus() | 155 | self.__main_button.grab_focus() |
256 | 108 | self.__main_button.show() | 156 | self.__main_button.show() |
257 | 109 | 157 | ||
258 | 158 | self.__lm_button = Gtk.LinkButton.new_with_label( | ||
259 | 159 | 'https://one.ubuntu.com/', 'Learn more') | ||
260 | 160 | self.__action_area.add(self.__lm_button) | ||
261 | 161 | self.__action_area.set_child_secondary(self.__lm_button, True) | ||
262 | 162 | self.__lm_button.show() | ||
263 | 163 | |||
264 | 110 | self.connect('destroy', self.destroyed) | 164 | self.connect('destroy', self.destroyed) |
265 | 111 | self.connect('response', self.__got_response) | 165 | self.connect('response', self.__got_response) |
266 | 112 | self.connect('delete-event', lambda x, y: self.emit( | 166 | self.connect('delete-event', lambda x, y: self.emit( |
267 | @@ -124,6 +178,11 @@ | |||
268 | 124 | if os.path.exists(path): | 178 | if os.path.exists(path): |
269 | 125 | return os.path.abspath(path) | 179 | return os.path.abspath(path) |
270 | 126 | 180 | ||
271 | 181 | path = os.path.join(os.getcwd(), os.path.pardir, os.path.pardir, | ||
272 | 182 | 'data', filename) | ||
273 | 183 | if os.path.exists(path): | ||
274 | 184 | return os.path.abspath(path) | ||
275 | 185 | |||
276 | 127 | for folder in GLib.get_system_data_dirs(): | 186 | for folder in GLib.get_system_data_dirs(): |
277 | 128 | path = os.path.join(folder, 'ubuntuone-installer', filename) | 187 | path = os.path.join(folder, 'ubuntuone-installer', filename) |
278 | 129 | if os.path.exists(path): | 188 | if os.path.exists(path): |
279 | @@ -141,20 +200,101 @@ | |||
280 | 141 | 200 | ||
281 | 142 | def __construct_info_page(self): | 201 | def __construct_info_page(self): |
282 | 143 | """Build the initial info page.""" | 202 | """Build the initial info page.""" |
285 | 144 | page = Gtk.VBox() | 203 | page = Gtk.HBox() |
286 | 145 | page.set_border_width(24) | 204 | page.set_border_width(12) |
287 | 205 | page.set_spacing(12) | ||
288 | 146 | page.show() | 206 | page.show() |
289 | 147 | 207 | ||
300 | 148 | label = Gtk.Label( | 208 | # Get the width of a larger character in pixels |
301 | 149 | u'<big><b>{}</b></big>\n\n {}\n {}\n {}'.format( | 209 | layout = page.create_pango_layout(u'W') |
302 | 150 | u'The personal cloud that brings your digital life together', | 210 | (width, height) = layout.get_size() |
303 | 151 | u'• Synchronize files across devices\n', | 211 | width = width / Pango.SCALE |
304 | 152 | u'• Access files from anywhere\n', | 212 | height = height / Pango.SCALE |
305 | 153 | (u'• Add Music Streaming for unlimited' | 213 | |
306 | 154 | u' music on the go'))) | 214 | table = Gtk.Table(3, 5, False) |
307 | 155 | label.set_use_markup(True) | 215 | table.set_row_spacings(12) |
308 | 156 | label.set_alignment(0.0, 0.0) | 216 | table.set_col_spacings(12) |
309 | 157 | page.add(label) | 217 | page.pack_start(table, True, True, 24) |
310 | 218 | table.show() | ||
311 | 219 | |||
312 | 220 | label = Gtk.Label(u'<big>{}</big>'.format(u'Sync')) | ||
313 | 221 | label.set_use_markup(True) | ||
314 | 222 | table.attach_defaults(label, 0, 1, 0, 1) | ||
315 | 223 | label.show() | ||
316 | 224 | |||
317 | 225 | image = Gtk.Image() | ||
318 | 226 | table.attach_defaults(image, 0, 1, 1, 2) | ||
319 | 227 | image.show() | ||
320 | 228 | path = self.__find_data_file('sync.png') | ||
321 | 229 | if path: | ||
322 | 230 | image.set_from_file(path) | ||
323 | 231 | |||
324 | 232 | # Get the width in chars to set max for description labels | ||
325 | 233 | width_chars = (image.get_pixbuf().get_width() / width) * 2.5 | ||
326 | 234 | |||
327 | 235 | label = Gtk.Label(u'<small>{}</small>'.format( | ||
328 | 236 | (u'Sync files across your devices.'))) | ||
329 | 237 | label.set_max_width_chars(width_chars) | ||
330 | 238 | label.set_width_chars(width_chars) | ||
331 | 239 | label.set_use_markup(True) | ||
332 | 240 | label.set_line_wrap(True) | ||
333 | 241 | label.set_alignment(0.5, 0.0) | ||
334 | 242 | label.set_justify(Gtk.Justification.CENTER) | ||
335 | 243 | table.attach_defaults(label, 0, 1, 2, 3) | ||
336 | 244 | label.show() | ||
337 | 245 | |||
338 | 246 | separator = VSeparator() | ||
339 | 247 | table.attach_defaults(separator, 1, 2, 0, 3) | ||
340 | 248 | separator.show() | ||
341 | 249 | |||
342 | 250 | label = Gtk.Label(u'<big>{}</big>'.format(u'Stream')) | ||
343 | 251 | label.set_use_markup(True) | ||
344 | 252 | table.attach_defaults(label, 2, 3, 0, 1) | ||
345 | 253 | label.show() | ||
346 | 254 | |||
347 | 255 | image = Gtk.Image() | ||
348 | 256 | table.attach_defaults(image, 2, 3, 1, 2) | ||
349 | 257 | image.show() | ||
350 | 258 | path = self.__find_data_file('stream.png') | ||
351 | 259 | if path: | ||
352 | 260 | image.set_from_file(path) | ||
353 | 261 | |||
354 | 262 | label = Gtk.Label(u'<small>{}</small>'.format( | ||
355 | 263 | (u'Stream your music on the move and offline.'))) | ||
356 | 264 | label.set_max_width_chars(width_chars) | ||
357 | 265 | label.set_width_chars(width_chars) | ||
358 | 266 | label.set_use_markup(True) | ||
359 | 267 | label.set_line_wrap(True) | ||
360 | 268 | label.set_alignment(0.5, 0.0) | ||
361 | 269 | label.set_justify(Gtk.Justification.CENTER) | ||
362 | 270 | table.attach_defaults(label, 2, 3, 2, 3) | ||
363 | 271 | label.show() | ||
364 | 272 | |||
365 | 273 | separator = VSeparator() | ||
366 | 274 | table.attach_defaults(separator, 3, 4, 0, 3) | ||
367 | 275 | separator.show() | ||
368 | 276 | |||
369 | 277 | label = Gtk.Label(u'<big>{}</big>'.format(u'Share')) | ||
370 | 278 | label.set_use_markup(True) | ||
371 | 279 | table.attach_defaults(label, 4, 5, 0, 1) | ||
372 | 280 | label.show() | ||
373 | 281 | |||
374 | 282 | image = Gtk.Image() | ||
375 | 283 | table.attach_defaults(image, 4, 5, 1, 2) | ||
376 | 284 | image.show() | ||
377 | 285 | path = self.__find_data_file('share.png') | ||
378 | 286 | if path: | ||
379 | 287 | image.set_from_file(path) | ||
380 | 288 | |||
381 | 289 | label = Gtk.Label(u'<small>{}</small>'.format( | ||
382 | 290 | (u'Share with colleagues, friends, and family.'))) | ||
383 | 291 | label.set_max_width_chars(width_chars) | ||
384 | 292 | label.set_width_chars(width_chars) | ||
385 | 293 | label.set_use_markup(True) | ||
386 | 294 | label.set_line_wrap(True) | ||
387 | 295 | label.set_alignment(0.5, 0.0) | ||
388 | 296 | label.set_justify(Gtk.Justification.CENTER) | ||
389 | 297 | table.attach_defaults(label, 4, 5, 2, 3) | ||
390 | 158 | label.show() | 298 | label.show() |
391 | 159 | 299 | ||
392 | 160 | return page | 300 | return page |