def populate(self, pkgs): self.freeze_child_notify() self.set_model(None) self.store.clear() self.set_model(self.store) if pkgs: i = 0 for po in sorted(pkgs, key=lambda po: po.name): i += 1 if i % 500: # Handle Gtk event, so gui dont freeze doGtkEvents() self.store.append([po, str(po)]) self.thaw_child_notify() # reset the selection column header selection state self.state = 'normal' self._last_selected = []
def _set_normal_cursor(self): """Set Normal cursor in main window.""" win = self.get_window() if win is not None: win.set_cursor(None) misc.doGtkEvents()
def _set_busy_cursor(self, insensitive=False): """Set busy cursor in main window.""" win = self.get_window() if win is not None: win.set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH)) misc.doGtkEvents()