make a update_preferences_window func and add a FIXME there

This commit is contained in:
Nikos Kouremenos 2005-07-24 21:05:44 +00:00
parent 72729a1fd9
commit 472ebade74
2 changed files with 6 additions and 1 deletions

View File

@ -95,6 +95,8 @@ class AdvancedConfigurationWindow:
modelrow[1] = text modelrow[1] = text
def on_advanced_configuration_window_destroy(self, widget): def on_advanced_configuration_window_destroy(self, widget):
# update ui of preferences window to get possible changes we did
self.plugin.windows['preferences'].update_preferences_window()
del self.plugin.windows['advanced_config'] del self.plugin.windows['advanced_config']
def on_advanced_close_button_clicked(self, widget): def on_advanced_close_button_clicked(self, widget):

View File

@ -397,11 +397,14 @@ class PreferencesWindow:
self.on_msg_treemodel_row_deleted) self.on_msg_treemodel_row_deleted)
def on_preferences_window_show(self, widget): def on_preferences_window_show(self, widget):
self.update_preferences_window()
self.notebook.set_current_page(0) self.notebook.set_current_page(0)
def update_preferences_window(self):
st = gajim.config.get('print_ichat_every_foo_minutes') st = gajim.config.get('print_ichat_every_foo_minutes')
text = _('Every %s _minutes') % st text = _('Every %s _minutes') % st
self.xml.get_widget('time_sometimes_radiobutton').set_label(text) self.xml.get_widget('time_sometimes_radiobutton').set_label(text)
#FIXME: move code from __init__ here
def on_preferences_window_key_press_event(self, widget, event): def on_preferences_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape: if event.keyval == gtk.keysyms.Escape: