Changeset 349:41c486c8a0b4 for src/mlx/gui/info.py
- Timestamp:
- 12/10/12 19:28:32 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/info.py
r300 r349 33 33 (const.DELAYCODE_WEATHER, xstr("info_delay_weather")), 34 34 (const.DELAYCODE_PERSONAL, xstr("info_delay_personal")) ] 35 35 36 36 @staticmethod 37 37 def _createCommentArea(label): … … 50 50 alignment.set_padding(padding_top = 4, padding_bottom = 4, 51 51 padding_left = 8, padding_right = 8) 52 52 53 53 scroller = gtk.ScrolledWindow() 54 54 # FIXME: these should be constants … … 80 80 (frame, self._comments) = FlightInfo._createCommentArea(xstr("info_comments")) 81 81 commentsBox.pack_start(frame, True, True, 8) 82 self._comments.get_buffer().connect("changed", self._commentsChanged) 82 83 83 84 (frame, self._flightDefects) = \ … … 130 131 return text2unicode(buffer.get_text(buffer.get_start_iter(), 131 132 buffer.get_end_iter(), True)) 132 133 134 @property 135 def hasComments(self): 136 """Get whether there is any text in comments field.""" 137 return self._comments.get_buffer().get_char_count()>0 138 133 139 @property 134 140 def flightDefects(self): … … 147 153 codes.append(delayCodes[index][0]) 148 154 return codes 149 155 150 156 def enable(self): 151 157 """Enable the flight info tab.""" … … 153 159 self._flightDefects.set_sensitive(True) 154 160 self._delayTable.set_sensitive(True) 155 161 156 162 def disable(self): 157 163 """Enable the flight info tab.""" … … 167 173 for widget in self._delayCodeWidgets: 168 174 widget.set_active(False) 175 176 def _commentsChanged(self, textbuffer): 177 """Called when the comments have changed.""" 178 self._gui.updateRTO(inLoop = True)
Note:
See TracChangeset
for help on using the changeset viewer.