projects
/
meabook
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7598829
)
fixed bug with fields order
author
Max Usachev
<maxusachev@gmail.com>
Fri, 18 Jun 2010 06:26:36 +0000
(09:26 +0300)
committer
Max Usachev
<maxusachev@gmail.com>
Fri, 18 Jun 2010 06:26:36 +0000
(09:26 +0300)
ui/hildon_ui.py
patch
|
blob
|
history
diff --git
a/ui/hildon_ui.py
b/ui/hildon_ui.py
index
56b0628
..
16a5ef3
100644
(file)
--- a/
ui/hildon_ui.py
+++ b/
ui/hildon_ui.py
@@
-372,8
+372,7
@@
class ConfigurationDialog:
pannable_area.set_size_request_policy(hildon.SIZE_REQUEST_CHILDREN)
vbox = gtk.VBox()
pannable_area.set_size_request_policy(hildon.SIZE_REQUEST_CHILDREN)
vbox = gtk.VBox()
- fields = self.config.get_order()
- for index, field in enumerate(fields):
+ for index, field in enumerate(self.config.get_order()):
button = create_button(' '.join([_('Position'), str(index)]), \
_(field))
button.connect('clicked', show_fields_chooser, dialog)
button = create_button(' '.join([_('Position'), str(index)]), \
_(field))
button.connect('clicked', show_fields_chooser, dialog)
@@
-384,9
+383,10
@@
class ConfigurationDialog:
dialog.vbox.show_all()
response = dialog.run()
if response == gtk.RESPONSE_OK:
dialog.vbox.show_all()
response = dialog.run()
if response == gtk.RESPONSE_OK:
- fields_dict = dict([(_(field), field) for field in fields])
- new_ordered_fields = [fields_dict[button.get_value()] for button \
- in vbox.get_children()]
+ fields_dict = dict([(_(field).decode('utf-8'), field) for field \
+ in self.controller.get_fields()])
+ new_ordered_fields = [fields_dict[button.get_value().decode( \
+ 'utf-8')] for button in vbox.get_children()]
self.config.set_order(new_ordered_fields)
self._update_value(widget, new_ordered_fields)
dialog.destroy()
self.config.set_order(new_ordered_fields)
self._update_value(widget, new_ordered_fields)
dialog.destroy()