summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2006-08-25 23:49:09 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2006-08-25 23:49:09 +0000
commit73f63cb9f8ca693ef211d283e8b3f83721e687b1 (patch)
tree9ab0a78e5f2bad66359febc63212166a68594d4b
parent27c6fade238336c61a5a01d22fe767bf664ca010 (diff)
* remove test for avahi 0.6.9 from the code
* move these tests in configure.ac * update README git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@116 3be567f1-68ff-0310-b24a-ad7cc433fd2f
-rw-r--r--README16
-rw-r--r--configure.ac1
-rwxr-xr-xsrc/service-discovery-applet.in23
3 files changed, 13 insertions, 27 deletions
diff --git a/README b/README
index 0cc8bc6..7fa639d 100644
--- a/README
+++ b/README
@@ -1,15 +1,9 @@
-requirements:
- avahi >= 0.5
+* requirements:
+avahi >= 0.6.9
python2.4-gnome2
-python2.4-gnome2
-
+python2.4-glade2
-You should may have to log out, or restart gnome-panel before being able to use your new applet.
+You may have to log out, or restart gnome-panel before being able to use your new applet.
-You should test that the applet is functionning with the following command:
+You can check (debug) that the applet is working properly with the following command:
$ /usr/bin/service-discovery-applet -window
-before trying to put it in your panel
-
-To add icons for services in the applet, just drop a png named TYPE.png (eg: _ssh._tcp.png) in $(prefix)/share/service-discovery-applet/icons
-
-All of this will be configurable from the GUI in the upcoming releases.
diff --git a/configure.ac b/configure.ac
index 3de47f0..30308cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,7 @@ AM_PATH_PYTHON([2.4])
AM_CHECK_PYMOD(gtk,,,[AC_MSG_ERROR(Could not find Python module pygtk)])
AM_CHECK_PYMOD(dbus,,,[AC_MSG_ERROR(Could not find Python module dbus)])
AM_CHECK_PYMOD(avahi,,,[AC_MSG_ERROR(Could not find Python module avahi)])
+AM_CHECK_PYMOD(avahi.ServiceTypeDatabase,ServiceTypeDatabase,,[AC_MSG_ERROR(You need avahi >= 0.6.9)])
# disable because it needs a DISPLAY
# AM_CHECK_PYMOD(gnomeapplet,,,[AC_MSG_ERROR(Could not find Python module gnomeapplet)])
diff --git a/src/service-discovery-applet.in b/src/service-discovery-applet.in
index 8f2b8b4..4cc43cc 100755
--- a/src/service-discovery-applet.in
+++ b/src/service-discovery-applet.in
@@ -89,17 +89,13 @@ class SDAGconf:
self.gc_client.notify_add (self.gc_services, self.gc_services_cb)
self.gc_client.notify_add (self.gc_options, self.gc_options_cb)
- try:
- for (stype, desc) in avahi.ServiceTypeDatabase.ServiceTypeDatabase().items():
- if not self.gc_client.get("%s/%s" % (self.gc_services, stype)):
- if self.plugin.plugins.has_key(stype):
- enabled = True
- else:
- enabled = False
- self.gc_client.set_bool("%s/%s" % (self.gc_services, stype), enabled)
- except:
- error_msg(_("You need at least avahi 0.6.9"))
- sys.exit()
+ for (stype, desc) in avahi.ServiceTypeDatabase.ServiceTypeDatabase().items():
+ if not self.gc_client.get("%s/%s" % (self.gc_services, stype)):
+ if self.plugin.plugins.has_key(stype):
+ enabled = True
+ else:
+ enabled = False
+ self.gc_client.set_bool("%s/%s" % (self.gc_services, stype), enabled)
def get_services(self):
services = []
@@ -412,11 +408,6 @@ class ServiceDiscoveryApplet(gnomeapplet.Applet):
self.sdaNotifications.display_notification(_("Already Discovering"),"")
return
try:
- try:
- self.avahi_version = self.server.GetAPIVersion() >> 8
- except:
- error_msg(_("You need at least avahi 0.6.9"))
- sys.exit()
self.domain = self.server.GetDomainName()
except:
self.sdaNotifications.display_notification(_("Error Detected!"),_("Check that the Avahi daemon is running!"))