changeset 0f64fdfb45ce in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=0f64fdfb45ce description: prevent traceback when opening change status dialog. Fixes #5985
diffstat:
src/dialogs.py | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-)
diffs (36 lines):
diff -r b10ba9f938bd -r 0f64fdfb45ce src/dialogs.py --- a/src/dialogs.py Sat Oct 16 23:24:46 2010 +0200 +++ b/src/dialogs.py Tue Oct 19 21:43:09 2010 +0200 @@ -664,15 +664,14 @@ label = self.xml.get_object('activity_button_label') if 'activity' in self.pep_dict and self.pep_dict['activity'] in \ pep.ACTIVITIES: - if 'subactivity' in self.pep_dict and self.pep_dict['subactivity'] in \ - pep.ACTIVITIES[self.pep_dict['activity']]: + if 'subactivity' in self.pep_dict and self.pep_dict['subactivity'] \ + in pep.ACTIVITIES[self.pep_dict['activity']]: img.set_from_pixbuf(gtkgui_helpers.load_activity_icon( - self.pep_dict['activity'], self.pep_dict['subactivity']).\ - get_pixbuf()) + self.pep_dict['activity'], self.pep_dict['subactivity']).\ + get_pixbuf()) else: img.set_from_pixbuf(gtkgui_helpers.load_activity_icon( - self.pep_dict['activity']).get_pixbuf()) -# item.set_tooltip_text(pep.ACTIVITIES[category]['category']) + self.pep_dict['activity']).get_pixbuf()) if self.pep_dict['activity_text']: label.set_text(self.pep_dict['activity_text']) else: @@ -687,9 +686,9 @@ """ img = self.xml.get_object('mood_image') 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( - self.pep_dict['mood']).get_pixbuf()) + self.pep_dict['mood']).get_pixbuf()) if self.pep_dict['mood_text']: label.set_text(self.pep_dict['mood_text']) else: