Only use the gnome module if it is available, otherwise use the (inferior) built-in webbrowser module. This will probably break email URLs for non-gnome users, but there's not much we can do about that and it's better than not working at all. Fixes LP #184809 Also laying some groundwork for 0.8

This commit is contained in:
Chris Jones 2008-01-29 23:58:08 +00:00
parent 0ee12ee6d4
commit 65f1e5c047
4 changed files with 47 additions and 20 deletions

View File

@ -1,3 +1,9 @@
terminator 0.8:
* Make dependency on python-gnome optional. Non-gnome users can now reap
the glorious benefits of Terminator and will only lose the ability to
open email URLs (assuming their browser won't handle this for them).
Closes LP #184809
terminator 0.7: terminator 0.7:
* Fullscreen support, via a patch from Thomas Meire. Closes LP #178914 * Fullscreen support, via a patch from Thomas Meire. Closes LP #178914

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-01-03 09:22+0100\n" "POT-Creation-Date: 2008-01-29 23:57+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -16,55 +16,66 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: terminator:42 #: terminator:44
msgid "" msgid ""
"You need to install the python bindings for gobject, gnome, gtk, gconf and " "You need to install the python bindings for gobject, gtk, gconf and pango to "
"pango to run Terminator." "run Terminator."
msgstr "" msgstr ""
#: terminator:51 #: terminator:63
msgid "" msgid ""
"You need to install python bindings for libvte (\"python-vte\" in debian/" "You need to install python bindings for libvte (\"python-vte\" in debian/"
"ubuntu)" "ubuntu)"
msgstr "" msgstr ""
#: terminator:315 #: terminator:127
#, python-format
msgid "Warning: unable to find profile %s. Continue with default values..."
msgstr ""
#: terminator:213
msgid ""
"Unknown value requested. Unable to find in gconf profile or default "
"settings: "
msgstr ""
#: terminator:414
msgid "_Open Link" msgid "_Open Link"
msgstr "" msgstr ""
#: terminator:316 #: terminator:415
msgid "_Copy Link Address" msgid "_Copy Link Address"
msgstr "" msgstr ""
#: terminator:322 #: terminator:421
msgid "_Send Mail To..." msgid "_Send Mail To..."
msgstr "" msgstr ""
#: terminator:323 #: terminator:422
msgid "_Copy Email Address" msgid "_Copy Email Address"
msgstr "" msgstr ""
#: terminator:348 #: terminator:447
msgid "Show scrollbar" msgid "Show scrollbar"
msgstr "" msgstr ""
#: terminator:348 #: terminator:455
msgid "Split H_orizontally" msgid "Split H_orizontally"
msgstr "" msgstr ""
#: terminator:352 #: terminator:459
msgid "Split V_ertically" msgid "Split V_ertically"
msgstr "" msgstr ""
#: terminator:422 #: terminator:527
msgid "Close?" msgid "Close?"
msgstr "" msgstr ""
#: terminator:427 #: terminator:532
msgid "<big><b>Close all terminals?</b></big>" msgid "<big><b>Close all terminals?</b></big>"
msgstr "" msgstr ""
#: terminator:430 #: terminator:535
#, python-format #, python-format
msgid "" msgid ""
"This window has %s terminals open. Closing the window will also close all " "This window has %s terminals open. Closing the window will also close all "

View File

@ -44,7 +44,7 @@ class InstallData(install_data):
setup(name='Terminator', setup(name='Terminator',
version='0.7', version='0.8',
description='Terminator, the robot future of terminals', description='Terminator, the robot future of terminals',
author='Chris Jones', author='Chris Jones',
author_email='cmsj@tenshu.net', author_email='cmsj@tenshu.net',

View File

@ -36,15 +36,25 @@ gettext.install ('terminator')
# import unix-lib # import unix-lib
import pwd import pwd
# import gtk/gnome libs # import gtk libs
# check just in case anyone runs it on a non-gnome system. # check just in case anyone runs it on a non-gnome system.
try: try:
import gobject, gtk, gnome, gconf, pango import gobject, gtk, gconf, pango
except: except:
print >> sys.stderr, _("You need to install the python bindings for " \ print >> sys.stderr, _("You need to install the python bindings for " \
"gobject, gnome, gtk, gconf and pango to run Terminator.") "gobject, gtk, gconf and pango to run Terminator.")
sys.exit(1) sys.exit(1)
# import a library for viewing URLs
try:
# gnome.url_show() is really useful
import gnome
url_show = gnome.url_show
except:
# webbrowser.open() is not really useful, but will do as a fallback
import webbrowser
url_show = webbrowser.open
# import vte-bindings # import vte-bindings
try: try:
import vte import vte
@ -412,7 +422,7 @@ class TerminatorTerm:
namecopy = _("_Copy Email Address") namecopy = _("_Copy Email Address")
item = gtk.MenuItem (nameopen) item = gtk.MenuItem (nameopen)
item.connect ("activate", lambda menu_item: gnome.url_show (address)) item.connect ("activate", lambda menu_item: url_show (address))
menu.append (item) menu.append (item)
item = gtk.MenuItem (namecopy) item = gtk.MenuItem (namecopy)