Commit Graph

819 Commits

Author SHA1 Message Date
Alexander Krotov 2e58ffdd49 Change data_form_window.ui to avoid "Overriding tab label for notebook" warning 2018-06-28 23:26:15 +02:00
Philipp Hörist b0ce012ce3 Remove RC4-SHA because it is insecure
Newer openssl version would not use this even if it was stated in our cipher string
2018-06-28 18:43:15 +02:00
Philipp Hörist ce9af46fc3 Fix join groupchat dialog with multiple accounts
The dialog didnt show the account combobox when activated
via CTRL + J from the Roster

Also add a application action for join groupchat
2018-06-28 00:04:17 +02:00
Philipp Hörist 129f72bf8e Refactor http auth code into own module 2018-06-25 23:47:06 +02:00
Philipp Hörist 8fa1ee4617 Refactor last activity code into own module 2018-06-25 23:00:40 +02:00
Philipp Hörist b74706afcf Refactor roster item exchange code into own module 2018-06-25 22:43:09 +02:00
Philipp Hörist f382ce2a6c Remove unused code 2018-06-25 20:08:48 +02:00
Philipp Hörist c39da015cc Refactor annotations code into own module 2018-06-25 20:04:56 +02:00
Philipp Hörist a0bc6f0155 Refactor search code into own module 2018-06-25 19:34:10 +02:00
Philipp Hörist 6d2a07df70 Remove support for XEP-0090
This is deprecated almost 10 years
2018-06-24 23:33:42 +02:00
Philipp Hörist 7b957a2876 Refactor ping code into own module 2018-06-24 23:33:42 +02:00
Philipp Hörist 81d9e1bcf2 Refactor software version code into own module 2018-06-24 23:33:42 +02:00
Philipp Hörist 1499010394 Refactor entity time code into own module 2018-06-24 23:33:42 +02:00
Alexander Krotov 10e1e1fe14 Replace progress bars in ad-hoc commands window with spinners
Progress bar "pulse" method indicates that something has been done. For example, when indexing files, it can indicate that one file has been processed, but the number of files to process is unknown. In case of ad-hoc commands, there is only an indication that Gajim is waiting for the network, so spinner is more appropriate here.
2018-06-24 02:45:01 +03:00
Philipp Hörist fd137be30f Send cancel IQ if muc configuration is aborted
Fixes #9069
2018-06-23 23:36:26 +02:00
Philipp Hörist a30a61e5ff Fix joining rooms with upper cases
Fixes #9198
2018-06-23 22:33:03 +02:00
Philipp Hörist 9b07cf8d41 Add loading single builder objects on Windows
This was still missing from the Windows translation fix
2018-06-23 20:35:16 +02:00
Alexander Krotov bd4aa0f40f Replace ad-hoc command radio buttons with a list
Radio buttons are more suitable for static lists of options.
GNOME seems to be using lists in similar situations, for example to show a list of network printers.
This also makes it possible to search a command by typing.
2018-06-23 21:21:55 +03:00
Philipp Hörist 78ebaefaec Dont punycode encode all domain names
RFC7622 3.2.1

... This implies that the string MUST NOT include A-labels ...

Fixes #9211
2018-06-23 20:15:00 +02:00
Philipp Hörist 86eddc2ee9 Remove unused config option log_encrypted_sessions
Fixes #9189
2018-06-23 17:13:57 +02:00
Philipp Hörist 23c302ca70 Fix translation on Windows
Fixes #8658
2018-06-23 17:07:43 +02:00
Philipp Hörist af11aa985b Make sure show is always a string
This is so we hopefully can find some bugs
2018-06-22 20:23:35 +02:00
Alexander Krotov 672f02b3b0 Fix usage of loop variable in socks5.py
Loop seems to be checking whether on_success callback
is already called, but due to wrong variable used
it did nothing.
2018-06-22 08:05:31 +02:00
Alexander Krotov d871dcdcb1 More spelling fixes 2018-06-22 01:47:29 +03:00
Alexander Krotov 1d27ab2254 Spellcheck 2018-06-21 03:05:47 +03:00
Alexander Krotov 22d799a75e Set secure_delete pragma for SQLite3 connections
secure_delete makes SQLite3 overwrite deleted data with zeros, thus actually deleting it from the filesystem.

Ubuntu and FreeBSD enable it by defualt, but some distributions, such as Debian, have it disabled by default, so it is better to set it explicitly.

The performance impact should be negligible as Gajim uses the database rarely.
2018-06-19 19:07:16 +02:00
Philipp Hörist e20f044001 Increase timeframe for duplicate search
A too short timeframe leads to not recognizing duplicates if the server
time differs from the user time. This is only a problem with mam:1

Fixes #8750
2018-06-19 19:05:44 +02:00
Alexander Krotov 1870f560a4 Spellcheck some comments and docstrings 2018-06-19 01:56:18 +03:00
Philipp Hörist 3c1490a306 Remove forward message adhoc commands
These commands introduce security concerns because how they interact
with encrypted messages.

With MAM and Carbons installed on nearly every server these Adhoc commands
became not useful anymore
2018-06-17 23:21:29 +02:00
André Apitzsch 27bb7d1a38 Fix TypeError: get_dialog() got multiple values for argument 'name' 2018-06-17 21:15:51 +02:00
Alexander Krotov 956a420171 Fix docstrings for XEP-0146 commands 2018-06-17 20:09:32 +02:00
André Apitzsch ab3c53bf49 Remove yahoo transport
fixes #9188
2018-06-15 12:19:02 +02:00
Philipp Hörist 6492d15918 Contacts should not be added to Zeroconf account 2018-06-06 21:19:18 +02:00
Philipp Hörist 1303b89ba1 Dont request vcard more than once per session
Print a warning message if the announced avatar sha differs from the
received one

Fixes #9171
2018-06-05 23:37:10 +02:00
Philipp Hörist ce7892546c Catch error on calling setlocale()
Fixes #9167
2018-06-05 12:02:50 +02:00
Philipp Hörist 631740b66b MUC: Fix voice request
Fixes #9159
2018-06-01 20:58:09 +02:00
Philipp Hörist c5f8fe915a Disable subject change if room doesnt allow it 2018-06-01 20:02:29 +02:00
Sophie Herold 77fb424cb0 Fixes notifications are missing after refactoring 2018-06-01 18:51:29 +02:00
Philipp Hörist 4bed8ace95 Refactor Notifications
- Use icon names instead of path
- Move PopupNotificationWindow into notify.py
- Make popup class method instead of module method
- Dont use sessions to get control on notification action Fixes #9140
- Add has_focus() method to ChatControlBase
2018-06-01 17:48:05 +02:00
Philipp Hörist 2abbb1e224 Define JID type when searching for duplciates
Fixes #9163
2018-06-01 17:46:54 +02:00
Philipp Hörist a506758ed3 Remove TLEN related transport code/icons
This Messenger shut down and is not available anymore
2018-05-31 21:01:29 +02:00
Philipp Hörist d656428090 Remove MSN related transport code/icons
This Messenger shut down and is not available anymore
2018-05-31 20:29:13 +02:00
Philipp Hörist 38c669b6e1 Remove AIM related transport code/icons
This Messenger shut down and is not available anymore
2018-05-31 20:29:06 +02:00
Philipp Hörist 395d24bee6 Use certifi on MacOS
Python 3.6 does not use the MacOS cert store anymore
2018-05-31 17:35:46 +02:00
André Apitzsch 5e712768cf Add support for flatpak extensions 2018-05-29 08:34:20 +02:00
Philipp Hörist 32b74b459e Remove support for ESessions
Fixes #5294
2018-05-28 18:21:45 +02:00
Philipp Hörist 56fbe32b11 Fix zeroconf txtrecord encoding
Fixes #9146
2018-05-27 21:03:42 +02:00
Philipp Hörist dbbf078229 Determine earlier if we run as Flatpak 2018-05-27 13:45:07 +02:00
Philipp Hörist b749eccf51 Fix idle detection
Fixes #9149
2018-05-27 10:51:57 +02:00
André Apitzsch 70525c00d2 Config: use with-statement 2018-05-27 02:22:21 +02:00
lovetox 2d6e7d2eee Get rid of python-avahi 2018-05-23 11:47:13 +02:00
Philipp Hörist bc24ab470d Fix translation in flatpak build
Fixes #9138
2018-05-23 08:38:09 +02:00
Philipp Hörist d0ec9812a6 Fix Zeroconf
- Port pybonjour code from gajim_0.16 branch
- Fix some other small things that broke zeroconf
2018-05-22 23:38:04 +02:00
Philipp Hörist 7b0cbb7763 Fix detecting language 2018-05-21 21:49:19 +02:00
Philipp Hörist 2410121ddb Add dedicated zeroconf menu 2018-05-21 21:18:38 +02:00
Philipp Hörist b3162f400c Detect if we run as flatpak
Fixes #9110
2018-05-21 19:17:47 +02:00
Philipp Hörist 59cfddc3ca Fix first start with no accounts 2018-05-21 18:57:18 +02:00
Philipp Hörist 714d70cb23 Dont get current version from config 2018-05-21 18:49:06 +02:00
Philipp Hörist 0ea721fbf1 Fix log message
Presence without vcard hash is not invalid
2018-05-21 18:38:47 +02:00
Philipp Hörist 764b275394 Dont show encryption methods if not supported 2018-05-21 18:09:44 +02:00
Philipp Hörist 7040ea6b2e Move module calls into init
On Linux ctypes has not attr windll, move it into the __init__()
so it does not get evaluatet on module import
2018-05-21 02:39:29 +02:00
Philipp Hörist c5df74c509 Refactor idle module
- Get rid of sleepy.py, handle everything in idle.py
- Introduce one Monitor class that handles everything
2018-05-21 02:32:33 +02:00
Sophie Herold 2e5d966f1d Support for idle time under GNOME without X11
* Removes use of most global variables
* Adds some some logging
* Removes unused close() method for Xss
2018-05-20 20:45:46 +02:00
Philipp Hörist 3e0557dae6 Dont build menu for Local account 2018-05-20 20:15:08 +02:00
Philipp Hörist 848cdc4a88 ProfileWindow: Remove redundant menu entry 2018-05-20 01:28:12 +02:00
Philipp Hörist 2819232808 Fix AvatarChooserDialog not beeing native
Setting mimetypes forces non-native dialogs
2018-05-20 01:28:12 +02:00
Philipp Hörist 2636e3449f Refactor avatar publishing
- Publish avatars with a size of 200x200
- Add AvatarSize.PUBLISH so we can easily change it in the future
- Dont upscale small avatars on publish
- Use surfaces for displaying the avatar in ProfileWindow and VcardWindow
because this scales correctly on HiDPI screens
2018-05-20 01:28:12 +02:00
Philipp Hörist 381c7f2ee7 Update Gajim version to 1.0.3 2018-05-19 10:57:49 +02:00
Philipp Hörist bc22bbad5d Raise required nbxmpp version 2018-05-19 10:50:43 +02:00
Philipp Hörist 117036b872 Init Roster after stream management resume
nbxmpp deletes the roster object on disconnect. Init the roster from db
again on resume.

Fixes #8296
2018-05-18 18:20:30 +02:00
Philipp Hörist 6ed04e2dd2 Simplify generating random int
No need to use SystemRandom() here, as this is not needed for security
purposes
2018-05-17 21:13:37 +02:00
Philipp Hörist 4731e8491b Move signal code into gajim.py
The reason for signal.signal(signal.SIGPIPE, signal.SIG_DFL)

Python ignores SIGPIPE by default ( signal(SIGPIPE, SIG_IGN) )
Write on a socket return then an error 32 EPIPE, which naturally
turns into an exception.

signal.SIG_DFL restores normal UNIX behavior
2018-05-17 20:59:22 +02:00
Philipp Hörist 72df2524e9 Remove check_X509
We dont need this module anymore
2018-05-17 20:12:02 +02:00
Philipp Hörist 3b130db60c Simplify set_i18n_env()
We already determine LANG in initialize_lang()

getdefaultlocale() takes env var LANG into consideration
2018-05-17 20:07:30 +02:00
Philipp Hörist 03aa1db306 Handle LC_ALL=C correctly
We default to 'en' for LANG if LC_ALL=C is set
2018-05-17 20:01:59 +02:00
Philipp Hörist 2a8c0da367 Use i18n module to determine locale 2018-05-17 20:01:59 +02:00
Philipp Hörist 40aa3d808b Remove unused comments
The attributes were removed in 8e09fd92
2018-05-17 20:01:59 +02:00
Andrey Gursky 4f29e2b353 Preserve SSL handshake errors order
Sets are unordered and list with push/pop acts as LIFO, though we need FIFO.
Since the number of elements is tiny, no need to use deque.

Addresses #9120
2018-05-16 19:50:21 +02:00
BBreeziN f13ff8ac68 Fix call to config.get_per() in method that gets account name from jid 2018-05-15 23:39:44 -04:00
Philipp Hörist 3c22ab752a Bring control to front when notification is clicked
if autopopup_chat_opened is activated no control is found because
the event that triggered the notification is already deleted when
the notification is clicked by the user. So instead of searching
for the event, search for the control with jid/account.

Fixes #9124
2018-05-12 23:36:52 +02:00
Philipp Hörist 04b86a7bd0 Dont show OOB uri if message body is the same
if oob uri == body there is no need to show the uri
below the message
2018-05-10 16:16:38 +02:00
Philipp Hörist ffe8ee8068 Return account instead of jid 2018-05-10 13:28:26 +02:00
Philipp Hörist 093ba8dd97 Provide method to get the account name from a jid 2018-05-10 10:53:56 +02:00
Philipp Hörist 2bb5d55c03 Add conversion from account_id to account jid
To use this alias `account_id` with `account`

Example: SELECT account_id as account FROM logs
2018-05-08 19:20:11 +02:00
Philipp Hörist 8b9eb59ee4 Set no-store hint on groupchat chatstates 2018-05-07 18:04:24 +02:00
Philipp Hörist 1ecf0ec008 Use NativeFileChoosers on Windows and MacOS
These platforms integrate a file preview in their native filechoosers
2018-05-06 09:17:58 +02:00
Philipp Hörist 913634c4c6 Add menu for uploading room avatars 2018-05-06 09:11:32 +02:00
Markus Wintermann e9a4b372e2 Select account in account list if edited
Before: After a rightclick -> "Modify Account" on an account in the
roster the preferences of the account are shown but the account is not
selected in the account list.
After: account will be selected in the account list too
2018-05-05 14:19:17 +02:00
Philipp Hörist c38db84e04 Refactor FileChooserDialogs
Use GtkFileChooserDialog only when we need previews, default to
NativeFileChooser otherwise.

GtkFileChooserDialogs have a long list of issues, so lets only use it
if we gain something from it.

Flatpak should only run NativeFileChoosers because its sandboxed and
this is needed for security purposes. As a result of that, Flatpak Users
dont have image previews in the FileOpenDialogs

Refactor all FileChoosers for a more simple approach when we use them

Add a new SendFileDialog, so we dont have to put widgets into the FileChooser
which forces non-native Dialogs.
2018-05-05 09:22:08 +02:00
Philipp Hörist bb33e055a5 Fix regression from refactoring
regression was introduced in e2383fd7a4
2018-05-02 22:38:07 +02:00
Philipp Hörist 497c710dd8 Remove unused Dialog
Using a FileChooserDialog for this is overkill, use FileChooserButton
in the future
2018-05-02 22:38:07 +02:00
Philipp Hörist 0f7097b7e0 Remove unused Dialog
This was nonfunctional for a long time and nobody complained
2018-05-02 22:38:07 +02:00
Philipp Hörist fc9d242f65 Refactor ManageSoundsWindow
- Move code into ui file
- Use FileChooserButton instead of FileChooserDialog
- Make methods private
- Simplify code
2018-05-02 22:38:07 +02:00
Marcin Mielniczuk ad4c1347ff Be more descriptive about the ascii_emoticons configuration option 2018-05-02 20:19:24 +02:00
Philipp Hörist ba08ddfef0 Remove not used Dialog
We use now a Gtk.FileChooserButton for client certs
2018-05-02 19:48:44 +02:00
Philipp Hörist bcf27cb3c1 Support for PKIX over Secure HTTP (POSH)
Fixes #9083
2018-05-01 21:08:26 +02:00
Philipp Hörist c534d3a147 Refactor SSL errors
Dont save fingerprints to config and check certs with our own methods.
We should trust openssl to do all necessary checks.

Self signed certs can be added to cacert.pem and will not show up as
an error until the cert changes.

nbxmpp now saves all ssl errors and passes them, so now we loop over
all errors until all are confirmed or ignored by the user

Also cacerts are now saved in utf-8
2018-05-01 14:03:20 +02:00
Philipp Hörist 779a4d4ce3 Get version from package instead of config 2018-05-01 00:37:13 +02:00
Marco Cirillo a937b0a5e2 servers.xml: re-add lightwitch.org as IBR was re-enabled. 2018-04-30 20:35:28 +02:00
Philipp Hörist 81952f6a7c Convert font weight from pango to css values
Fixes #9106
2018-04-30 17:43:32 +02:00