예제 #1
0
파일: keybindings.py 프로젝트: engla/kupfer
def is_available():
    """
    Return True if keybindings are available.
    """
    if Keybinder is None:
        return False
    else:
        try:
            return Keybinder.supported()
        except AttributeError:
            return True
예제 #2
0
파일: keybindings.py 프로젝트: guns/kupfer
def is_available():
    """
    Return True if keybindings are available.
    """
    if Keybinder is None:
        return False
    else:
        try:
            return Keybinder.supported()
        except AttributeError:
            return True
예제 #3
0
 def enable(self, exaile):
     broken = False
     if hasattr(Keybinder, 'supported'):
         # introduced in Keybinder-3.0 0.3.2, see
         # https://github.com/kupferlauncher/keybinder/blob/master/NEWS
         if not Keybinder.supported():
             broken = True
     elif not guiutil.platform_is_x11():
         broken = True
     if broken:
         raise Exception(
             _('Keybinder is not supported on this platform! '
               'It is only supported on X servers.'))
     self.__exaile = exaile
예제 #4
0
파일: __init__.py 프로젝트: exaile/exaile
 def enable(self, exaile):
     broken = False
     if hasattr(Keybinder, 'supported'):
         # introduced in Keybinder-3.0 0.3.2, see
         # https://github.com/kupferlauncher/keybinder/blob/master/NEWS
         if not Keybinder.supported():
             broken = True
     elif not guiutil.platform_is_x11():
         broken = True
     if broken:
         raise Exception(
             _(
                 'Keybinder is not supported on this platform! '
                 'It is only supported on X servers.'
             )
         )
     self.__exaile = exaile