def enlightbox(mainWindow, dialog): from pyanaconda.ui.gui import ANACONDA_WINDOW_GROUP from gi.repository import AnacondaWidgets lightbox = AnacondaWidgets.lb_show_over(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. """ from gi.repository import AnacondaWidgets # if there are no actions (not populated yet), we can do nothing if len(self._actions) > 0 and self._currentAction: lightbox = AnacondaWidgets.lb_show_over(self._currentAction.window) ANACONDA_WINDOW_GROUP.add_window(lightbox) window.main_window.set_transient_for(lightbox)