def each_key(model, path, subiter): keyentry = model.get_value(subiter, HOTKET_MODEL_INDEX_ACCEL) if keyentry and keyentry == accelerator: self.hotkey_alread_used = True msg = _("The shortcut \"%s\" is already in use.") % html_escape(accelerator) ShowableError(self.window, _('Error setting keybinding.'), msg, -1) raise Exception('This is ok, we just use it to break the foreach loop!')
def each_key(model, path, subiter): keyentry = model.get_value(subiter, 2) if keyentry and keyentry == hotkey: msg = _("The shortcut \"%s\" is already in use.") % keylabel ShowableError(self.window, _('Error setting keybinding.'), msg, -1) raise Exception( 'This is ok, we just use it to break the foreach loop!')
def exec_main(): if not test_gconf(): raise ShowableError(_('Guake can not init!'), _('Gconf Error.\n' 'Have you installed <b>guake.schemas</b> properly?')) if not main(): gtk.main()
def reload_globals(self, client, connection_id, entry, data): """Unbind all global hotkeys and rebind the show_hide method. If more global hotkeys should be added, just connect the gconf key to the watch system and add. """ self.guake.hotkeys.unbind_all() key = entry.get_value().get_string() if not self.guake.hotkeys.bind(key, self.guake.show_hide): raise ShowableError(_('key binding error'), _('Unable to bind global <b>%s</b> key') % xml_escape(key), -1)
def each_key(model, path, subiter): keyentry = model.get_value(subiter, 2) if keyentry and keyentry == hotkey: msg = _("The shortcut \"%s\" is already in use.") % keylabel raise ShowableError(_('Error setting keybinding.'), msg, -1)