Changeset 49:1b5b3d34dd84
- Timestamp:
- 03/23/12 14:13:17 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r48 r49 179 179 def _loginClicked(self, button): 180 180 """Called when the login button was clicked.""" 181 self._wizard.gui.beginBusy("Logging in...") 181 182 self._wizard.gui.webHandler.login(self._pilotID.get_text(), 182 183 self._password.get_text(), … … 189 190 def _handleLoginResult(self, returned, result): 190 191 """Handle the login result.""" 192 self._wizard.gui.endBusy() 191 193 if returned: 192 194 if result.loggedIn: -
src/mlx/gui/gui.py
r48 r49 117 117 self._statusIcon = StatusIcon(iconDirectory, self) 118 118 119 self._busyCursor = gdk.Cursor(gdk.CursorType.WATCH if pygobject 120 else gdk.WATCH) 121 119 122 def run(self): 120 123 """Run the GUI.""" … … 238 241 239 242 gobject.idle_add(self._writeStdIO) 243 244 def beginBusy(self, message): 245 """Begin a period of background processing.""" 246 print dir(self._mainWindow) 247 self._mainWindow.get_window().set_cursor(self._busyCursor) 248 self._statusbar.updateBusyState(message) 249 250 def endBusy(self): 251 """End a period of background processing.""" 252 self._mainWindow.get_window().set_cursor(None) 253 self._statusbar.updateBusyState(None) 240 254 241 255 def _writeStdIO(self): -
src/mlx/gui/statusbar.py
r32 r49 68 68 statusBox.pack_start(self._ratingLabel, False, False, 8) 69 69 70 self._busyLabel = gtk.Label() 71 self._busyLabel.set_width_chars(30) 72 self._busyLabel.set_tooltip_text("The status of the background tasks.") 73 self._busyLabel.set_alignment(1.0, 0.5) 74 statusBox.pack_start(self._busyLabel, True, True, 8) 75 70 76 self._updateFlightStatus() 71 77 … … 75 81 self._connected = connected 76 82 self._connStateArea.queue_draw() 83 84 def updateBusyState(self, message): 85 """Update the busy state.""" 86 self._busyLabel.set_text("" if message is None else message) 77 87 78 88 def _drawConnState(self, connStateArea, eventOrContext):
Note:
See TracChangeset
for help on using the changeset viewer.