From 1011f7c70dcd9b3d78898e40e6bc91c6983ce97e Mon Sep 17 00:00:00 2001 From: Sebastian Droege Date: Sun, 13 Nov 2005 17:18:10 +0000 Subject: * Added webdav, webdavs browsing support git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@76 3be567f1-68ff-0310-b24a-ad7cc433fd2f --- actions/services/__init__.py.in | 21 ++++++++++++++++++++- src/service-discovery-applet.in | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/actions/services/__init__.py.in b/actions/services/__init__.py.in index c08dc81..c55adfe 100755 --- a/actions/services/__init__.py.in +++ b/actions/services/__init__.py.in @@ -85,6 +85,20 @@ def _https_tcp(name, hostname, address, port, txts): password = get_txt_value(txts,"p") url = build_url("https",address,port, path, username,password) gnome.url_show(url) + +def _webdav_tcp(name, hostname, address, port, txts): + path = get_txt_value(txts,"path") + username = get_txt_value(txts,"u") + password = get_txt_value(txts,"p") + url = build_url("dav",address,port, path, username,password) + gnome.url_show(url) + +def _webdavs_tcp(name, hostname, address, port, txts): + path = get_txt_value(txts,"path") + username = get_txt_value(txts,"u") + password = get_txt_value(txts,"p") + url = build_url("dav",address,port, path, username,password) + gnome.url_show(url) def _ftp_tcp(name, hostname, address, port, txts): path = get_txt_value(txts,"path") @@ -198,7 +212,12 @@ def handle(name, stype, hostname, address, port, txts): if stype == "_sftp-ssh._tcp": _sftpssh_tcp(name, hostname, address, port, txts) return - + if stype == "_webdav._tcp": + _webdav_tcp(name, hostname, address, port, txts) + return + if stype == "_webdavs._tcp": + _webdavs_tcp(name, hostname, address, port, txts) + return if __name__ == "__main__": print build_url() diff --git a/src/service-discovery-applet.in b/src/service-discovery-applet.in index ce7f083..0c848ea 100755 --- a/src/service-discovery-applet.in +++ b/src/service-discovery-applet.in @@ -66,6 +66,8 @@ first_run_services = { "_ssh._tcp" : True, "_sftp-ssh._tcp" : False, "_ftp._tcp" : True, + "_webdav._tcp" : False, + "_webdavs._tcp": False } -- cgit