Ignore:
Timestamp:
03/23/12 14:13:17 (12 years ago)
Author:
István Váradi <locvais@…>
Branch:
default
Phase:
public
Message:

Implemented busy state notification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/gui.py

    r48 r49  
    117117        self._statusIcon = StatusIcon(iconDirectory, self)
    118118
     119        self._busyCursor = gdk.Cursor(gdk.CursorType.WATCH if pygobject
     120                                      else gdk.WATCH)
     121
    119122    def run(self):
    120123        """Run the GUI."""
     
    238241
    239242        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)
    240254
    241255    def _writeStdIO(self):
Note: See TracChangeset for help on using the changeset viewer.