Hi Ma Jun, thanks a lot for your branch! It looks good, I would love to tweak it a little bit to avoid code duplication. Would something like:
"""
=== modified file 'ubiquity/plugins/ubi-partman.py'
--- ubiquity/plugins/ubi-partman.py 2014-10-29 12:33:49 +0000
+++ ubiquity/plugins/ubi-partman.py 2015-01-23 08:44:25 +0000
@@ -1135,15 +1135,24 @@ self.controller.dbfilter.edit_partition(devpart, **edits)
Hi Ma Jun, thanks a lot for your branch! It looks good, I would love to tweak it a little bit to avoid code duplication. Would something like: plugins/ ubi-partman. py' plugins/ ubi-partman. py 2014-10-29 12:33:49 +0000 plugins/ ubi-partman. py 2015-01-23 08:44:25 +0000
self. controller. dbfilter. edit_partition( devpart, **edits)
"""
=== modified file 'ubiquity/
--- ubiquity/
+++ ubiquity/
@@ -1135,15 +1135,24 @@
def plugin_ translate( self, lang): button_ new', 'partition_ button_ delete' ] button_ new', "empty"), button_ delete' , "empty"), button_ edit', "i18n"), .get_string( widget_ name, lang)
continue get_accessible( )
a11y. set_name( text) set_label( '') set_label( '') set_label( text)
- symbolic_widgets = ['partition_
- for widget_name in symbolic_widgets:
+ widgets = (
+ ('partition_
+ ('partition_
+ ('partition_
+ )
+ for widget_name, action in widgets:
widget = getattr(self, widget_name)
- text = widget.get_label()
+ text = self.controller
if len(text) == 0:
a11y = widget.
- widget.
+ if action == "empty":
+ widget.
+ elif action == "i18n":
+ widget.
+ else:
+ raise ValueError("unknown action '%s'" % action)
@plugin. only_this_ page use_combo_ changed( self, combobox):
def on_partition_
"""
work? i.e. could you check if that also fixes the bug?
Thanks!
Michael