-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3964 run configure sub-windows as dialogs
- Loading branch information
Showing
8 changed files
with
41 additions
and
81 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,4 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 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. |
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,4 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 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. |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2018-2021 Antoine Martin <[email protected]> | ||
# 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. | ||
|
||
|
@@ -21,7 +21,7 @@ | |
gi.require_version('Gtk', '3.0') # @UndefinedVariable | ||
from gi.repository import GLib, Gtk, Gdk, Gio # @UnresolvedImport | ||
|
||
log = Logger("client", "util") | ||
log = Logger("util") | ||
|
||
|
||
def exec_command(cmd): | ||
|
@@ -53,6 +53,7 @@ def __init__(self, | |
wm_class=("xpra-gui", "Xpra-GUI"), | ||
default_size=(640, 300), | ||
header_bar=(True, True), | ||
parent:Gtk.Window|None=None, | ||
): | ||
self.exit_code = 0 | ||
super().__init__() | ||
|
@@ -67,11 +68,16 @@ def __init__(self, | |
icon = get_icon_pixbuf(icon_name) | ||
if icon: | ||
self.set_icon(icon) | ||
add_close_accel(self, self.quit) | ||
if parent: | ||
self.set_transient_for(parent) | ||
self.set_modal(True) | ||
close = self.hide | ||
else: | ||
close = self.quit | ||
self.connect("delete_event", close) | ||
add_close_accel(self, close) | ||
add_window_accel(self, 'F1', self.show_about) | ||
self.connect("delete_event", self.quit) | ||
self.set_wmclass(*wm_class) | ||
|
||
self.vbox = Gtk.VBox(homogeneous=False, spacing=10) | ||
self.add(self.vbox) | ||
self.populate() | ||
|
@@ -129,6 +135,10 @@ def app_signal(self, signum : int | signal.Signals): | |
log("app_signal(%s) exit_code=%i", signum, self.exit_code) | ||
self.quit() | ||
|
||
def hide(self, *args): | ||
log("hide%s", args) | ||
super().hide() | ||
|
||
def quit(self, *args): | ||
log("quit%s", args) | ||
self.do_quit() | ||
|
@@ -156,11 +166,11 @@ def command_ended(self, proc): | |
self.reset_cursors() | ||
log(f"command_ended({proc})") | ||
if proc.returncode: | ||
|
||
self.may_notify(NotificationID.FAILURE, | ||
"Subcommand Failed", | ||
"The subprocess terminated abnormally\nand returned %s" % exit_str(proc.returncode) | ||
"The subprocess terminated abnormally\n\rand returned %s" % exit_str(proc.returncode) | ||
) | ||
pass | ||
|
||
def busy_cursor(self, widget): | ||
from xpra.gtk.cursors import cursor_types | ||
|
@@ -194,6 +204,8 @@ def may_exit(): | |
GLib.timeout_add(2000, may_exit) | ||
|
||
def may_notify(self, nid:NotificationID, summary:str, body:str): | ||
log.info(summary) | ||
log.info(body) | ||
from xpra.platform.gui import get_native_notifier_classes | ||
nc = get_native_notifier_classes() | ||
if not nc: | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2018-2021 Antoine Martin <[email protected]> | ||
# 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. | ||
|
||
|
@@ -13,7 +13,7 @@ | |
gi.require_version('Gtk', '3.0') | ||
from gi.repository import Gtk | ||
|
||
log = Logger("client", "util") | ||
log = Logger("util") | ||
|
||
|
||
def has_client() -> bool: | ||
|
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