Changes in / [883:3e6f32db8d49:882:a692f493896e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/timetable.py
r879 r859 223 223 """Update the tooltip for the position of the given event.""" 224 224 try: 225 result = widget.get_path_at_pos( int(event.x), int(event.y)) 226 if result is None: 225 (path, col, x, y) = widget.get_path_at_pos( int(event.x), int(event.y)) 226 index = self._getIndexForPath(path) 227 228 flight = self._flightPairs[index].flight0 229 comment = flight.comment 230 date = flight.date 231 232 if comment or date!=const.defaultDate: 233 text = "" 234 if comment: 235 text = comment 236 if date!=const.defaultDate: 237 if text: 238 text += "; " 239 text += date.strftime("%Y-%m-%d") 240 241 self._tooltips.set_tip(widget, text) 242 self._tooltips.enable() 243 else: 227 244 self._tooltips.set_tip(widget, "") 228 245 self._tooltips.disable() 229 else:230 (path, col, x, y) = result231 index = self._getIndexForPath(path)232 233 flight = self._flightPairs[index].flight0234 comment = flight.comment235 date = flight.date236 237 if comment or date!=const.defaultDate:238 text = ""239 if comment:240 text = comment241 if date!=const.defaultDate:242 if text:243 text += "; "244 text += date.strftime("%Y-%m-%d")245 246 self._tooltips.set_tip(widget, text)247 self._tooltips.enable()248 else:249 self._tooltips.set_tip(widget, "")250 self._tooltips.disable()251 246 except Exception, e: 252 247 print e
Note:
See TracChangeset
for help on using the changeset viewer.