Commit Graph

14352 Commits

Author SHA1 Message Date
Philipp Hörist 0d8c008764 Fix typo in event type 2017-04-29 16:58:40 +02:00
Philipp Hörist 2ede022422 Dont hash file on filetransfer error 2017-04-29 16:58:39 +02:00
Andrey Gursky 8c51eb72b9 finish jingle file transfer session for files without hash 2017-04-29 16:58:31 +02:00
Philipp Hörist 21700051f8 Read/Write file in binary mode 2017-04-29 16:12:41 +02:00
Philipp Hörist fde2ac731b Close IBB Stream correctly 2017-04-29 16:07:48 +02:00
Yann Leboulanger 3bc6173a11 Close IBB stream with correct SID. See #8555 2017-04-29 16:01:59 +02:00
Yann Leboulanger 1a3d60c637 check for errors when adding a transport contact. Fixes #8196 2017-04-29 16:01:31 +02:00
Philipp Hörist 0f1d04e488 Fix path to logs.db in history manager
Logs.db is always at data_root, even if we set another config directory with -c
2017-04-25 01:36:10 +02:00
Philipp Hörist 575afb0837 Merge branch 'fixGetIcon' into 'master'
fix "Unable to load icon gajim" errors caused by !84

See merge request !87
2017-04-23 01:01:29 +02:00
André Apitzsch 7e4b257112 fix "Unable to load icon gajim" errors caused by !84 2017-04-23 00:30:19 +02:00
Yann Leboulanger 25f403863e Merge branch 'reverseDNS' into 'master'
use 'reverse DNS' convention for desktop and icon files

See merge request !84
2017-04-22 17:26:57 +02:00
Philipp Hörist 0b0812bb75 Start HistoryManager with config path argument
HistoryManager was not finding the Logs.db when Gajim was
used with the -c config path argument
2017-04-21 18:44:27 +02:00
Philipp Hörist 8e3e9b4d9d Merge branch 'zeroconf' into 'master'
fix python errors in client zeroconf

See merge request !82
2017-04-19 18:55:25 +02:00
Philipp Hörist 14091642c4 Merge branch 'change_password_fix' into 'master'
Disable button if password changing is not supported

See merge request !85
2017-04-19 18:54:20 +02:00
Marc Schink 4d8379f492 Disable button if password changing is not supported 2017-04-19 18:17:22 +02:00
Philipp Hörist c5aa507ec0 Remove timeout id after AvatarWindow is shown 2017-04-19 17:10:01 +02:00
Philipp Hörist 358d410d5e Get rid of cairo dependency 2017-04-19 16:58:16 +02:00
André Apitzsch 15d834025c use 'reverse DNS' convention for desktop and icon files
see https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html
2017-04-18 21:19:15 +02:00
Philipp Hörist 86e29fb7f4 LegacyArchiving Event does not have a type 2017-04-18 18:58:06 +02:00
Philipp Hörist d7a6b6ab0b Register new MAM Events 2017-04-18 18:56:57 +02:00
Philipp Hörist 09512065d4 Fix wrong inclusion check 2017-04-18 18:26:06 +02:00
Philipp Hörist b42c21d3e0 Use new MAM Events and use chosen MAM namespace 2017-04-18 17:52:17 +02:00
Philipp Hörist 6b75f4ab35 Choose MAM namespace and save it 2017-04-18 17:50:15 +02:00
Philipp Hörist f8a028b553 Add/Modify Events to handle all MAM namespaces 2017-04-18 17:48:58 +02:00
Philipp Hörist 1d2320b0bb Add aesgcm to valid uri schemes 2017-04-15 12:02:44 +02:00
Philipp Hörist a1565040bd Merge branch 'muc-chatstate' into 'master'
Implement chatstate in MUC, as defined in XEP-0085 §5.5

See merge request !11
2017-04-14 18:39:08 +02:00
Emmanuel Gil Peyrot f6739730af Implement chatstate in MUC, as defined in XEP-0085 §5.5. 2017-04-14 16:58:04 +01:00
Philipp Hörist 78b562f7a5 Make PGP encoding configurable
python-gnupg uses latin1 as default encoding because GPG itself uses
latin1 as default.
We should not override this default with getpreferredencoding, because
getpreferredencoding maybe returns something else than what GPG is configured
on that system.

Example: On Windows
GPG is run in default mode with 'latin1'
getpreferredencoding returns 'cp1252'

The approach would be now to default to latin1 as it is GPGs default.
And if the User sets a different ecoding for GPG he has to set it in
Gajim aswell.
2017-04-12 22:50:02 +02:00
Philipp Hörist a2785ba396 Add version check for python-gnupg 2017-04-12 22:39:55 +02:00
Philipp Hörist a51ea32dc6 Refactor exception handling for logger
- Handle exceptions inside write() instead of propagating the
    exception
- Add error message to exception
- Add dispatch() method in logger
2017-04-12 22:30:55 +02:00
Philipp Hörist 54eb1cbbb8 Simplify log_message()
- Pass EventObj instead of variables
- decrease indent level
- check all conditions inside log_message() not before calling
- fixed bug where gc private messages where not logged with the correct jid
2017-04-12 22:30:28 +02:00
André Apitzsch 4725858ab1 zeroconf: 'to' is of type JID and no string
use a class method to remove the resource from JID
2017-04-10 23:53:54 +02:00
André Apitzsch c058a1e125 zeroconf: string.letters has been removed with Python 3
use ascii_letters which should be sufficient
2017-04-10 23:48:52 +02:00
Philipp Hörist 8a789763a2 Merge branch 'master' into 'master'
Sending Message Refactoring

See merge request !80
2017-04-08 18:38:55 +02:00
Philipp Hörist bbb5c0f50d Simplify sending message
- Dont use callbacks, they have no gain in that situation and make the code hard to read
- pass the whole object to a new Event instead of many vars
2017-04-06 23:21:19 +02:00
Philipp Hörist 298ba4d939 Fix Last Message Correction for PGP messages 2017-04-04 23:21:11 +02:00
Philipp Hörist caba5e1723 Rename _on_continue_message()
_build_message_stanza is a better fitting name
2017-04-04 21:55:16 +02:00
Philipp Hörist 28a3a58ea9 Refactor encrypting PGP Message
- Add a _encrypt_message() and _finished_encrypt() method
- Handle Fallback body text in _on_continue_message() where we build the Stanza
2017-04-04 21:31:00 +02:00
Philipp Hörist d344c24a2a Pass EventObject around instead of many vars
This makes it much easier to read and modify
2017-04-04 21:30:48 +02:00
Philipp Hörist 1a5d6fbf30 Merge branch 'various-cleanups' into 'master'
Various small cleanups, with focus on logger and history window

See merge request !77
2017-03-31 16:44:32 +02:00
Markus Böhme 21d15dec29 Use the same named tuple for related methods for conversation loading
Both methods get_conversation_for_date and search_log in the logger
module are related to the loading of conversations and both return a
list of messages from the log. Therefore, it makes sense that both of
them have the same return type.

Remove the named tuple type specific to search_log and convert the
method to return tuples of type Message instead. As a side effect of
this change, search_log now also returns values from the additional_data
column in the log database.
2017-03-30 22:19:40 +02:00
Markus Böhme e735bfe7ab Make conversation loading in the history window use named tuples
The logger method get_conversation_for_date has previously been
converted to return a list of named tuples. Now pass these tuples on to
the method that actually inserts the conversation's messages into the
textbuffer. Also rename two related methods in the history window:
  -  _add_lines_for_date => _load_conversation
  -  _add_new_line => _add_message
2017-03-30 21:57:44 +02:00
Markus Böhme 65e926c181 Convert get_conversation_for_date to return named tuples
The get_conversation_for_date method in the logger module returns a
list of bare tuples. Knowledge of how to pack and unpack the many
individual components of the tuples is split between the caller and
the callee, making the method hard to maintain and ugly to use.
Therefore, convert the method to return named tuple instead.
2017-03-30 21:24:31 +02:00
Markus Böhme 08f4e17158 Rename method get_search_results_for_query to search_log 2017-03-30 21:23:03 +02:00
Markus Böhme d612e80a47 Convert get_search_results_for_query to return named tuples
The get_search_results_for_query method in the logger module returns a
list of bare tuples. Knowledge of how to pack and unpack the many
indidual components of the tuples is scattered across both the callers
and the callee, making the method hard to maintain and ugly to use.
Therefore, convert the method to return named tuples instead.
2017-03-30 21:23:03 +02:00
Philipp Hörist 2f1cad1c81 Merge branch 'allow-ibb-to-bare-jid' into 'master'
Allow IBB FT to bare JIDs again

Closes #8581

See merge request !71
2017-03-29 15:29:08 +02:00
Markus Böhme 167cf02afd Fix typo across codebase (change "tupple" to "tuple") 2017-03-29 10:56:31 +02:00
Markus Böhme 8df8486def Add @unique decorator to all enumerations
Currently, there are no enumerations using the enum module which reuse
values/need aliases. Add the @unique decorator to all enum classes as a
safety net for future modifications.
2017-03-29 10:56:31 +02:00
Stephen Paul Weber c110d8af60 Allow IBB FT to bare JIDs again
Currently works on released gajim, but not on nightly.

This explicit check for resource in the to-jid just returns if there is no
resource. It doesn't even cancel the file transfer or anything, it just
stops... which looks to the user like a file transfer hang.  Removing
the check makes Gajim work as expected.

Closes #8581
2017-03-28 19:11:18 -05:00
Philipp Hörist 5cc92efcb6 Drop messages from invalid JIDs silently 2017-03-27 20:35:14 +02:00