aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-09 22:11:00 +0200
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-06-09 22:11:00 +0200
commit6ce2ada0bd5a7966573a0b89cef8fc08336b2423 (patch)
tree694467704691a67e917a7f1d7b027aeb25e61e1b
parent4150c7428df8e4b8d41b6623d9fc794433401b3d (diff)
merge in holizz uzbl_tabbed
-rw-r--r--AUTHORS2
-rwxr-xr-xexamples/data/uzbl/scripts/uzbl_tabbed.py41
2 files changed, 42 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 1253144..1873492 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -21,7 +21,7 @@ Contributors:
Uli Schlachter (psychon) - basic mime_policy_cb & Makefile patch
(uranther) - zoom level
(bobpaul) - session script patches
- Tom Adams (holizz) - few patches, cookies.py
+ Tom Adams (holizz) - few patches, cookies.py, gtkplugk/socket & uzbl_tabbed.py
neutralinsomniac - load_progress = 0 fix
Maximilian Gaß (mxey) - small patches
Abel Camarillo (00z) - make it compile on OpenBSD
diff --git a/examples/data/uzbl/scripts/uzbl_tabbed.py b/examples/data/uzbl/scripts/uzbl_tabbed.py
new file mode 100755
index 0000000..4c3a934
--- /dev/null
+++ b/examples/data/uzbl/scripts/uzbl_tabbed.py
@@ -0,0 +1,41 @@
+#!/usr/bin/python
+
+import string, pygtk, gtk, sys, subprocess
+pygtk.require('2.0')
+
+def new_tab(nothing):
+ socket = gtk.Socket()
+ socket.show()
+ notebook.append_page(socket, gtk.Label('title goes here'))
+ sid = socket.get_id()
+ subprocess.call(['sh', '-c', 'uzbl -s %s &'%sid])
+
+
+window = gtk.Window()
+window.show()
+
+vbox = gtk.VBox()
+vbox.show()
+window.add(vbox)
+
+button = gtk.Button(stock=gtk.STOCK_ADD)
+button.connect('clicked', new_tab)
+button.show()
+vbox.add(button)
+
+notebook = gtk.Notebook()
+vbox.add(notebook)
+notebook.show()
+
+window.connect("destroy", lambda w: gtk.main_quit())
+
+#def plugged_event(widget):
+# print "I (", widget, ") have just had a plug inserted!"
+
+#socket.connect("plug-added", plugged_event)
+#socket.connect("plug-removed", plugged_event)
+
+if len(sys.argv) == 2:
+ socket.add_id(long(sys.argv[1]))
+
+gtk.main() \ No newline at end of file