fix adding a new preset status message. Fixes #7488

This commit is contained in:
Yann Leboulanger 2013-10-30 13:13:00 +01:00
parent 1660488da6
commit c8c466a466
1 changed files with 6 additions and 3 deletions

View File

@ -1095,8 +1095,10 @@ class PreferencesWindow:
# store mood / activity
for subname in ('activity', 'subactivity', 'activity_text',
'mood', 'mood_text'):
val = model[iter_][i]
gajim.config.set_per('statusmsg', val, subname, val)
val2 = model[iter_][i]
if not val2:
val2 = ''
gajim.config.set_per('statusmsg', val, subname, val2)
i += 1
iter_ = model.iter_next(iter_)
@ -1229,7 +1231,8 @@ class PreferencesWindow:
def on_new_msg_button_clicked(self, widget, data = None):
model = self.msg_tree.get_model()
iter_ = model.append()
model.set(iter_, 0, _('status message title'), 1, _('status message text'))
model.set(iter_, 0, _('status message title'), 1,
_('status message text'))
self.msg_tree.set_cursor(model.get_path(iter_))
def on_delete_msg_button_clicked(self, widget, data = None):