summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Droege <slomo@ubuntu.com>2006-03-04 14:34:14 +0000
committerSebastian Droege <slomo@ubuntu.com>2006-03-04 14:34:14 +0000
commit25168257629f66ea5acfd29008260b44a0a2c8b5 (patch)
tree417d9d64996324951d43f2935b23f4d2b3af43f0
parent22c505517a025ccbc8e834b24aac5a6a4547f6ed (diff)
* fill in all services from the service type database on first startup, enable only some of them.
This requires avahi >= 0.6.9! git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@93 3be567f1-68ff-0310-b24a-ad7cc433fd2f
-rwxr-xr-xsrc/service-discovery-applet.in21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/service-discovery-applet.in b/src/service-discovery-applet.in
index c948c34..ee0c013 100755
--- a/src/service-discovery-applet.in
+++ b/src/service-discovery-applet.in
@@ -60,16 +60,17 @@ except ImportError, e:
# SERVICES THAT WILL BE ADDED TO GCONF ON THE FIRST RUN
#
# default browsing value
-first_run_services = {
- "_http._tcp" : True,
- "_https._tcp" : False,
- "_ssh._tcp" : True,
- "_sftp-ssh._tcp" : False,
- "_ftp._tcp" : True,
- "_webdav._tcp" : False,
- "_webdavs._tcp": False
- }
-
+first_run_services = {}
+for (stype, description) in avahi.ServiceTypeDatabase.ServiceTypeDatabase().items():
+ first_run_services[stype] = False
+
+first_run_services["_http._tcp"] = True
+first_run_services["_https._tcp"] = True
+first_run_services["_ssh._tcp"] = True
+first_run_services["_sftp-ssh._tcp"] = True
+first_run_services["_ftp._tcp"] = True
+first_run_services["_webdav._tcp"] = True
+first_run_services["_webdavs._tcp"] = True
###############################################################################