prevent traceback when opening change status dialog. Fixes #5985
This commit is contained in:
parent
435b6832cf
commit
2315d8a14a
1 changed files with 7 additions and 8 deletions
|
@ -665,15 +665,14 @@ class ChangeStatusMessageDialog(TimeoutDialog):
|
||||||
label = self.xml.get_object('activity_button_label')
|
label = self.xml.get_object('activity_button_label')
|
||||||
if 'activity' in self.pep_dict and self.pep_dict['activity'] in \
|
if 'activity' in self.pep_dict and self.pep_dict['activity'] in \
|
||||||
pep.ACTIVITIES:
|
pep.ACTIVITIES:
|
||||||
if 'subactivity' in self.pep_dict and self.pep_dict['subactivity'] in \
|
if 'subactivity' in self.pep_dict and self.pep_dict['subactivity'] \
|
||||||
pep.ACTIVITIES[self.pep_dict['activity']]:
|
in pep.ACTIVITIES[self.pep_dict['activity']]:
|
||||||
img.set_from_pixbuf(gtkgui_helpers.load_activity_icon(
|
img.set_from_pixbuf(gtkgui_helpers.load_activity_icon(
|
||||||
self.pep_dict['activity'], self.pep_dict['subactivity']).\
|
self.pep_dict['activity'], self.pep_dict['subactivity']).\
|
||||||
get_pixbuf())
|
get_pixbuf())
|
||||||
else:
|
else:
|
||||||
img.set_from_pixbuf(gtkgui_helpers.load_activity_icon(
|
img.set_from_pixbuf(gtkgui_helpers.load_activity_icon(
|
||||||
self.pep_dict['activity']).get_pixbuf())
|
self.pep_dict['activity']).get_pixbuf())
|
||||||
# item.set_tooltip_text(pep.ACTIVITIES[category]['category'])
|
|
||||||
if self.pep_dict['activity_text']:
|
if self.pep_dict['activity_text']:
|
||||||
label.set_text(self.pep_dict['activity_text'])
|
label.set_text(self.pep_dict['activity_text'])
|
||||||
else:
|
else:
|
||||||
|
@ -688,9 +687,9 @@ class ChangeStatusMessageDialog(TimeoutDialog):
|
||||||
"""
|
"""
|
||||||
img = self.xml.get_object('mood_image')
|
img = self.xml.get_object('mood_image')
|
||||||
label = self.xml.get_object('mood_button_label')
|
label = self.xml.get_object('mood_button_label')
|
||||||
if self.pep_dict['mood'] in pep.MOODS:
|
if 'mood' in self.pep_dict and self.pep_dict['mood'] in pep.MOODS:
|
||||||
img.set_from_pixbuf(gtkgui_helpers.load_mood_icon(
|
img.set_from_pixbuf(gtkgui_helpers.load_mood_icon(
|
||||||
self.pep_dict['mood']).get_pixbuf())
|
self.pep_dict['mood']).get_pixbuf())
|
||||||
if self.pep_dict['mood_text']:
|
if self.pep_dict['mood_text']:
|
||||||
label.set_text(self.pep_dict['mood_text'])
|
label.set_text(self.pep_dict['mood_text'])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue