From b5842c910d6bdf14d12ca1817e061336ed0744a6 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 12 Sep 2023 10:09:20 +0200 Subject: [PATCH 1/2] Add cmdline option to force blivet-gui to keep above other apps Related: rhbz#2238282 --- blivet-gui | 4 +++- blivetgui/blivetgui.py | 4 +++- man/blivet-gui.1 | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/blivet-gui b/blivet-gui index 09cbd534..7ac513ae 100755 --- a/blivet-gui +++ b/blivet-gui @@ -73,6 +73,8 @@ def parse_options(): parser = argparse.ArgumentParser(description="blivet-gui") parser.add_argument("-v", "--version", action="store_true", dest="version", default=False, help=_("show version information")) + parser.add_argument("--keep-above", action="store_true", dest="keep_above", default=False, + help=_("keep blivet-gui window above other windows")) parser.add_argument("disks", metavar="disk", type=str, nargs="*", help="run blivet-gui only on specified disk(s) (optional)") @@ -106,7 +108,7 @@ def main(): sockfile = output.split()[0] client = BlivetGUIClient(server_socket=sockfile) - BlivetGUI(client, exclusive_disks=options.disks) + BlivetGUI(client, exclusive_disks=options.disks, keep_above=options.keep_above) if __name__ == '__main__': diff --git a/blivetgui/blivetgui.py b/blivetgui/blivetgui.py index 5e611868..9322398b 100644 --- a/blivetgui/blivetgui.py +++ b/blivetgui/blivetgui.py @@ -67,7 +67,7 @@ class BlivetGUI(object): installer_mode = False - def __init__(self, client, exclusive_disks=None): + def __init__(self, client, exclusive_disks=None, keep_above=False): self.client = client @@ -103,6 +103,8 @@ def __init__(self, client, exclusive_disks=None): # MainWindow self.main_window = self.builder.get_object("main_window") self.main_window.connect("delete-event", self.quit) + if keep_above: + self.main_window.set_keep_above(True) # Exception handling self.exc = BlivetGUIExceptionHandler(self.main_window, sys.excepthook) diff --git a/man/blivet-gui.1 b/man/blivet-gui.1 index 043a0f89..245afe1e 100644 --- a/man/blivet-gui.1 +++ b/man/blivet-gui.1 @@ -16,6 +16,9 @@ show this help information and exit .TP .BR \-v ", " \-\-version show version information and exit +.TP +.BR \-\-keep\-above +keep the blivet-gui window above other windows .SH EXAMPLES You can run blivet-gui from a command line and specify one or more disks. From bfaeac7b9b553756665bc97b41b26a3e7ad79bb5 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 12 Sep 2023 10:10:45 +0200 Subject: [PATCH 2/2] man: Update copyright year --- man/blivet-gui.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/blivet-gui.1 b/man/blivet-gui.1 index 245afe1e..d24886c0 100644 --- a/man/blivet-gui.1 +++ b/man/blivet-gui.1 @@ -31,4 +31,4 @@ blivet-gui /dev/sda /dev/sdb Vojtech Trefny .SH COPYRIGHT -2020, Red Hat, Licensed under GPLv2+ +2023, Red Hat, Licensed under GPLv2+