From 25168257629f66ea5acfd29008260b44a0a2c8b5 Mon Sep 17 00:00:00 2001 From: Sebastian Droege Date: Sat, 4 Mar 2006 14:34:14 +0000 Subject: * 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 --- src/service-discovery-applet.in | 21 +++++++++++---------- 1 file 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 ############################################################################### -- cgit