fix adding a new preset status message. Fixes #7488
This commit is contained in:
parent
1660488da6
commit
c8c466a466
|
@ -1095,8 +1095,10 @@ class PreferencesWindow:
|
||||||
# store mood / activity
|
# store mood / activity
|
||||||
for subname in ('activity', 'subactivity', 'activity_text',
|
for subname in ('activity', 'subactivity', 'activity_text',
|
||||||
'mood', 'mood_text'):
|
'mood', 'mood_text'):
|
||||||
val = model[iter_][i]
|
val2 = model[iter_][i]
|
||||||
gajim.config.set_per('statusmsg', val, subname, val)
|
if not val2:
|
||||||
|
val2 = ''
|
||||||
|
gajim.config.set_per('statusmsg', val, subname, val2)
|
||||||
i += 1
|
i += 1
|
||||||
iter_ = model.iter_next(iter_)
|
iter_ = model.iter_next(iter_)
|
||||||
|
|
||||||
|
@ -1229,7 +1231,8 @@ class PreferencesWindow:
|
||||||
def on_new_msg_button_clicked(self, widget, data = None):
|
def on_new_msg_button_clicked(self, widget, data = None):
|
||||||
model = self.msg_tree.get_model()
|
model = self.msg_tree.get_model()
|
||||||
iter_ = model.append()
|
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_))
|
self.msg_tree.set_cursor(model.get_path(iter_))
|
||||||
|
|
||||||
def on_delete_msg_button_clicked(self, widget, data = None):
|
def on_delete_msg_button_clicked(self, widget, data = None):
|
||||||
|
|
Loading…
Reference in New Issue