Switch from using deskbar's key binding interface to python-keybinder which is essentially the same code, but as a standalone module, thus reducing the (albeit soft) dependencies

This commit is contained in:
Chris Jones 2010-04-02 17:06:39 +01:00
parent 0e5e66cce0
commit 13a140da7d
2 changed files with 6 additions and 6 deletions

2
debian/control vendored
View File

@ -17,7 +17,7 @@ Architecture: all
Depends: ${python:Depends}, ${misc:Depends}, python-vte, python-gobject, python-gtk2 (>= 2.14.0), gconf2, libgtk2.0-bin
XB-Python-Version: ${python:Versions}
Provides: x-terminal-emulator
Recommends: xdg-utils, python-xdg, python-gnome2, deskbar-applet
Recommends: xdg-utils, python-xdg, python-gnome2, python-keybinder
Description: multiple GNOME terminals in one window
Terminator is a little project to produce an efficient way of
filling a large area of screen space with terminals.

View File

@ -19,10 +19,10 @@ from factory import Factory
from terminator import Terminator
try:
import deskbar.core.keybinder as bindkey
import keybinder
except ImportError:
err('Unable to find python bindings for deskbar, "hide_window" is not' \
'available.')
err('Warning: python-keybinder is not installed. This means the \
hide_window shortcut will be unavailable')
# pylint: disable-msg=R0904
class Window(Container, gtk.Window):
@ -80,14 +80,14 @@ class Window(Container, gtk.Window):
# Attempt to grab a global hotkey for hiding the window.
# If we fail, we'll never hide the window, iconifying instead.
try:
self.hidebound = bindkey.tomboy_keybinder_bind(
self.hidebound = keybinder.bind(
self.config['keybindings']['hide_window'],
self.on_hide_window)
except (KeyError, NameError):
pass
if not self.hidebound:
dbg('Unable to bind hide_window key, another instance has it.')
err('Unable to bind hide_window key, another instance/window has it.')
self.hidefunc = self.iconify
else:
self.hidefunc = self.hide