Changeset 10009
- Timestamp:
- 07/23/08 18:27:06 (5 weeks ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
chat_control.py (modified) (6 diffs)
-
dialogs.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/chat_control.py
r9997 r10009 55 55 except: 56 56 HAS_GTK_SPELL = False 57 58 HAVE_MARKUP_TOOLTIPS = gtk.pygtk_version >= (2, 12, 0) 57 59 58 60 # the next script, executed in the "po" directory, … … 1090 1092 self._tune_image = self.xml.get_widget('tune_image') 1091 1093 1094 if not HAVE_MARKUP_TOOLTIPS: 1095 self._mood_tooltip = gtk.Tooltips() 1096 self._activity_tooltip = gtk.Tooltips() 1097 self._tune_tooltip = gtk.Tooltips() 1098 1092 1099 self.update_mood() 1093 1100 self.update_tune() … … 1198 1205 def update_mood(self): 1199 1206 if self.contact.mood.has_key('mood'): 1200 mood = gobject.markup_escape_text( 1201 self.contact.mood['mood']) 1207 mood = self.contact.mood['mood'] 1208 if HAVE_MARKUP_TOOLTIPS: 1209 mood = gobject.markup_escape_text(mood) 1202 1210 else: 1203 1211 mood = None 1204 1212 1205 1213 if self.contact.mood.has_key('text'): 1206 text = gobject.markup_escape_text( 1207 self.contact.mood['text']) 1214 text = self.contact.mood['text'] 1215 if HAVE_MARKUP_TOOLTIPS: 1216 text = gobject.markup_escape_text(text) 1208 1217 else: 1209 1218 text = '' … … 1221 1230 'unknown').get_pixbuf()) 1222 1231 1223 self._mood_image.set_tooltip_markup('<b>%s</b>%s%s' % 1224 (mood, '\n' if text is not '' else '', text)) 1232 if HAVE_MARKUP_TOOLTIPS: 1233 self._mood_image.set_tooltip_markup( 1234 '<b>%s</b>%s%s' % (mood, 1235 '\n' if text is not '' else '', text)) 1236 else: 1237 self._mood_tooltip.set_tip( 1238 self._mood_image, '%s%s%s' % (mood, 1239 '\n' if text is not '' else '', text)) 1225 1240 self._mood_image.show() 1226 1241 else: … … 1233 1248 1234 1249 if self.contact.tune.has_key('artist'): 1235 artist = gobject.markup_escape_text( 1236 self.contact.tune['artist'].strip()) 1250 artist = self.contact.tune['artist'].strip() 1251 if HAVE_MARKUP_TOOLTIPS: 1252 artist = gobject.markup_escape_text(artist) 1237 1253 if self.contact.tune.has_key('title'): 1238 title = gobject.markup_escape_text( 1239 self.contact.tune['title'].strip()) 1254 title = self.contact.tune['title'].strip() 1255 if HAVE_MARKUP_TOOLTIPS: 1256 title = gobject.markup_escape_text(title) 1240 1257 if self.contact.tune.has_key('source'): 1241 title = gobject.markup_escape_text( 1242 self.contact.tune['source'].strip()) 1258 source = self.contact.tune['source'].strip() 1259 if HAVE_MARKUP_TOOLTIPS: 1260 source = gobject.markup_escape_text(source) 1243 1261 1244 1262 if artist or title: … … 1247 1265 source = source if source else _('Unknown Source') 1248 1266 1249 self._tune_image.set_tooltip_markup(_( 1250 '<b>"%(title)s"</b> by <i>%(artist)s</i>\n' + 1251 'from <i>%(source)s</i>') % {'title': title, 1252 'artist': artist, 'source': source}) 1267 if HAVE_MARKUP_TOOLTIPS: 1268 self._tune_image.set_tooltip_markup( 1269 _('<b>"%(title)s"</b> by ' + 1270 '<i>%(artist)s</i>\n' + 1271 'from <i>%(source)s</i>') % 1272 {'title': title, 'artist': artist, 1273 'source': source}) 1274 else: 1275 self._tune_tooltip.set_tip(self._tune_image, 1276 _('%(title)s by %(artist)s\n' + 1277 'from %(source)s') % {'title': title, 1278 'artist': artist, 'source': source}) 1253 1279 self._tune_image.show() 1254 1280 else: -
trunk/src/dialogs.py
r10006 r10009 473 473 gtkgui_helpers.load_mood_icon(mood)) 474 474 self.mood_buttons[mood].set_relief(gtk.RELIEF_NONE) 475 self.mood_buttons[mood].set_tooltip_text(475 gtk.Tooltips().set_tip(self.mood_buttons[mood], 476 476 _(mood.replace('_', ' '))) 477 477 self.mood_buttons[mood].connect('clicked',
