summaryrefslogtreecommitdiffstats
path: root/extra/arandr/arandr-0.1.3/screenlayout/demo.py
diff options
context:
space:
mode:
authorPRomain GAILLETON <root@nutyx.(none)>2010-05-30 06:18:44 +0200
committerPRomain GAILLETON <root@nutyx.(none)>2010-05-30 06:18:44 +0200
commit4e87e0e05326b4a1de72da67fad56f39e6eab992 (patch)
tree0b3665939d90cf8552c49f8918561a6101e1a3e5 /extra/arandr/arandr-0.1.3/screenlayout/demo.py
parent1b5ca2f66e056b9fc67e864a526175d8b091e7a7 (diff)
downloadnutyx-extra-4e87e0e05326b4a1de72da67fad56f39e6eab992.tar.gz
nutyx-extra-4e87e0e05326b4a1de72da67fad56f39e6eab992.tar.bz2
nutyx-extra-4e87e0e05326b4a1de72da67fad56f39e6eab992.tar.xz
nutyx-extra-4e87e0e05326b4a1de72da67fad56f39e6eab992.zip
Ajout de arandr#0.1.3
Diffstat (limited to 'extra/arandr/arandr-0.1.3/screenlayout/demo.py')
-rw-r--r--extra/arandr/arandr-0.1.3/screenlayout/demo.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/extra/arandr/arandr-0.1.3/screenlayout/demo.py b/extra/arandr/arandr-0.1.3/screenlayout/demo.py
new file mode 100644
index 000000000..a99790133
--- /dev/null
+++ b/extra/arandr/arandr-0.1.3/screenlayout/demo.py
@@ -0,0 +1,28 @@
+"""Demo application, primarily used to make sure the screenlayout library can be used independent of ARandR.
+
+Run by calling the main() function."""
+
+import gtk
+from . import widget
+
+def main():
+ w = gtk.Window()
+ w.connect('destroy',gtk.main_quit)
+
+ r = widget.ARandRWidget()
+ r.load_from_x()
+
+ b = gtk.Button("Reload")
+ b.connect('clicked', lambda *args: r.load_from_x())
+
+ b2 = gtk.Button("Apply")
+ b2.connect('clicked', lambda *args: r.save_to_x())
+
+ v = gtk.VBox()
+ w.add(v)
+ v.add(r)
+ v.add(b)
+ v.add(b2)
+ w.set_title('Simple ARandR Widget Demo')
+ w.show_all()
+ gtk.main()