Merge lp:~ubuntukylin-members/ubiquity/showos into lp:ubiquity

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 5846
Proposed branch: lp:~ubuntukylin-members/ubiquity/showos
Merge into: lp:ubiquity
Diff against target: 202 lines (+104/-1)
7 files modified
debian/changelog (+4/-1)
debian/real-po/en_GB.po (+14/-0)
debian/real-po/templates.pot (+16/-0)
debian/real-po/zh_CN.po (+16/-0)
debian/real-po/zh_HK.po (+16/-0)
debian/ubiquity.templates (+5/-0)
ubiquity/plugins/ubi-partman.py (+33/-0)
To merge this branch: bzr merge lp:~ubuntukylin-members/ubiquity/showos
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Review via email: mp+144252@code.launchpad.net
To post a comment you must log in.
Revision history for this message
kobe (kobe24-lixiang) wrote :

Thank you, expect the result.

At 2013-01-22 17:43:32,"Dmitrijs Ledkovs" <email address hidden> wrote:
>Dmitrijs Ledkovs has proposed merging lp:~ubuntukylin-members/ubiquity/showos into lp:ubiquity.
>
>Requested reviews:
> Ubuntu Installer Team (ubuntu-installer)
>Related bugs:
> Bug #1100694 in ubiquity (Ubuntu): "display OS in existing partitions"
> https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1100694
>
>For more details, see:
>https://code.launchpad.net/~ubuntukylin-members/ubiquity/showos/+merge/144252
>--
>https://code.launchpad.net/~ubuntukylin-members/ubiquity/showos/+merge/144252
>You are subscribed to branch lp:~ubuntukylin-members/ubiquity/showos.

Revision history for this message
Anthony Wong (anthonywong) wrote :

Hi xnox or anyone else from ubiquity team -- just wonder if you have some bandwidth to help reviewing kobe's work? Thanks for your time.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Works like a charm. I did refactor this a little bit before landing to reduce lines of code. Look at the diff between this branch and trunk for the ubi-partman.py file.

Regards,

Dmitrijs.

review: Approve
Revision history for this message
kobe (kobe24-lixiang) wrote :

Hi Dmitrijs,
we have seen the diff for the ubi-partman.py file between this branch and trunk. Thanks for merging our diff file.

Regards,
Kobe Lee.

Revision history for this message
Jack Yu (jackyu) wrote :

Nice. Thanks, Dmitrijs.

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 2013-01-18 17:43:32 +0000
3+++ debian/changelog 2013-01-22 09:42:23 +0000
4@@ -13,7 +13,10 @@
5 [ Iain Lane ]
6 * Port the webcam support to GStreamer 1.0.
7
8- -- Colin Watson <cjwatson@ubuntu.com> Fri, 11 Jan 2013 17:17:27 +0000
9+ [ Kobe Lee ]
10+ * use a global variable to show all OS.
11+
12+ -- Kobe Lee (kylinkobe) <kobe24_lixiang@126.com> Tue, 22 Jan 2013 12:05:53 +0800
13
14 ubiquity (2.13.9) raring; urgency=low
15
16
17=== modified file 'debian/real-po/en_GB.po'
18--- debian/real-po/en_GB.po 2013-01-12 00:47:22 +0000
19+++ debian/real-po/en_GB.po 2013-01-22 09:42:23 +0000
20@@ -703,6 +703,20 @@
21
22 #. Type: text
23 #. Description
24+#. A column heading in the partitioner.
25+#: ../ubiquity.templates:99001
26+msgid "System"
27+msgstr "System"
28+
29+#. Type: text
30+#. Description
31+#. A column heading in the partitioner.
32+#: ../ubiquity.templates:99001
33+msgid "System"
34+msgstr "System"
35+
36+#. Type: text
37+#. Description
38 #. Indicates unpartitioned free space on a disk.
39 #: ../ubiquity.templates:100001
40 msgid "free space"
41
42=== modified file 'debian/real-po/templates.pot'
43--- debian/real-po/templates.pot 2012-10-19 14:27:05 +0000
44+++ debian/real-po/templates.pot 2013-01-22 09:42:23 +0000
45@@ -669,6 +669,22 @@
46
47 #. Type: text
48 #. Description
49+#. A column heading in the partitioner. Indicates how much of the space on
50+#. this partition is used by data.
51+#: ../ubiquity.templates:99001
52+msgid "System"
53+msgstr ""
54+
55+#. Type: text
56+#. Description
57+#. A column heading in the partitioner. Indicates how much of the space on
58+#. this partition is used by data.
59+#: ../ubiquity.templates:99001
60+msgid "System"
61+msgstr ""
62+
63+#. Type: text
64+#. Description
65 #. Indicates unpartitioned free space on a disk.
66 #: ../ubiquity.templates:100001
67 msgid "free space"
68
69=== modified file 'debian/real-po/zh_CN.po'
70--- debian/real-po/zh_CN.po 2013-01-12 00:47:22 +0000
71+++ debian/real-po/zh_CN.po 2013-01-22 09:42:23 +0000
72@@ -682,6 +682,22 @@
73
74 #. Type: text
75 #. Description
76+#. A column heading in the partitioner. Indicates how much of the space on
77+#. this partition is used by data.
78+#: ../ubiquity.templates:99001
79+msgid "System"
80+msgstr "已装系统"
81+
82+#. Type: text
83+#. Description
84+#. A column heading in the partitioner. Indicates how much of the space on
85+#. this partition is used by data.
86+#: ../ubiquity.templates:99001
87+msgid "System"
88+msgstr "已装系统"
89+
90+#. Type: text
91+#. Description
92 #. Indicates unpartitioned free space on a disk.
93 #: ../ubiquity.templates:100001
94 msgid "free space"
95
96=== modified file 'debian/real-po/zh_HK.po'
97--- debian/real-po/zh_HK.po 2013-01-12 00:47:22 +0000
98+++ debian/real-po/zh_HK.po 2013-01-22 09:42:23 +0000
99@@ -686,6 +686,22 @@
100
101 #. Type: text
102 #. Description
103+#. A column heading in the partitioner. Indicates how much of the space on
104+#. this partition is used by data.
105+#: ../ubiquity.templates:99001
106+msgid "System"
107+msgstr "已裝系統"
108+
109+#. Type: text
110+#. Description
111+#. A column heading in the partitioner. Indicates how much of the space on
112+#. this partition is used by data.
113+#: ../ubiquity.templates:99001
114+msgid "System"
115+msgstr "已裝系統"
116+
117+#. Type: text
118+#. Description
119 #. Indicates unpartitioned free space on a disk.
120 #: ../ubiquity.templates:100001
121 msgid "free space"
122
123=== modified file 'debian/ubiquity.templates'
124--- debian/ubiquity.templates 2012-10-19 14:27:05 +0000
125+++ debian/ubiquity.templates 2013-01-22 09:42:23 +0000
126@@ -468,6 +468,11 @@
127 # this partition is used by data.
128 _Description: Used
129
130+Template: ubiquity/text/partition_column_syst
131+Type: text
132+# A column heading in the partitioner.
133+_Description: System
134+
135 Template: ubiquity/text/partition_free_space
136 Type: text
137 # Indicates unpartitioned free space on a disk.
138
139=== modified file 'ubiquity/plugins/ubi-partman.py'
140--- ubiquity/plugins/ubi-partman.py 2013-01-09 15:39:38 +0000
141+++ ubiquity/plugins/ubi-partman.py 2013-01-22 09:42:23 +0000
142@@ -200,6 +200,9 @@
143 self.part_auto_hidden_label.connect(
144 'activate-link', self.part_auto_hidden_label_activate_link)
145
146+ # Define a list to save grub imformation
147+ self.grub_options = []
148+
149 def plugin_get_current_page(self):
150 if self.current_page == self.page_ask:
151 self.plugin_is_install = self.part_ask_option_is_install()
152@@ -566,6 +569,10 @@
153 def set_grub_options(self, default, grub_installable):
154 from gi.repository import Gtk, GObject
155 options = misc.grub_options()
156+
157+ # Now save grub information
158+ self.grub_options = options
159+
160 l = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING)
161 self.grub_device_entry.set_model(l)
162 selected = False
163@@ -837,6 +844,25 @@
164 size_mb = int(partition['resize_min_size']) / 1000000
165 cell.set_property('text', '%d MB' % size_mb)
166
167+ def partman_column_syst(self, unused_column, cell, model, iterator,
168+ user_data):
169+ if not model[iterator][1]:
170+ return
171+ partition = model[iterator][1]
172+ options = self.grub_options
173+ if 'id' not in partition:
174+ cell.set_property('text', '')
175+ elif (partition['parted']['fs'] != 'free'
176+ and partition['parted']['fs'] != 'linux-swap'):
177+ for opt in options:
178+ if partition['parted']['path'] in opt:
179+ cell.set_property('text', '%s' % opt[1])
180+ break
181+ elif partition['parted']['type'] == 'unusable':
182+ cell.set_property('text', '')
183+ else:
184+ cell.set_property('text', '')
185+
186 @plugin.only_this_page
187 def partman_popup(self, widget, event):
188 from gi.repository import Gtk
189@@ -1329,6 +1355,13 @@
190 column_used.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
191 self.partition_list_treeview.append_column(column_used)
192
193+ cell_syst = Gtk.CellRendererText()
194+ column_syst = Gtk.TreeViewColumn(
195+ self.controller.get_string('partition_column_syst'), cell_syst)
196+ column_syst.set_cell_data_func(cell_syst, self.partman_column_syst)
197+ column_syst.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
198+ self.partition_list_treeview.append_column(column_syst)
199+
200 self.partition_list_treeview.set_model(partition_tree_model)
201
202 selection = self.partition_list_treeview.get_selection()

Subscribers

People subscribed via source and target branches

to status/vote changes: