More spelling fixes
This commit is contained in:
parent
1d27ab2254
commit
d871dcdcb1
|
@ -58,9 +58,9 @@ see [Wiki](https://dev.gajim.org/gajim/gajim/wikis/help/gajimmacosx#python3brew)
|
||||||
|
|
||||||
#### Developing
|
#### Developing
|
||||||
|
|
||||||
For developing you dont have to install Gajim.
|
For developing you don't have to install Gajim.
|
||||||
|
|
||||||
After installing all dependencys execute
|
After installing all dependencies execute
|
||||||
|
|
||||||
``./launch.py``
|
``./launch.py``
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ Shows or hides the roster window
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
Open a URI of group chat gajim
|
Open a URI of group chat gajim
|
||||||
.Pp
|
.Pp
|
||||||
.Dl $ gajim-remote handle_uri xmpp:gajim@conferenc.gajim.org?join
|
.Dl $ gajim-remote handle_uri xmpp:gajim@conference.gajim.org?join
|
||||||
.Pp
|
.Pp
|
||||||
Send custom XML
|
Send custom XML
|
||||||
.Pp
|
.Pp
|
||||||
|
|
|
@ -387,7 +387,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
app.ged.register_event_handler('ping-error', ged.GUI1,
|
app.ged.register_event_handler('ping-error', ged.GUI1,
|
||||||
self._nec_ping_error)
|
self._nec_ping_error)
|
||||||
|
|
||||||
# This is bascially a very nasty hack to surpass the inability
|
# This is basically a very nasty hack to surpass the inability
|
||||||
# to properly use the super, because of the old code.
|
# to properly use the super, because of the old code.
|
||||||
CommandTools.__init__(self)
|
CommandTools.__init__(self)
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
|
|
||||||
def on_banner_label_populate_popup(self, label, menu):
|
def on_banner_label_populate_popup(self, label, menu):
|
||||||
"""
|
"""
|
||||||
Override the default context menu and add our own menutiems
|
Override the default context menu and add our own menuitems
|
||||||
"""
|
"""
|
||||||
item = Gtk.SeparatorMenuItem.new()
|
item = Gtk.SeparatorMenuItem.new()
|
||||||
menu.prepend(item)
|
menu.prepend(item)
|
||||||
|
@ -617,9 +617,9 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
elif (self.space_pressed or self.msg_textview.undo_pressed) and \
|
elif (self.space_pressed or self.msg_textview.undo_pressed) and \
|
||||||
event.keyval not in (Gdk.KEY_Control_L, Gdk.KEY_Control_R) and \
|
event.keyval not in (Gdk.KEY_Control_L, Gdk.KEY_Control_R) and \
|
||||||
not (event.keyval == Gdk.KEY_z and event.get_state() & Gdk.ModifierType.CONTROL_MASK):
|
not (event.keyval == Gdk.KEY_z and event.get_state() & Gdk.ModifierType.CONTROL_MASK):
|
||||||
# If the space key has been pressed and now it hasnt,
|
# If the space key has been pressed and now it hasn't,
|
||||||
# we save the buffer into the undo list. But be carefull we're not
|
# we save the buffer into the undo list. But be careful we're not
|
||||||
# pressiong Control again (as in ctrl+z)
|
# pressing Control again (as in ctrl+z)
|
||||||
_buffer = widget.get_buffer()
|
_buffer = widget.get_buffer()
|
||||||
start_iter, end_iter = _buffer.get_bounds()
|
start_iter, end_iter = _buffer.get_bounds()
|
||||||
self.msg_textview.save_undo(_buffer.get_text(start_iter, end_iter, True))
|
self.msg_textview.save_undo(_buffer.get_text(start_iter, end_iter, True))
|
||||||
|
@ -938,7 +938,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
pos = self.received_history_pos
|
pos = self.received_history_pos
|
||||||
size = len(history)
|
size = len(history)
|
||||||
scroll = False if pos == size else True # are we scrolling?
|
scroll = False if pos == size else True # are we scrolling?
|
||||||
# we don't want size of the buffer to grow indefinately
|
# we don't want size of the buffer to grow indefinitely
|
||||||
max_size = app.config.get('key_up_lines')
|
max_size = app.config.get('key_up_lines')
|
||||||
for i in range(size - max_size + 1):
|
for i in range(size - max_size + 1):
|
||||||
if pos == 0:
|
if pos == 0:
|
||||||
|
@ -1180,7 +1180,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
|
|
||||||
def on_minimize_menuitem_toggled(self, widget):
|
def on_minimize_menuitem_toggled(self, widget):
|
||||||
"""
|
"""
|
||||||
When a grouchat is minimized, unparent the tab, put it in roster etc
|
When a groupchat is minimized, unparent the tab, put it in roster etc
|
||||||
"""
|
"""
|
||||||
old_value = True
|
old_value = True
|
||||||
non_minimized_gc = app.config.get_per('accounts', self.account,
|
non_minimized_gc = app.config.get_per('accounts', self.account,
|
||||||
|
@ -1286,7 +1286,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
if event != Gdk.KEY_Page_Up:
|
if event != Gdk.KEY_Page_Up:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
# On scrolliung UP disable autoscroll
|
# On scrolling UP disable autoscroll
|
||||||
# get_scroll_direction() sets has_direction only TRUE
|
# get_scroll_direction() sets has_direction only TRUE
|
||||||
# if smooth scrolling is deactivated. If we have smooth
|
# if smooth scrolling is deactivated. If we have smooth
|
||||||
# smooth scrolling we have to use get_scroll_deltas()
|
# smooth scrolling we have to use get_scroll_deltas()
|
||||||
|
@ -1437,7 +1437,7 @@ class ScrolledWindow(Gtk.ScrolledWindow):
|
||||||
# Gtk Bug: If policy is set to Automatic, the ScrolledWindow
|
# Gtk Bug: If policy is set to Automatic, the ScrolledWindow
|
||||||
# has a min size of around 46-82 depending on the System. Because
|
# has a min size of around 46-82 depending on the System. Because
|
||||||
# we want it smaller, we set policy NEVER if the height is < 90
|
# we want it smaller, we set policy NEVER if the height is < 90
|
||||||
# so the ScrolledWindow will shrink to around 26 (1 line heigh).
|
# so the ScrolledWindow will shrink to around 26 (1 line height).
|
||||||
# Once it gets over 90 its no problem to restore the policy.
|
# Once it gets over 90 its no problem to restore the policy.
|
||||||
if natural_height < 90:
|
if natural_height < 90:
|
||||||
GLib.idle_add(self.set_policy,
|
GLib.idle_add(self.set_policy,
|
||||||
|
|
|
@ -36,13 +36,13 @@ class BaseError(Exception):
|
||||||
|
|
||||||
class DefinitionError(BaseError):
|
class DefinitionError(BaseError):
|
||||||
"""
|
"""
|
||||||
Used to indicate errors occured on command definition.
|
Used to indicate errors occurred on command definition.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class CommandError(BaseError):
|
class CommandError(BaseError):
|
||||||
"""
|
"""
|
||||||
Used to indicate errors occured during command execution.
|
Used to indicate errors occurred during command execution.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class CommandHost(metaclass=Host):
|
||||||
class CommandContainer(metaclass=Container):
|
class CommandContainer(metaclass=Container):
|
||||||
"""
|
"""
|
||||||
Command container is an entity which holds defined commands,
|
Command container is an entity which holds defined commands,
|
||||||
allowing them to be dispatched and proccessed correctly. Each
|
allowing them to be dispatched and processed correctly. Each
|
||||||
command container may be bound to a one or more command hosts.
|
command container may be bound to a one or more command hosts.
|
||||||
|
|
||||||
The AUTOMATIC class variable, which must be defined by a command
|
The AUTOMATIC class variable, which must be defined by a command
|
||||||
|
@ -159,7 +159,7 @@ class Command(object):
|
||||||
try:
|
try:
|
||||||
return self.handler(*args, **kwargs)
|
return self.handler(*args, **kwargs)
|
||||||
|
|
||||||
# This allows to use a shortcuted way of raising an exception
|
# This allows to use a shortcut way of raising an exception
|
||||||
# inside a handler. That is to raise a CommandError without
|
# inside a handler. That is to raise a CommandError without
|
||||||
# command or name attributes set. They will be set to a
|
# command or name attributes set. They will be set to a
|
||||||
# corresponding values right here in case if they was not set by
|
# corresponding values right here in case if they was not set by
|
||||||
|
@ -235,7 +235,7 @@ def command(*names, **properties):
|
||||||
facilities for setting command's names and properties.
|
facilities for setting command's names and properties.
|
||||||
|
|
||||||
Names should contain a set of names (aliases) by which the command
|
Names should contain a set of names (aliases) by which the command
|
||||||
can be reached. If no names are given - the the native name (the one
|
can be reached. If no names are given - the native name (the one
|
||||||
extracted from the command handler) will be used.
|
extracted from the command handler) will be used.
|
||||||
|
|
||||||
If native=True is given (default) and names is non-empty - then the
|
If native=True is given (default) and names is non-empty - then the
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The implementation and auxilary systems which implement the standard
|
The implementation and auxiliary systems which implement the standard
|
||||||
Gajim commands and also provide an infrastructure for adding custom
|
Gajim commands and also provide an infrastructure for adding custom
|
||||||
commands.
|
commands.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"""
|
"""
|
||||||
This module contains examples of how to create your own commands, by
|
This module contains examples of how to create your own commands, by
|
||||||
creating a new command container, bounded to a specific command host,
|
creating a new command container, bounded to a specific command host,
|
||||||
and definding a set of commands inside of it.
|
and defining a set of commands inside of it.
|
||||||
|
|
||||||
Keep in mind that this module is not being loaded from anywhere, so the
|
Keep in mind that this module is not being loaded from anywhere, so the
|
||||||
code in here will not be executed and commands defined here will not be
|
code in here will not be executed and commands defined here will not be
|
||||||
|
@ -59,7 +59,7 @@ class CustomCommonCommands(CommandContainer):
|
||||||
programmatically extracted and formatted.
|
programmatically extracted and formatted.
|
||||||
|
|
||||||
After that you can give more help, like explanation of the
|
After that you can give more help, like explanation of the
|
||||||
options. This one will be programatically extracted and
|
options. This one will be programmatically extracted and
|
||||||
formatted too.
|
formatted too.
|
||||||
|
|
||||||
After all the documentation - there will be autogenerated (based
|
After all the documentation - there will be autogenerated (based
|
||||||
|
|
|
@ -86,7 +86,7 @@ class ChatCommandProcessor(CommandProcessor):
|
||||||
|
|
||||||
def command_preprocessor(self, command, name, arguments, args, kwargs):
|
def command_preprocessor(self, command, name, arguments, args, kwargs):
|
||||||
# If command argument contain h or help option - forward it to
|
# If command argument contain h or help option - forward it to
|
||||||
# the /help command. Dont forget to pass self, as all commands
|
# the /help command. Don't forget to pass self, as all commands
|
||||||
# are unbound. And also don't forget to print output.
|
# are unbound. And also don't forget to print output.
|
||||||
if 'h' in kwargs or 'help' in kwargs:
|
if 'h' in kwargs or 'help' in kwargs:
|
||||||
help = self.get_command('help')
|
help = self.get_command('help')
|
||||||
|
|
|
@ -161,7 +161,7 @@ class StandardCommonCommands(CommandContainer):
|
||||||
|
|
||||||
class StandardCommonChatCommands(CommandContainer):
|
class StandardCommonChatCommands(CommandContainer):
|
||||||
"""
|
"""
|
||||||
This command container contans standard commands, which are common
|
This command container contains standard commands, which are common
|
||||||
to a chat and a private chat only.
|
to a chat and a private chat only.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The module contains routines to parse command arguments and map them to
|
The module contains routines to parse command arguments and map them to
|
||||||
the command handler's positonal and keyword arguments.
|
the command handler's positional and keyword arguments.
|
||||||
|
|
||||||
Mapping is done in two stages: 1) parse arguments into positional
|
Mapping is done in two stages: 1) parse arguments into positional
|
||||||
arguments and options; 2) adapt them to the specific command handler
|
arguments and options; 2) adapt them to the specific command handler
|
||||||
|
@ -33,7 +33,7 @@ ARG_PATTERN = re.compile(r'(\'|")?(?P<body>(?(1).+?|\S+))(?(1)\1)')
|
||||||
OPT_PATTERN = re.compile(r'(?<!\w)--?(?P<key>[\w-]+)(?:(?:=|\s)(\'|")?(?P<value>(?(2)[^-]+?|[^-\s]+))(?(2)\2))?')
|
OPT_PATTERN = re.compile(r'(?<!\w)--?(?P<key>[\w-]+)(?:(?:=|\s)(\'|")?(?P<value>(?(2)[^-]+?|[^-\s]+))(?(2)\2))?')
|
||||||
|
|
||||||
# Option keys needs to be encoded to a specific encoding as Python does
|
# Option keys needs to be encoded to a specific encoding as Python does
|
||||||
# not allow to expand dictionary with raw unicode strings as keys from a
|
# not allow to expand dictionary with raw Unicode strings as keys from a
|
||||||
# **kwargs.
|
# **kwargs.
|
||||||
KEY_ENCODING = 'UTF-8'
|
KEY_ENCODING = 'UTF-8'
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ def adapt_arguments(command, arguments, args, opts):
|
||||||
arguments_end = len(arguments) - 1
|
arguments_end = len(arguments) - 1
|
||||||
|
|
||||||
# If there are any optional arguments given they should be
|
# If there are any optional arguments given they should be
|
||||||
# either an unquoted postional argument or part of the raw
|
# either an unquoted positional argument or part of the raw
|
||||||
# argument. So we find all optional arguments that can
|
# argument. So we find all optional arguments that can
|
||||||
# possibly be unquoted argument and append them as is to the
|
# possibly be unquoted argument and append them as is to the
|
||||||
# args.
|
# args.
|
||||||
|
@ -164,7 +164,7 @@ def adapt_arguments(command, arguments, args, opts):
|
||||||
raise CommandError(_("Missing arguments"), command)
|
raise CommandError(_("Missing arguments"), command)
|
||||||
|
|
||||||
# The essential point of the whole play. After
|
# The essential point of the whole play. After
|
||||||
# boundaries are being determined (supposingly correct)
|
# boundaries are being determined (supposedly correct)
|
||||||
# we separate raw part from the rest of arguments, which
|
# we separate raw part from the rest of arguments, which
|
||||||
# should be normally processed.
|
# should be normally processed.
|
||||||
raw = arguments[end:]
|
raw = arguments[end:]
|
||||||
|
@ -181,7 +181,7 @@ def adapt_arguments(command, arguments, args, opts):
|
||||||
|
|
||||||
args.append((raw, (end, arguments_end)))
|
args.append((raw, (end, arguments_end)))
|
||||||
else:
|
else:
|
||||||
# Substitue all of the arguments with only one, which
|
# Substitute all of the arguments with only one, which
|
||||||
# contain raw and unprocessed arguments as a string. And
|
# contain raw and unprocessed arguments as a string. And
|
||||||
# discard all the options, as raw command does not
|
# discard all the options, as raw command does not
|
||||||
# support them.
|
# support them.
|
||||||
|
@ -201,9 +201,9 @@ def adapt_arguments(command, arguments, args, opts):
|
||||||
if '-' in key:
|
if '-' in key:
|
||||||
opts[index] = (key.replace('-', '_'), value, position)
|
opts[index] = (key.replace('-', '_'), value, position)
|
||||||
|
|
||||||
# The second stage of transforming options to an associatable state.
|
# The second stage of transforming options to an associable state.
|
||||||
# Expanding short, one-letter options to a verbose ones, if
|
# Expanding short, one-letter options to a verbose ones, if
|
||||||
# corresponding optin has been given.
|
# corresponding opt-in has been given.
|
||||||
if command.expand:
|
if command.expand:
|
||||||
expanded = []
|
expanded = []
|
||||||
for spec_key, spec_value in norm_kwargs.items():
|
for spec_key, spec_value in norm_kwargs.items():
|
||||||
|
@ -248,7 +248,7 @@ def adapt_arguments(command, arguments, args, opts):
|
||||||
|
|
||||||
# Detect if positional arguments overlap keyword arguments. If so
|
# Detect if positional arguments overlap keyword arguments. If so
|
||||||
# and this is allowed by command options - then map them directly to
|
# and this is allowed by command options - then map them directly to
|
||||||
# their options, so they can get propert further processings.
|
# their options, so they can get proper further processing.
|
||||||
spec_fix = 1 if command.source else 0
|
spec_fix = 1 if command.source else 0
|
||||||
spec_len = len(spec_args) - spec_fix
|
spec_len = len(spec_args) - spec_fix
|
||||||
if len(args) > spec_len:
|
if len(args) > spec_len:
|
||||||
|
@ -281,11 +281,11 @@ def generate_usage(command, complete=True):
|
||||||
"""
|
"""
|
||||||
Extract handler's arguments specification and wrap them in a
|
Extract handler's arguments specification and wrap them in a
|
||||||
human-readable format usage information. If complete is given - then
|
human-readable format usage information. If complete is given - then
|
||||||
USAGE_PATTERN will be used to render the specification completly.
|
USAGE_PATTERN will be used to render the specification completely.
|
||||||
"""
|
"""
|
||||||
spec_args, spec_kwargs, var_args, var_kwargs = command.extract_specification()
|
spec_args, spec_kwargs, var_args, var_kwargs = command.extract_specification()
|
||||||
|
|
||||||
# Remove some special positional arguments from the specifiaction,
|
# Remove some special positional arguments from the specification,
|
||||||
# but store their names so they can be used for usage info
|
# but store their names so they can be used for usage info
|
||||||
# generation.
|
# generation.
|
||||||
sp_source = spec_args.pop(0) if command.source else None
|
sp_source = spec_args.pop(0) if command.source else None
|
||||||
|
|
|
@ -70,7 +70,7 @@ os_info = None # used to cache os information
|
||||||
|
|
||||||
transport_type = {} # list the type of transport
|
transport_type = {} # list the type of transport
|
||||||
|
|
||||||
last_message_time = {} # list of time of the latest incomming message
|
last_message_time = {} # list of time of the latest incoming message
|
||||||
# {acct1: {jid1: time1, jid2: time2}, }
|
# {acct1: {jid1: time1, jid2: time2}, }
|
||||||
encrypted_chats = {} # list of encrypted chats {acct1: [jid1, jid2], ..}
|
encrypted_chats = {} # list of encrypted chats {acct1: [jid1, jid2], ..}
|
||||||
|
|
||||||
|
|
|
@ -423,7 +423,7 @@ class JingleSession:
|
||||||
self.connection.connection.send(stanza)
|
self.connection.connection.send(stanza)
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
else:
|
else:
|
||||||
# FIXME: This ressource is unknown to us, what should we do?
|
# FIXME: This resource is unknown to us, what should we do?
|
||||||
# For now, reject the transport
|
# For now, reject the transport
|
||||||
stanza, jingle = self.__make_jingle('transport-reject')
|
stanza, jingle = self.__make_jingle('transport-reject')
|
||||||
content = jingle.setTag('content', attrs={'creator': creator,
|
content = jingle.setTag('content', attrs={'creator': creator,
|
||||||
|
@ -533,7 +533,7 @@ class JingleSession:
|
||||||
self._session_terminate(reason)
|
self._session_terminate(reason)
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
||||||
# If we are not receivin a file
|
# If we are not receiving a file
|
||||||
# Check if there's already a session with this user:
|
# Check if there's already a session with this user:
|
||||||
if contents[0].media != 'file':
|
if contents[0].media != 'file':
|
||||||
for session in self.connection.iter_jingle_sessions(self.peerjid):
|
for session in self.connection.iter_jingle_sessions(self.peerjid):
|
||||||
|
|
|
@ -191,10 +191,10 @@ class ConnectionBytestream:
|
||||||
"""
|
"""
|
||||||
Inform sender that we refuse to download the file
|
Inform sender that we refuse to download the file
|
||||||
|
|
||||||
typ is used when code = '400', in this case typ can be 'strean' for
|
typ is used when code = '400', in this case typ can be 'stream' for
|
||||||
invalid stream or 'profile' for invalid profile
|
invalid stream or 'profile' for invalid profile
|
||||||
"""
|
"""
|
||||||
# user response to ConfirmationDialog may come after we've disconneted
|
# user response to ConfirmationDialog may come after we've disconnected
|
||||||
if not self.connection or self.connected < 2:
|
if not self.connection or self.connected < 2:
|
||||||
return
|
return
|
||||||
if file_props.session_type == 'jingle':
|
if file_props.session_type == 'jingle':
|
||||||
|
@ -376,7 +376,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
self._add_local_ips_as_streamhosts_to_query(query, file_props)
|
self._add_local_ips_as_streamhosts_to_query(query, file_props)
|
||||||
self._add_proxy_streamhosts_to_query(query, file_props)
|
self._add_proxy_streamhosts_to_query(query, file_props)
|
||||||
self._add_upnp_igd_as_streamhost_to_query(query, file_props, iq)
|
self._add_upnp_igd_as_streamhost_to_query(query, file_props, iq)
|
||||||
# Upnp-igd is ascynchronous, so it will send the iq itself
|
# Upnp-igd is asynchronous, so it will send the iq itself
|
||||||
|
|
||||||
def _add_streamhosts_to_query(self, query, sender, port, hosts):
|
def _add_streamhosts_to_query(self, query, sender, port, hosts):
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
|
@ -855,7 +855,7 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
||||||
|
|
||||||
def OpenStream(self, sid, to, fp, blocksize=4096):
|
def OpenStream(self, sid, to, fp, blocksize=4096):
|
||||||
"""
|
"""
|
||||||
Start new stream. You should provide stream id 'sid', the endpoind jid
|
Start new stream. You should provide stream id 'sid', the endpoint jid
|
||||||
'to', the file object containing info for send 'fp'. Also the desired
|
'to', the file object containing info for send 'fp'. Also the desired
|
||||||
blocksize can be specified.
|
blocksize can be specified.
|
||||||
Take into account that recommended stanza size is 4k and IBB uses
|
Take into account that recommended stanza size is 4k and IBB uses
|
||||||
|
@ -942,7 +942,7 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
||||||
elif seq != file_props.seq:
|
elif seq != file_props.seq:
|
||||||
err = nbxmpp.ERR_UNEXPECTED_REQUEST
|
err = nbxmpp.ERR_UNEXPECTED_REQUEST
|
||||||
else:
|
else:
|
||||||
log.debug('Successfull receive sid->%s %s+%s bytes' % (sid,
|
log.debug('Successfully received sid->%s %s+%s bytes' % (sid,
|
||||||
file_props.fp.tell(), len(data)))
|
file_props.fp.tell(), len(data)))
|
||||||
file_props.seq += 1
|
file_props.seq += 1
|
||||||
file_props.started = True
|
file_props.started = True
|
||||||
|
@ -965,7 +965,7 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
||||||
def StreamCloseHandler(self, conn, stanza):
|
def StreamCloseHandler(self, conn, stanza):
|
||||||
"""
|
"""
|
||||||
Handle stream closure due to all data transmitted.
|
Handle stream closure due to all data transmitted.
|
||||||
Raise xmpppy event specifying successfull data receive.
|
Raise xmpppy event specifying successful data receive.
|
||||||
"""
|
"""
|
||||||
sid = stanza.getTagAttr('close', 'sid')
|
sid = stanza.getTagAttr('close', 'sid')
|
||||||
log.debug('StreamCloseHandler called sid->%s' % sid)
|
log.debug('StreamCloseHandler called sid->%s' % sid)
|
||||||
|
@ -989,7 +989,7 @@ class ConnectionIBBytestream(ConnectionBytestream):
|
||||||
"""
|
"""
|
||||||
Handle remote side reply about if it agree or not to receive our
|
Handle remote side reply about if it agree or not to receive our
|
||||||
datastream.
|
datastream.
|
||||||
Used internally. Raises xmpppy event specfiying if the data transfer
|
Used internally. Raises xmpppy event specifying if the data transfer
|
||||||
is agreed upon.
|
is agreed upon.
|
||||||
"""
|
"""
|
||||||
syn_id = stanza.getID()
|
syn_id = stanza.getID()
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Proxy65Manager:
|
||||||
"""
|
"""
|
||||||
Keep records for file transfer proxies. Each time account establishes a
|
Keep records for file transfer proxies. Each time account establishes a
|
||||||
connection to its server call proxy65manger.resolve(proxy) for every proxy
|
connection to its server call proxy65manger.resolve(proxy) for every proxy
|
||||||
that is convigured within the account. The class takes care to resolve and
|
that is configured within the account. The class takes care to resolve and
|
||||||
test each proxy only once
|
test each proxy only once
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class Proxy65Manager:
|
||||||
if proxy in self.proxies:
|
if proxy in self.proxies:
|
||||||
resolver = self.proxies[proxy]
|
resolver = self.proxies[proxy]
|
||||||
else:
|
else:
|
||||||
# proxy is being ressolved for the first time
|
# proxy is being resolved for the first time
|
||||||
resolver = ProxyResolver(proxy, sender_jid, testit)
|
resolver = ProxyResolver(proxy, sender_jid, testit)
|
||||||
self.proxies[proxy] = resolver
|
self.proxies[proxy] = resolver
|
||||||
resolver.add_connection(connection)
|
resolver.add_connection(connection)
|
||||||
|
|
|
@ -1770,7 +1770,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
right_changed = False
|
right_changed = False
|
||||||
|
|
||||||
if obj.real_jid:
|
if obj.real_jid:
|
||||||
# delete ressource
|
# delete resource
|
||||||
simple_jid = app.get_jid_without_resource(obj.real_jid)
|
simple_jid = app.get_jid_without_resource(obj.real_jid)
|
||||||
nick_jid += ' (%s)' % simple_jid
|
nick_jid += ' (%s)' % simple_jid
|
||||||
|
|
||||||
|
@ -2209,7 +2209,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
if contact.our_chatstate == state:
|
if contact.our_chatstate == state:
|
||||||
return
|
return
|
||||||
|
|
||||||
# if wel're inactive prevent composing (XEP violation)
|
# if we're inactive prevent composing (XEP violation)
|
||||||
if contact.our_chatstate == 'inactive' and state == 'composing':
|
if contact.our_chatstate == 'inactive' and state == 'composing':
|
||||||
# go active before
|
# go active before
|
||||||
app.nec.push_outgoing_event(GcMessageOutgoingEvent(None,
|
app.nec.push_outgoing_event(GcMessageOutgoingEvent(None,
|
||||||
|
@ -2296,7 +2296,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
return True
|
return True
|
||||||
includes = app.config.get('confirm_close_muc_rooms').split(' ')
|
includes = app.config.get('confirm_close_muc_rooms').split(' ')
|
||||||
excludes = app.config.get('noconfirm_close_muc_rooms').split(' ')
|
excludes = app.config.get('noconfirm_close_muc_rooms').split(' ')
|
||||||
# whether to ask for comfirmation before closing muc
|
# whether to ask for confirmation before closing muc
|
||||||
if (app.config.get('confirm_close_muc') or self.room_jid in includes)\
|
if (app.config.get('confirm_close_muc') or self.room_jid in includes)\
|
||||||
and app.gc_connected[self.account][self.room_jid] and self.room_jid \
|
and app.gc_connected[self.account][self.room_jid] and self.room_jid \
|
||||||
not in excludes:
|
not in excludes:
|
||||||
|
|
|
@ -1820,8 +1820,8 @@ class Interface:
|
||||||
# [^\s*] anything but whitespaces and '*'
|
# [^\s*] anything but whitespaces and '*'
|
||||||
# (?<!\S) is a one char lookbehind assertion and asks for any leading
|
# (?<!\S) is a one char lookbehind assertion and asks for any leading
|
||||||
# whitespace
|
# whitespace
|
||||||
# and mathces beginning of lines so we have correct formatting detection
|
# and matches beginning of lines so we have correct formatting detection
|
||||||
# even if the the text is just '*foo*'
|
# even if the text is just '*foo*'
|
||||||
# (?!\S) is the same thing but it's a lookahead assertion
|
# (?!\S) is the same thing but it's a lookahead assertion
|
||||||
# \S*[^\s\W] --> in the matching string don't match ? or ) etc.. if at
|
# \S*[^\s\W] --> in the matching string don't match ? or ) etc.. if at
|
||||||
# the end
|
# the end
|
||||||
|
@ -1869,7 +1869,7 @@ class Interface:
|
||||||
emoticons_pattern_postmatch = ''
|
emoticons_pattern_postmatch = ''
|
||||||
emoticon_length = 0
|
emoticon_length = 0
|
||||||
for emoticon in keys: # travel thru emoticons list
|
for emoticon in keys: # travel thru emoticons list
|
||||||
emoticon_escaped = re.escape(emoticon) # espace regexp metachars
|
emoticon_escaped = re.escape(emoticon) # escape regexp metachars
|
||||||
# | means or in regexp
|
# | means or in regexp
|
||||||
emoticons_pattern += emoticon_escaped + '|'
|
emoticons_pattern += emoticon_escaped + '|'
|
||||||
if (emoticon_length != len(emoticon)):
|
if (emoticon_length != len(emoticon)):
|
||||||
|
@ -2294,7 +2294,7 @@ class Interface:
|
||||||
|
|
||||||
def process_connections(self):
|
def process_connections(self):
|
||||||
"""
|
"""
|
||||||
Called each foo (200) miliseconds. Check for idlequeue timeouts
|
Called each foo (200) milliseconds. Check for idlequeue timeouts
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
app.idlequeue.process()
|
app.idlequeue.process()
|
||||||
|
@ -2305,7 +2305,7 @@ class Interface:
|
||||||
# On Windows process() calls select.select(), so we need this
|
# On Windows process() calls select.select(), so we need this
|
||||||
# executed as often as possible.
|
# executed as often as possible.
|
||||||
# Adding it directly with GLib.idle_add() causes Gajim to use
|
# Adding it directly with GLib.idle_add() causes Gajim to use
|
||||||
# too much CPU time. Thats why its added with 1ms timeout.
|
# too much CPU time. That's why its added with 1ms timeout.
|
||||||
# On Linux only alarms are checked in process(), so we use
|
# On Linux only alarms are checked in process(), so we use
|
||||||
# a bigger timeout
|
# a bigger timeout
|
||||||
timeout, in_seconds = 1, None
|
timeout, in_seconds = 1, None
|
||||||
|
|
|
@ -1113,7 +1113,7 @@ class RosterWindow:
|
||||||
def _really_draw_group(self, group, account):
|
def _really_draw_group(self, group, account):
|
||||||
child_iter = self._get_group_iter(group, account, model=self.model)
|
child_iter = self._get_group_iter(group, account, model=self.model)
|
||||||
if not child_iter:
|
if not child_iter:
|
||||||
# Eg. We redraw groups after we removed a entitiy
|
# Eg. We redraw groups after we removed a entity
|
||||||
# and its empty groups
|
# and its empty groups
|
||||||
return
|
return
|
||||||
if self.regroup:
|
if self.regroup:
|
||||||
|
|
|
@ -502,7 +502,7 @@ class RosterTooltip(Gtk.Window, StatusTable):
|
||||||
self.jid.show()
|
self.jid.show()
|
||||||
self.jid_label.show()
|
self.jid_label.show()
|
||||||
|
|
||||||
# contact has only one ressource
|
# contact has only one resource
|
||||||
if self.num_resources == 1 and contact.resource:
|
if self.num_resources == 1 and contact.resource:
|
||||||
res = GLib.markup_escape_text(contact.resource)
|
res = GLib.markup_escape_text(contact.resource)
|
||||||
prio = str(contact.priority)
|
prio = str(contact.priority)
|
||||||
|
@ -615,7 +615,7 @@ class RosterTooltip(Gtk.Window, StatusTable):
|
||||||
|
|
||||||
def _get_icon_name_for_tooltip(self, contact):
|
def _get_icon_name_for_tooltip(self, contact):
|
||||||
"""
|
"""
|
||||||
Helper function used for tooltip contacts/acounts
|
Helper function used for tooltip contacts/accounts
|
||||||
|
|
||||||
Tooltip on account has fake contact with sub == '', in this case we show
|
Tooltip on account has fake contact with sub == '', in this case we show
|
||||||
real status of the account
|
real status of the account
|
||||||
|
|
|
@ -48,7 +48,7 @@ make_po()
|
||||||
make_mo()
|
make_mo()
|
||||||
{
|
{
|
||||||
if [ ! -f $1.po ]; then
|
if [ ! -f $1.po ]; then
|
||||||
echo "$1.po doesn't existe. Use plugins_translation make_po $1 to create it.";
|
echo "$1.po doesn't exist. Use plugins_translation make_po $1 to create it.";
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
mkdir -p locale/$1/LC_MESSAGES
|
mkdir -p locale/$1/LC_MESSAGES
|
||||||
|
|
|
@ -94,8 +94,8 @@ class TestJingle(unittest.TestCase):
|
||||||
self.con.connection = Connection()
|
self.con.connection = Connection()
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Fake file_props when we recieve a file. Gajim creates a file_props
|
Fake file_props when we receive a file. Gajim creates a file_props
|
||||||
out of a FileRequestRecieve event and from then on it changes in
|
out of a FileRequestReceive event and from then on it changes in
|
||||||
a lot of places. It is easier to just copy it in here.
|
a lot of places. It is easier to just copy it in here.
|
||||||
If the session_initiate stanza changes, this also must change.
|
If the session_initiate stanza changes, this also must change.
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue