mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Replace use of pywin32
This commit is contained in:
parent
2283b6114e
commit
cc665e1ce5
@ -17,7 +17,7 @@ from PyQt5.Qt import (
|
||||
QPixmap, QRect, QPlainTextEdit, QMimeData)
|
||||
|
||||
from calibre import prepare_string_for_xml, human_readable
|
||||
from calibre.constants import iswindows
|
||||
from calibre.constants import iswindows, plugins
|
||||
from calibre.ebooks.oeb.polish.cover import get_raster_cover_name
|
||||
from calibre.ebooks.oeb.polish.utils import lead_text, guess_type
|
||||
from calibre.gui2 import error_dialog, choose_files, choose_save_file, info_dialog, choose_images
|
||||
@ -1230,8 +1230,8 @@ class PlainTextEdit(QPlainTextEdit): # {{{
|
||||
return True
|
||||
|
||||
def windows_ignore_altgr_shortcut(self, ev):
|
||||
import win32api, win32con
|
||||
s = win32api.GetAsyncKeyState(win32con.VK_RMENU) & 0xffff # VK_RMENU == R_ALT
|
||||
winutil = plugins['winutil'][0]
|
||||
s = winutil.get_async_key_state(winutil.VK_RMENU) # VK_RMENU == R_ALT
|
||||
return s & 0x8000
|
||||
|
||||
def event(self, ev):
|
||||
|
Loading…
x
Reference in New Issue
Block a user