sound treeview is now filled

This commit is contained in:
Yann Leboulanger 2005-04-15 10:53:39 +00:00
parent a4b334cd03
commit a269e4c421
1 changed files with 10 additions and 9 deletions

View File

@ -557,16 +557,17 @@ class Preferences_window:
return return
def fill_sound_treeview(self): def fill_sound_treeview(self):
sounds = ['contact_disconnected', 'message_sent', 'contact_connected', \
'first_message_received', 'next_message_received']
events = {} events = {}
# config file MUST have sound_event AND sound_enevt_file
#events = {name : [use_it, file], name2 : [., .], ...} #events = {name : [use_it, file], name2 : [., .], ...}
#FIXME: for key in sounds:
# for key in self.plugin.config.keys(): if not (gajim.config.exist('sound_' + key) and gajim.config.exist(\
# if key.find('sound_') == 0: 'sound_' + key + '_file')):
# if not self.plugin.config.has_key(key + '_file'): continue
# continue events[key] = [gajim.config.get('sound_' + key), \
# ev = key.replace('sound_', '') gajim.config.get('sound_' + key + '_file')]
# events[ev] = [gajim.config.get(key), \
# gajim.config.get(key + '_file')]
model = self.sound_tree.get_model() model = self.sound_tree.get_model()
model.clear() model.clear()
for ev in events: for ev in events:
@ -654,7 +655,6 @@ class Preferences_window:
self.xml.get_widget('merge_checkbutton').set_active(st) self.xml.get_widget('merge_checkbutton').set_active(st)
#iconset #iconset
#FIXME: path
list_style = os.listdir('../data/iconsets/') list_style = os.listdir('../data/iconsets/')
model = gtk.ListStore(gobject.TYPE_STRING) model = gtk.ListStore(gobject.TYPE_STRING)
self.iconset_combobox.set_model(model) self.iconset_combobox.set_model(model)
@ -1355,6 +1355,7 @@ class Accounts_window:
if gajim.connections[account].connected: if gajim.connections[account].connected:
gajim.connections[account].change_status('offline', 'offline') gajim.connections[account].change_status('offline', 'offline')
del gajim.connections[account] del gajim.connections[account]
gajim.config.del_per('accounts', account)
del self.plugin.windows[account] del self.plugin.windows[account]
del self.plugin.queues[account] del self.plugin.queues[account]
del self.plugin.roster.groups[account] del self.plugin.roster.groups[account]