7403: Unexpected error with coping data between DB Owner and Preferences

This commit is contained in:
Josip 2015-07-31 00:33:54 +02:00
parent 32f6024520
commit 36404caad8
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
<object class="GtkImageMenuItem" id="copy_from_db_to_preferences"> <object class="GtkImageMenuItem" id="copy_from_db_to_preferences">
<property name="label">Copy from DB to Preferences</property> <property name="label" translatable="yes">Copy from DB to Preferences</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
@ -19,7 +19,7 @@
</child> </child>
<child> <child>
<object class="GtkImageMenuItem" id="copy_from_preferences_to_db"> <object class="GtkImageMenuItem" id="copy_from_preferences_to_db">
<property name="label">Copy from Preferences to DB</property> <property name="label" translatable="yes">Copy from Preferences to DB</property>
<property name="use_action_appearance">False</property> <property name="use_action_appearance">False</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>

View File

@ -163,12 +163,12 @@ class OwnerEditor(tool.Tool, ManagedWindow):
def on_menu_activate(self, menuitem): def on_menu_activate(self, menuitem):
"""Copies the owner information from/to the preferences""" """Copies the owner information from/to the preferences"""
if menuitem.name == 'copy_from_preferences_to_db': if menuitem.props.name == 'copy_from_preferences_to_db':
self.owner.set_from(get_researcher()) self.owner.set_from(get_researcher())
for entry in self.entries: for entry in self.entries:
entry.update() entry.update()
elif menuitem.name == 'copy_from_db_to_preferences': elif menuitem.props.name == 'copy_from_db_to_preferences':
for i in range(len(config_keys)): for i in range(len(config_keys)):
config.set(config_keys[i], self.owner.get()[i]) config.set(config_keys[i], self.owner.get()[i])