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:
parent
0e5e66cce0
commit
13a140da7d
|
@ -17,7 +17,7 @@ Architecture: all
|
||||||
Depends: ${python:Depends}, ${misc:Depends}, python-vte, python-gobject, python-gtk2 (>= 2.14.0), gconf2, libgtk2.0-bin
|
Depends: ${python:Depends}, ${misc:Depends}, python-vte, python-gobject, python-gtk2 (>= 2.14.0), gconf2, libgtk2.0-bin
|
||||||
XB-Python-Version: ${python:Versions}
|
XB-Python-Version: ${python:Versions}
|
||||||
Provides: x-terminal-emulator
|
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
|
Description: multiple GNOME terminals in one window
|
||||||
Terminator is a little project to produce an efficient way of
|
Terminator is a little project to produce an efficient way of
|
||||||
filling a large area of screen space with terminals.
|
filling a large area of screen space with terminals.
|
||||||
|
|
|
@ -19,10 +19,10 @@ from factory import Factory
|
||||||
from terminator import Terminator
|
from terminator import Terminator
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import deskbar.core.keybinder as bindkey
|
import keybinder
|
||||||
except ImportError:
|
except ImportError:
|
||||||
err('Unable to find python bindings for deskbar, "hide_window" is not' \
|
err('Warning: python-keybinder is not installed. This means the \
|
||||||
'available.')
|
hide_window shortcut will be unavailable')
|
||||||
|
|
||||||
# pylint: disable-msg=R0904
|
# pylint: disable-msg=R0904
|
||||||
class Window(Container, gtk.Window):
|
class Window(Container, gtk.Window):
|
||||||
|
@ -80,14 +80,14 @@ class Window(Container, gtk.Window):
|
||||||
# Attempt to grab a global hotkey for hiding the window.
|
# Attempt to grab a global hotkey for hiding the window.
|
||||||
# If we fail, we'll never hide the window, iconifying instead.
|
# If we fail, we'll never hide the window, iconifying instead.
|
||||||
try:
|
try:
|
||||||
self.hidebound = bindkey.tomboy_keybinder_bind(
|
self.hidebound = keybinder.bind(
|
||||||
self.config['keybindings']['hide_window'],
|
self.config['keybindings']['hide_window'],
|
||||||
self.on_hide_window)
|
self.on_hide_window)
|
||||||
except (KeyError, NameError):
|
except (KeyError, NameError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not self.hidebound:
|
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
|
self.hidefunc = self.iconify
|
||||||
else:
|
else:
|
||||||
self.hidefunc = self.hide
|
self.hidefunc = self.hide
|
||||||
|
|
Loading…
Reference in New Issue