def __init__(self, client, opts): ClientExtrasBase.__init__(self, client, opts) self.setup_menu() self.setup_tray(opts.tray_icon) self.setup_clipboard_helper(ClipboardProtocolHelper) self._last_key_events = maxdeque(maxlen=5) self._dropped_num_lock_press = False
def __init__(self, client, opts, conn): ClientExtrasBase.__init__(self, client, opts, conn) try: from xpra.platform.gdk_clipboard import TranslatedClipboardProtocolHelper self.setup_clipboard_helper(TranslatedClipboardProtocolHelper) except ImportError, e: log.error("GDK Translated Clipboard failed to load: %s - using default fallback", e) self.setup_clipboard_helper(DefaultClipboardProtocolHelper)
def cleanup(self): log("ClientExtras.cleanup() tray=%s", self.tray) ClientExtrasBase.cleanup(self) if self.tray: log("ClientExtras.cleanup() calling tray.close=%s", self.tray.close) self.tray.close() self.tray = None self.setup_console_event_listener(False) log("ClientExtras.cleanup() ended")
def __init__(self, client, opts): ClientExtrasBase.__init__(self, client, opts) try: from xpra.platform.gdk_clipboard import TranslatedClipboardProtocolHelper self.setup_clipboard_helper(TranslatedClipboardProtocolHelper) except ImportError, e: log.error( "GDK Translated Clipboard failed to load: %s - using default fallback", e) self.setup_clipboard_helper(DefaultClipboardProtocolHelper)
def __init__(self, client, opts, conn): self.menu_bar = None self.macapp = None self.last_attention_request_id = -1 ClientExtrasBase.__init__(self, client, opts, conn) self.locate_icon_filename(opts.tray_icon) self.setup_macdock() try: from xpra.darwin.osx_clipboard import OSXClipboardProtocolHelper self.setup_clipboard_helper(OSXClipboardProtocolHelper) except ImportError, e: log.error("OSX clipboard failed to load: %s - using default fallback", e) self.setup_clipboard_helper(DefaultClipboardProtocolHelper)
def __init__(self, client, opts, conn): self.menu_bar = None self.macapp = None self.last_attention_request_id = -1 ClientExtrasBase.__init__(self, client, opts, conn) self.locate_icon_filename(opts.tray_icon) self.setup_macdock() try: from xpra.darwin.osx_clipboard import OSXClipboardProtocolHelper self.setup_clipboard_helper(OSXClipboardProtocolHelper) except ImportError, e: log.error( "OSX clipboard failed to load: %s - using default fallback", e) self.setup_clipboard_helper(DefaultClipboardProtocolHelper)
def mask_to_names(self, mask): names = ClientExtrasBase.mask_to_names(self, mask) log("mask_to_names(%s)=%s, emulate_altgr=%s", mask, names, self.emulate_altgr) if self.emulate_altgr: self.AltGr_modifiers(names) return names
def mask_to_names(self, mask): names = ClientExtrasBase.mask_to_names(self, mask) if self.emulate_altgr: self.AltGr_modifiers(names) if self.num_lock_modifier: try: import win32api #@UnresolvedImport import win32con #@UnresolvedImport numlock = win32api.GetKeyState(win32con.VK_NUMLOCK) log("mask_to_names(%s) GetKeyState(VK_NUMLOCK)=%s", mask, numlock) if numlock and self.num_lock_modifier not in names: names.append(self.num_lock_modifier) elif not numlock and self.num_lock_modifier in names: names.remove(self.num_lock_modifier) except: pass log("mask_to_names(%s)=%s", mask, names) return names
def __init__(self, client, opts, conn): self.menu_bar = None self.macapp = None ClientExtrasBase.__init__(self, client, opts, conn) self.locate_icon_filename(opts.tray_icon) self.setup_macdock()
def cleanup(self): log("cleanup() tray=%s", self.tray) ClientExtrasBase.cleanup(self) if self.tray: self.tray.close() self.tray = None
def __init__(self, client, opts, conn): ClientExtrasBase.__init__(self, client, opts, conn) self.locate_icon_filename(opts.tray_icon) self.setup_growl(opts.notifications) self.setup_macdock()
def grok_modifier_map(self, display_source, xkbmap_mod_meanings): modifiers = ClientExtrasBase.grok_modifier_map(self, display_source, xkbmap_mod_meanings) modifiers["meta"] = 1 << 3 return modifiers
def set_modifier_mappings(self, mappings): ClientExtrasBase.set_modifier_mappings(self, mappings) self.num_lock_modifier = self.modifier_keys.get("Num_Lock") log("set_modifier_mappings found 'Num_Lock' modifier value: %s", self.num_lock_modifier)
def cleanup(self): ClientExtrasBase.cleanup(self) self.remove_all_menus()
def __init__(self, client, opts): ClientExtrasBase.__init__(self, client, opts) self.locate_icon_filename(opts.tray_icon) self.setup_growl(opts.notifications) self.setup_macdock()
def exit(self): ClientExtrasBase.exit(self) if self.tray: self.tray.close()
def cleanup(self): ClientExtrasBase.cleanup(self) if self.tray: self.tray.close()
def __init__(self, client, opts): ClientExtrasBase.__init__(self, client, opts) self.locate_icon_filename(opts.tray_icon) self.setup_growl() self.setup_macdock() self.clipboard_helper = None