Beispiel #1
0
def is_available():
    """
    Return True if keybindings are available.
    """
    if Keybinder is None:
        return False
    else:
        try:
            return Keybinder.supported()
        except AttributeError:
            return True
Beispiel #2
0
def is_available():
    """
    Return True if keybindings are available.
    """
    if Keybinder is None:
        return False
    else:
        try:
            return Keybinder.supported()
        except AttributeError:
            return True
Beispiel #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
Beispiel #4
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