def enlightbox(mainWindow, dialog): # importing globally would cause a circular dependency from pyanaconda.ui.gui import ANACONDA_WINDOW_GROUP lightbox = AnacondaWidgets.Lightbox(parent_window=mainWindow) ANACONDA_WINDOW_GROUP.add_window(lightbox) dialog.set_transient_for(lightbox) yield lightbox.destroy()
def lightbox_over_current_action(self, window): """ Creates lightbox over current action for the given window. Or DOES NOTHING IF THERE ARE NO ACTIONS. """ # if there are no actions (not populated yet), we can do nothing if len(self._actions) > 0 and self._currentAction: lightbox = AnacondaWidgets.Lightbox(parent_window=self._currentAction.window) ANACONDA_WINDOW_GROUP.add_window(lightbox) window.main_window.set_transient_for(lightbox)