mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'typos' of https://github.com/luzpaz/calibre
This commit is contained in:
commit
5b244138fe
@ -2856,7 +2856,7 @@ typedef struct
|
||||
uLong crc32_wait; // crc32 we must obtain after decompress all
|
||||
uLong rest_read_compressed; // number of byte to be decompressed
|
||||
uLong rest_read_uncompressed;//number of byte to be obtained after decomp
|
||||
LUFILE* file; // io structore of the zipfile
|
||||
LUFILE* file; // io structure of the zipfile
|
||||
uLong compression_method; // compression method (0==store)
|
||||
uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx)
|
||||
} file_in_zip_read_info_s;
|
||||
@ -2865,7 +2865,7 @@ typedef struct
|
||||
// unz_s contain internal information about the zipfile
|
||||
typedef struct
|
||||
{
|
||||
LUFILE* file; // io structore of the zipfile
|
||||
LUFILE* file; // io structure of the zipfile
|
||||
unz_global_info gi; // public global information
|
||||
uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx)
|
||||
uLong num_file; // number of the current file in the zipfile
|
||||
@ -3138,7 +3138,7 @@ int unzGetGlobalInfo (unzFile file,unz_global_info *pglobal_info)
|
||||
}
|
||||
|
||||
|
||||
// Translate date/time from Dos format to tm_unz (readable more easilty)
|
||||
// Translate date/time from Dos format to tm_unz (more easily readable)
|
||||
void unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz* ptm)
|
||||
{
|
||||
uLong uDate;
|
||||
|
@ -39,7 +39,7 @@ select = [
|
||||
'RUF047', # needless else
|
||||
'E302', 'E303', 'E304', 'E305', 'W391', # blank-line standard
|
||||
'E111', 'E112', 'E113', 'E117', # code indentation
|
||||
'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formating
|
||||
'E114', 'E115', 'E116', 'E261', 'E262', 'E265', # comment formatting
|
||||
'E201', 'E202', 'E211', 'E251', 'E275', # various whitespace
|
||||
]
|
||||
unfixable = ['PIE794', 'ISC001']
|
||||
|
@ -668,7 +668,7 @@
|
||||
|
||||
/*
|
||||
* SanDisk
|
||||
* several devices (c150 for sure) are definately dual-mode and must
|
||||
* several devices (c150 for sure) are definitely dual-mode and must
|
||||
* have the USB mass storage driver that hooks them unloaded first.
|
||||
* They all have problematic dual-mode making the device unload effect
|
||||
* uncertain on these devices.
|
||||
@ -2537,7 +2537,7 @@
|
||||
/*
|
||||
* Motorola Xoom (Wingray) variants
|
||||
*
|
||||
* These devices seem to use these product IDs simulatenously
|
||||
* These devices seem to use these product IDs simultaneously
|
||||
* https://code.google.com/p/android-source-browsing/source/browse/init.stingray.usb.rc?repo=device--moto--wingray
|
||||
*
|
||||
* 0x70a3 - Factory test - reported as early MTP ID
|
||||
@ -2796,7 +2796,7 @@
|
||||
// Reported by jaile <jaile@users.sourceforge.net>
|
||||
{ "Asus", 0x0b05, "TF300 Transformer (MTP+ADB)", 0x4c81,
|
||||
DEVICE_FLAGS_ANDROID_BUGS },
|
||||
// Repored by Florian Apolloner <f-apolloner@users.sourceforge.net>
|
||||
// Reported by Florian Apolloner <f-apolloner@users.sourceforge.net>
|
||||
{ "Asus", 0x0b05, "TF700 Transformer (MTP)", 0x4c90,
|
||||
DEVICE_FLAGS_ANDROID_BUGS },
|
||||
{ "Asus", 0x0b05, "TF700 Transformer (MTP+ADB)", 0x4c91,
|
||||
@ -3359,7 +3359,7 @@
|
||||
#if 1
|
||||
/* after some review I commented it back in. There was apparently
|
||||
* only one or two devices misbehaving (having this ID in mass storage mode),
|
||||
* but more seem to use it regulary as MTP devices. Marcus 20150401 */
|
||||
* but more seem to use it regularly as MTP devices. Marcus 20150401 */
|
||||
/*
|
||||
* This had to be commented out - the same VID+PID is used also for
|
||||
* other modes than MTP, so we need to let mtp-probe do its job on this
|
||||
@ -3454,7 +3454,7 @@
|
||||
#if 1
|
||||
/* after some review I commented it back in. There was apparently
|
||||
* only one or two devices misbehaving (having this ID in mass storage mode),
|
||||
* but more seem to use it regulary as MTP devices. Marcus 20150401 */
|
||||
* but more seem to use it regularly as MTP devices. Marcus 20150401 */
|
||||
/*
|
||||
* This had to be commented out - the same VID+PID is used also for
|
||||
* other modes than MTP, so we need to let mtp-probe do its job on this
|
||||
@ -3951,7 +3951,7 @@
|
||||
DEVICE_FLAGS_ANDROID_BUGS },
|
||||
|
||||
/* In update 4 the order of devices was changed for
|
||||
better OS X / Windows suport and another device-id
|
||||
better OS X / Windows support and another device-id
|
||||
got assigned for the MTP */
|
||||
{ "Jolla", 0x2931, "Sailfish (ID2)", 0x0a05,
|
||||
DEVICE_FLAGS_ANDROID_BUGS },
|
||||
|
@ -33,7 +33,7 @@ COALESCE_FACTOR = 20.0
|
||||
BOTTOM_FACTOR = 2.0
|
||||
|
||||
# Where lines overlap, top of one to bottom of next should exceed
|
||||
# the line height by this factor for them to be considered diferent.
|
||||
# the line height by this factor for them to be considered different.
|
||||
HEIGHT_FACTOR = 1.5
|
||||
|
||||
# Fraction of text height that two strings' bottoms can differ by
|
||||
@ -822,7 +822,7 @@ class Page:
|
||||
# Not within text boundaries
|
||||
self.texts.remove(text)
|
||||
|
||||
# Find any image occurances if requested
|
||||
# Find any image occurrences if requested
|
||||
# These can be interspersed with text
|
||||
if not self.opts.no_images:
|
||||
for img in page.xpath('descendant::image'):
|
||||
|
@ -289,7 +289,7 @@ class PML_HTMLizer:
|
||||
return text
|
||||
|
||||
if code in self.DIV_STATES:
|
||||
# Ignore multilple T's on the same line. They do not have a closing
|
||||
# Ignore multiple T's on the same line. They do not have a closing
|
||||
# code. They get closed at the end of the line.
|
||||
if code == 'T' and self.state['T'][0]:
|
||||
self.code_value(stream)
|
||||
@ -582,7 +582,7 @@ class PML_HTMLizer:
|
||||
text = self.process_code('Sd', line, 'sb')
|
||||
elif c in 'xXC':
|
||||
empty = False
|
||||
# The PML was modified eariler so x and X put the text
|
||||
# The PML was modified earlier so x and X put the text
|
||||
# inside of ="" so we don't have do special processing
|
||||
# for C.
|
||||
t = ''
|
||||
|
@ -107,7 +107,7 @@ class AddBrackets:
|
||||
def __in_body_func(self, line):
|
||||
'''
|
||||
Select what action to take in body:
|
||||
1-At the end of the file close the braket if a bracket was opened
|
||||
1-At the end of the file close the bracket if a bracket was opened
|
||||
This happens if there is achange
|
||||
2-If an open bracket is found the code inside is ignore
|
||||
(written without modifications)
|
||||
|
@ -109,7 +109,7 @@ class ConvertToTags:
|
||||
Process lines for open tags that have attributes.
|
||||
The important info is between [17:-1]. Take this info and split it
|
||||
with the delimiter '<'. The first token in this group is the element
|
||||
name. The rest are attributes, separated fromt their values by '>'. So
|
||||
name. The rest are attributes, separated from their values by '>'. So
|
||||
read each token one at a time, and split them by '>'.
|
||||
'''
|
||||
# mi<tg<open-att__<footnote<num>
|
||||
|
@ -187,7 +187,7 @@ class FieldStrings:
|
||||
my_string --the string to parse.
|
||||
type -- the type of string.
|
||||
Returns:
|
||||
Returns a string for a field instrution attribute.
|
||||
Returns a string for a field instruction attribute.
|
||||
Logic:
|
||||
This handles all "large" fields, which means everything except
|
||||
toc entries, index entries, and bookmarks
|
||||
|
@ -5,7 +5,7 @@ class ParseOptions:
|
||||
'''
|
||||
Requires:
|
||||
system_string --The string from the command line
|
||||
options_dict -- a dictionary with the key equal to the opition, and
|
||||
options_dict -- a dictionary with the key equal to the option, and
|
||||
a list describing that option. (See below)
|
||||
Returns:
|
||||
A tuple. The first item in the tuple is a dictionary containing
|
||||
@ -223,7 +223,7 @@ class ParseOptions:
|
||||
Returns:
|
||||
nothing
|
||||
Logic:
|
||||
Check each value in the newly creatd options list to see if it
|
||||
Check each value in the newly created options list to see if it
|
||||
matches what the user describes as a legal option.
|
||||
'''
|
||||
illegal_options = []
|
||||
|
@ -31,7 +31,7 @@ Before any para_def token is found. This means all the text in the preamble.
|
||||
Look for the token 'cw<pf<par-def___'. This will changet the state to collect_tokens.
|
||||
2. collect_tokens.
|
||||
Found a paragraph_def. Need to get all tokens.
|
||||
Change with start of a paragrph ('mi<mk<para-start'). State then becomes
|
||||
Change with start of a paragraph ('mi<mk<para-start'). State then becomes
|
||||
in_paragraphs
|
||||
If another paragraph definition is found, the state does not change.
|
||||
But the dictionary is reset.
|
||||
|
@ -206,7 +206,7 @@ class Sections:
|
||||
nothing
|
||||
Logic:
|
||||
I have found a section definition. Check if the line is the end of
|
||||
the defnition (a paragraph definition), or if it contains info that
|
||||
the definition (a paragraph definition), or if it contains info that
|
||||
should be added to the values dictionary. If neither of these
|
||||
cases are true, output the line to a file.
|
||||
'''
|
||||
|
@ -256,7 +256,7 @@ class Table:
|
||||
control word with another method.
|
||||
Check for states that will end this state.
|
||||
While in the row definition, certain tokens can end a row or end a table.
|
||||
If a paragrah definition (pard-start) is found, and the you are already in
|
||||
If a paragraph definition (pard-start) is found, and you are already in
|
||||
a table, start of a row.
|
||||
'''
|
||||
if self.__token_info == 'cw<tb<row_______':
|
||||
|
@ -67,7 +67,7 @@ This editor is available in two ways:
|
||||
calibre-debug -c "from calibre.gui2.dialogs.ff_doc_editor import main; main()"[/CODE]
|
||||
all on one line.
|
||||
[*]By defining a keyboard shortcut in calibre for the action `Open the template
|
||||
documenation editor` in the `Miscellaneous` section. There is no default shortcut.
|
||||
documentation editor` in the `Miscellaneous` section. There is no default shortcut.
|
||||
[/LIST]
|
||||
[/LIST]
|
||||
'''
|
||||
|
@ -372,7 +372,7 @@ class LazyConfigWidgetBase(ConfigWidgetBase):
|
||||
# called when the widget is actually displays. We can't do something like
|
||||
# lazy_genesis because Qt does "things" before showEvent() is called. In
|
||||
# particular, the register function doesn't work with combo boxes if
|
||||
# genesis isn't called before everythign else. Why is a mystery.
|
||||
# genesis isn't called before everything else. Why is a mystery.
|
||||
if not self.lazy_init_called:
|
||||
if hasattr(self, 'lazy_initialize'):
|
||||
self.lazy_initialize()
|
||||
|
@ -231,7 +231,7 @@ class LazyEditRulesBase(LazyConfigWidgetBase):
|
||||
|
||||
def lazy_initialize(self):
|
||||
if not self.rule_set_name:
|
||||
raise NotImplementedError('You must define the attribut "rule_set_name" in LazyEditRulesBase subclasses')
|
||||
raise NotImplementedError('You must define the attribute "rule_set_name" in LazyEditRulesBase subclasses')
|
||||
self.load_rule_set(self.rule_set_name)
|
||||
|
||||
def load_rule_set(self, name):
|
||||
|
@ -112,7 +112,7 @@ class TTSEmbed(Dialog):
|
||||
s.addWidget(p)
|
||||
|
||||
self.remove_media_button = b = self.bb.addButton(_('&Remove existing audio'), QDialogButtonBox.ButtonRole.ActionRole)
|
||||
b.setToolTip(_('Remove any exisiting audio overlays, such as a previously created Text-to-speech narration from this book'))
|
||||
b.setToolTip(_('Remove any existing audio overlays, such as a previously created Text-to-speech narration from this book'))
|
||||
b.setIcon(QIcon.ic('trash.png'))
|
||||
b.clicked.connect(self.remove_media)
|
||||
v.addWidget(self.bb)
|
||||
|
8
src/calibre/utils/windows/wintoastlib.cpp
vendored
8
src/calibre/utils/windows/wintoastlib.cpp
vendored
@ -521,14 +521,14 @@ bool WinToast::initialize(_Out_opt_ WinToastError* error) {
|
||||
if (_shortcutPolicy != SHORTCUT_POLICY_IGNORE) {
|
||||
if (createShortcut() < 0) {
|
||||
setError(error, WinToastError::ShellLinkNotCreated);
|
||||
DEBUG_MSG(L"Error while attaching the AUMI to the current proccess =(");
|
||||
DEBUG_MSG(L"Error while attaching the AUMI to the current process =(");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(DllImporter::SetCurrentProcessExplicitAppUserModelID(_aumi.c_str()))) {
|
||||
setError(error, WinToastError::InvalidAppUserModelID);
|
||||
DEBUG_MSG(L"Error while attaching the AUMI to the current proccess =(");
|
||||
DEBUG_MSG(L"Error while attaching the AUMI to the current process =(");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -560,8 +560,8 @@ HRESULT WinToast::validateShellLinkHelper(_Out_ bool& wasChanged) {
|
||||
|
||||
// Let's load the file as shell link to validate.
|
||||
// - Create a shell link
|
||||
// - Create a persistant file
|
||||
// - Load the path as data for the persistant file
|
||||
// - Create a persistent file
|
||||
// - Load the path as data for the persistent file
|
||||
// - Read the property AUMI and validate with the current
|
||||
// - Review if AUMI is equal.
|
||||
ComPtr<IShellLink> shellLink;
|
||||
|
Loading…
x
Reference in New Issue
Block a user