-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1568 convert some examples to support python3, bundle them and provi…
…de test applications shortcuts to launch them git-svn-id: https://xpra.org/svn/Xpra/trunk@16307 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
18 changed files
with
257 additions
and
215 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
#call the "Python" wrapper: | ||
exe_name=$(basename $0) | ||
full_path=$(cd "$(dirname "$0")"; pwd -P) | ||
PYTHON="$full_path/PythonExecWrapper" | ||
|
||
exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.client.gtk_base.example.colors import main;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,8 @@ | ||
#!/bin/sh | ||
|
||
#call the "Python" wrapper: | ||
exe_name=$(basename $0) | ||
full_path=$(cd "$(dirname "$0")"; pwd -P) | ||
PYTHON="$full_path/PythonExecWrapper" | ||
|
||
exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.client.gtk_base.example.colors_plain import main;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,8 @@ | ||
#!/bin/sh | ||
|
||
#call the "Python" wrapper: | ||
exe_name=$(basename $0) | ||
full_path=$(cd "$(dirname "$0")"; pwd -P) | ||
PYTHON="$full_path/PythonExecWrapper" | ||
|
||
exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.client.gtk_base.example.colors_gradient import main;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,8 @@ | ||
#!/bin/sh | ||
|
||
#call the "Python" wrapper: | ||
exe_name=$(basename $0) | ||
full_path=$(cd "$(dirname "$0")"; pwd -P) | ||
PYTHON="$full_path/PythonExecWrapper" | ||
|
||
exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.client.gtk_base.example.transparent_colors import main;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,8 @@ | ||
#!/bin/sh | ||
|
||
#call the "Python" wrapper: | ||
exe_name=$(basename $0) | ||
full_path=$(cd "$(dirname "$0")"; pwd -P) | ||
PYTHON="$full_path/PythonExecWrapper" | ||
|
||
exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.client.gtk_base.example.transparent_window import main;sys.exit(main())" "$@" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
# Copyright (C) 2017 Antoine Martin <antoine@devloop.org.uk> | ||
# 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 xpra.gtk_common.gobject_compat import import_gtk | ||
gtk = import_gtk() | ||
from xpra.gtk_common.gtk_util import WIN_POS_CENTER | ||
from xpra.x11.gtk_x11.gdk_display_source import init_display_source | ||
init_display_source() | ||
|
||
|
||
class BellWindow(gtk.Window): | ||
def __init__(self): | ||
super(BellWindow, self).__init__() | ||
self.set_position(WIN_POS_CENTER) | ||
self.set_default_size(320, 120) | ||
self.set_title("Test System Bell") | ||
self.connect("destroy", gtk.main_quit) | ||
btn = gtk.Button("default bell") | ||
btn.connect('clicked', self.bell) | ||
self.add(btn) | ||
self.show_all() | ||
|
||
def bell(self, *args): | ||
from xpra.platform.gui import system_bell | ||
system_bell(self.get_window(), 0, 100, 2000, 1000, 0, 0, "test") | ||
|
||
def main(): | ||
BellWindow() | ||
gtk.main() | ||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.