-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3964 oops: forgot to add the configure scripts
- Loading branch information
Showing
4 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2018-2023 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
import gi | ||
|
||
from xpra.gtk.dialogs.base_gui_window import BaseGUIWindow | ||
from xpra.gtk.widget import label | ||
from xpra.log import Logger | ||
|
||
gi.require_version('Gtk', '3.0') | ||
from gi.repository import Gtk | ||
|
||
log = Logger("util") | ||
|
||
|
||
class ConfigureGUI(BaseGUIWindow): | ||
|
||
def __init__(self, parent:Gtk.Window|None=None): | ||
super().__init__( | ||
"Configure Xpra's Features", | ||
"features.png", | ||
wm_class=("xpra-configure-features-gui", "Xpra Configure Features GUI"), | ||
default_size=(640, 300), | ||
header_bar=(True, False), | ||
parent=parent, | ||
) | ||
|
||
def populate(self): | ||
self.add_widget(label("Configure Xpra Features", font="sans 20")) | ||
self.add_widget(label("This dialog allows you to turn on or off whole subsystems", font="sans 14")) | ||
|
||
|
||
|
||
def main() -> int: | ||
from xpra.gtk.configure.main import run_gui | ||
return run_gui(ConfigureGUI) | ||
|
||
if __name__ == "__main__": | ||
import sys | ||
sys.exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2018-2023 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
import gi | ||
|
||
from xpra.gtk.dialogs.base_gui_window import BaseGUIWindow | ||
from xpra.gtk.widget import label | ||
from xpra.log import Logger | ||
|
||
gi.require_version('Gtk', '3.0') | ||
from gi.repository import Gtk | ||
|
||
log = Logger("gstreamer", "util") | ||
|
||
|
||
class ConfigureGUI(BaseGUIWindow): | ||
|
||
def __init__(self, parent:Gtk.Window|None=None): | ||
super().__init__( | ||
"Configure Xpra's GStreamer Codecs", | ||
"gstreamer.png", | ||
wm_class=("xpra-configure-gstreamer-gui", "Xpra Configure GStreamer GUI"), | ||
default_size=(640, 300), | ||
header_bar=(True, False), | ||
parent=parent, | ||
) | ||
|
||
def populate(self): | ||
self.add_widget(label("Configure Xpra GStreamer Codecs", font="sans 20")) | ||
|
||
|
||
def main() -> int: | ||
from xpra.gtk.configure.main import run_gui | ||
return run_gui(ConfigureGUI) | ||
|
||
if __name__ == "__main__": | ||
import sys | ||
sys.exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2018-2023 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
from importlib import import_module | ||
import gi | ||
|
||
from xpra.gtk.dialogs.base_gui_window import BaseGUIWindow | ||
from xpra.gtk.widget import label | ||
from xpra.log import Logger | ||
|
||
gi.require_version('Gtk', '3.0') | ||
from gi.repository import Gtk | ||
|
||
log = Logger("util") | ||
|
||
|
||
class ConfigureGUI(BaseGUIWindow): | ||
|
||
def __init__(self): | ||
super().__init__( | ||
"Configure Xpra", | ||
"toolbox.png", | ||
wm_class=("xpra-configure-gui", "Xpra Configure GUI"), | ||
default_size=(480, 300), | ||
header_bar=(True, False), | ||
) | ||
self.dialogs : dict[str,BaseGUIWindow] = {} | ||
|
||
def populate(self): | ||
self.vbox.add(label("Configure Xpra", font="sans 20")) | ||
self.vbox.add(label("Tune your xpra configuration:", font="sans 14")) | ||
self.sub("Features", "features.png","Enable or disable feature groups", "features") | ||
self.sub("Picture compression", "encoding.png","Encodings, speed and quality", "encodings") | ||
self.sub("GStreamer", "gstreamer.png","Configure the GStreamer codecs", "gstreamer") | ||
|
||
def sub(self, title="", icon_name="browse.png", tooltip="", configure:str="") -> None: | ||
def callback(btn): | ||
dialog = self.dialogs.get(configure) | ||
if dialog is None: | ||
mod = import_module(f"xpra.gtk.configure.{configure}") | ||
dialog = mod.ConfigureGUI(self) | ||
self.dialogs[configure] = dialog | ||
dialog.show() | ||
self.ib(title, icon_name, tooltip, callback=callback) | ||
|
||
|
||
def run_gui(gui_class=ConfigureGUI) -> int: | ||
# pylint: disable=import-outside-toplevel | ||
from xpra.platform import program_context | ||
from xpra.log import enable_color | ||
from xpra.platform.gui import init, ready | ||
from xpra.gtk.signals import register_os_signals | ||
with program_context("xpra-configure-gui", "Xpra Configure GUI"): | ||
enable_color() | ||
init() | ||
gui = gui_class() | ||
register_os_signals(gui.app_signal) | ||
ready() | ||
gui.show() | ||
Gtk.main() | ||
log("do_main() gui.exit_code=%i", gui.exit_code) | ||
return 0 | ||
|
||
def main() -> int: | ||
return run_gui(ConfigureGUI) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
sys.exit(main()) |