diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-03-05 11:04:40 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-03-05 11:04:40 +0100 |
commit | f37ae8b0f302a089baae50b18195b03c2f789ea4 (patch) | |
tree | d760b055988f14a5d579162e6f105fa983eeb688 /avahi-python | |
parent | c90c318dbbfa73a00951cdf96c51d13d7b23c44a (diff) | |
parent | c3c0f3d47e49ab6814d4de3ee41a0c5caf0265b9 (diff) |
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/avahi
Diffstat (limited to 'avahi-python')
-rw-r--r-- | avahi-python/Makefile.am | 2 | ||||
-rwxr-xr-x | avahi-python/avahi-bookmarks.in | 2 | ||||
-rw-r--r-- | avahi-python/avahi-discover/Makefile.am | 11 | ||||
-rw-r--r-- | avahi-python/avahi-discover/avahi-discover.desktop.in.in (renamed from avahi-python/avahi-discover/avahi-discover.desktop.in) | 4 | ||||
-rwxr-xr-x | avahi-python/avahi-discover/avahi-discover.in | 9 | ||||
-rw-r--r-- | avahi-python/avahi/Makefile.am | 2 |
6 files changed, 18 insertions, 12 deletions
diff --git a/avahi-python/Makefile.am b/avahi-python/Makefile.am index 09ad6de..4989b4b 100644 --- a/avahi-python/Makefile.am +++ b/avahi-python/Makefile.am @@ -29,7 +29,6 @@ SUBDIRS=avahi avahi-discover if HAVE_PYTHON if HAVE_PYTHON_DBUS -if HAVE_PYGTK pythonscripts = \ avahi-bookmarks @@ -43,4 +42,3 @@ CLEANFILES = $(pythonscripts) endif endif -endif diff --git a/avahi-python/avahi-bookmarks.in b/avahi-python/avahi-bookmarks.in index a1e8d0c..172abb3 100755 --- a/avahi-python/avahi-bookmarks.in +++ b/avahi-python/avahi-bookmarks.in @@ -24,7 +24,7 @@ import sys, getopt, os try: import avahi, gobject, dbus except ImportError: - print "Sorry, to use this tool you need to install Avahi, pygtk and python-dbus." + print "Sorry, to use this tool you need to install Avahi and python-dbus." sys.exit(1) try: diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am index c1d6cab..a44a071 100644 --- a/avahi-python/avahi-discover/Makefile.am +++ b/avahi-python/avahi-discover/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = \ __init__.py \ SimpleGladeApp.py \ avahi-discover.in \ - avahi-discover.desktop.in + avahi-discover.desktop.in.in if HAVE_PYTHON if HAVE_PYTHON_DBUS @@ -41,6 +41,7 @@ if HAVE_GDBM pythonscripts += \ avahi-discover desktop_DATA += avahi-discover.desktop +@INTLTOOL_DESKTOP_RULE@ avahi_discover_PYTHON += __init__.py SimpleGladeApp.py endif @@ -48,19 +49,23 @@ if HAVE_DBM pythonscripts += \ avahi-discover desktop_DATA += avahi-discover.desktop +@INTLTOOL_DESKTOP_RULE@ avahi_discover_PYTHON += __init__.py SimpleGladeApp.py endif -avahi-discover.desktop: avahi-discover.desktop.in +avahi-discover.desktop.in: avahi-discover.desktop.in.in sed -e 's,@bindir\@,$(bindir),g' $< > $@ avahi-discover: avahi-discover.in sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@GETTEXT_PACKAGE\@,"$(GETTEXT_PACKAGE)",g' \ + -e 's,@LOCALEDIR\@,"$(datadir)/locale",g' \ -e 's,@interfacesdir\@,$(interfacesdir),g' $< > $@ chmod +x $@ bin_SCRIPTS = $(pythonscripts) -CLEANFILES = $(pythonscripts) $(desktop_DATA) *.pyc *.pyo + +CLEANFILES = $(pythonscripts) $(desktop_DATA) *.pyc *.pyo avahi-discover.desktop.in endif endif diff --git a/avahi-python/avahi-discover/avahi-discover.desktop.in b/avahi-python/avahi-discover/avahi-discover.desktop.in.in index e896192..031024c 100644 --- a/avahi-python/avahi-discover/avahi-discover.desktop.in +++ b/avahi-python/avahi-discover/avahi-discover.desktop.in.in @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 Encoding=UTF-8 -Name=Avahi Zeroconf Browser -Comment=Browse for Zeroconf services available on your network +_Name=Avahi Zeroconf Browser +_Comment=Browse for Zeroconf services available on your network Exec=@bindir@/avahi-discover Terminal=false Type=Application diff --git a/avahi-python/avahi-discover/avahi-discover.in b/avahi-python/avahi-discover/avahi-discover.in index 229c7bd..0558424 100755 --- a/avahi-python/avahi-discover/avahi-discover.in +++ b/avahi-python/avahi-discover/avahi-discover.in @@ -22,8 +22,11 @@ import os, sys try: - import avahi, gtk, gobject, dbus, avahi.ServiceTypeDatabase + import avahi, gettext, gtk, gobject, dbus, avahi.ServiceTypeDatabase from avahi_discover.SimpleGladeApp import SimpleGladeApp + gtk.glade.bindtextdomain(@GETTEXT_PACKAGE@, @LOCALEDIR@) + gtk.glade.textdomain(@GETTEXT_PACKAGE@) + _ = gettext.gettext except ImportError, e: print "Sorry, to use this tool you need to install Avahi, pygtk and python-dbus.\n Error: %s" % e sys.exit(1) @@ -61,7 +64,9 @@ class Main_window(SimpleGladeApp): def on_tree_view_cursor_changed(self, widget, *args): (model, iter) = widget.get_selection().get_selected() - (name,interface,protocol,stype,domain) = self.treemodel.get(iter,1,2,3,4,5) + stype = None + if iter is not None: + (name,interface,protocol,stype,domain) = self.treemodel.get(iter,1,2,3,4,5) if stype == None: self.info_label.set_markup("<i>No service currently selected.</i>") return diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am index 4a73022..c0c9c34 100644 --- a/avahi-python/avahi/Makefile.am +++ b/avahi-python/avahi/Makefile.am @@ -52,13 +52,11 @@ endif avahi_PYTHON = $(avahi_SCRIPTS) -if HAVE_PYGTK if HAVE_PYTHON_DBUS avahi_PYTHON += __init__.py endif endif -endif CLEANFILES=*.pyc *.pyo ServiceTypeDatabase.py |