changeset 89ff917c301a in /home/hg/repos/gajim details:http://hg.gajim.org/gajim?cmd=changeset;node=89ff917c301a 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 30010db4d1cd -r 89ff917c301a src/dialogs.py --- a/src/dialogs.py Tue Oct 19 18:14:30 2010 +0200 +++ b/src/dialogs.py Tue Oct 19 21:43:09 2010 +0200 @@ -665,15 +665,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: @@ -688,9 +687,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: _______________________________________________ Commits mailing list Commits@gajim.org http://lists.gajim.org/cgi-bin/listinfo/commits