diff options
| -rw-r--r-- | plugins/gnometerminal.py | 4 | ||||
| -rw-r--r-- | plugins/nautilus.py | 4 | ||||
| -rwxr-xr-x | src/service-discovery-applet.in | 8 | 
3 files changed, 12 insertions, 4 deletions
| diff --git a/plugins/gnometerminal.py b/plugins/gnometerminal.py index d97a320..01fd83f 100644 --- a/plugins/gnometerminal.py +++ b/plugins/gnometerminal.py @@ -95,7 +95,9 @@ class plugin_gnometerminal:          return store -    def connect(self, name, stype, hostname, address, port, txts): +    def connect(self, use_host_names, name, stype, hostname, address, port, txts): +        if use_host_names == True: +            address = hostname          print "connecting using gnometerminal"          if txts.has_key("u"):              username = self.SshLogin(name, txts["u"]) diff --git a/plugins/nautilus.py b/plugins/nautilus.py index e208a8c..4cf82a2 100644 --- a/plugins/nautilus.py +++ b/plugins/nautilus.py @@ -22,7 +22,9 @@ class plugin_nautilus:          self.author = "Sébastien Estienne"          self.description = "Accessing zeroconf services using Nautilus" -    def connect(self, name, stype, hostname, address, port, txts): +    def connect(self, use_host_names, name, stype, hostname, address, port, txts): +        if use_host_names == True: +            address = hostname          print "connecting using nautilus"          path = get_txt_value(txts,"path")          username = get_txt_value(txts,"u") diff --git a/src/service-discovery-applet.in b/src/service-discovery-applet.in index 0ff8691..295ce5d 100755 --- a/src/service-discovery-applet.in +++ b/src/service-discovery-applet.in @@ -254,6 +254,10 @@ class ServiceDiscoveryApplet(gnomeapplet.Applet):  	self.server = dbus.Interface(self.system_bus.get_object(avahi.DBUS_NAME, avahi.DBUS_PATH_SERVER),   				avahi.DBUS_INTERFACE_SERVER) +	try:  +		self.use_host_names = self.server.IsNSSSupportAvailable() +	except: +		self.use_host_names = False            self.sdaNotifications = Notifications(self) @@ -286,7 +290,7 @@ class ServiceDiscoveryApplet(gnomeapplet.Applet):          txts = avahi.txt_array_to_string_array(txt)          txts = sdapplet.pluginutils.pair_to_dict(txts) -	self.plugin.plugins[type][0].connect(name, type, host, address, port, txts) +	self.plugin.plugins[type][0].connect(self.use_host_names, name, type, host, address, port, txts)      def print_error(self, err):  	# FIXME we should use notifications @@ -317,7 +321,7 @@ class ServiceDiscoveryApplet(gnomeapplet.Applet):                          return          except dbus.dbus_bindings.DBusException:              pass -             +          # if we found a service, remove "No service found"          if self.zc_types == {}:              for menuitem in self.service_menu.get_children(): | 
