Commit graph

561 commits

Author SHA1 Message Date
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
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
b3162f400c Detect if we run as flatpak
Fixes #9110
2018-05-21 19:17:47 +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
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
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
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
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
913634c4c6 Add menu for uploading room avatars 2018-05-06 09:11:32 +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
Marcin Mielniczuk
ad4c1347ff Be more descriptive about the ascii_emoticons configuration option 2018-05-02 20:19:24 +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
06c4ce60b9 Show correct account lable in tooltip
Fixes #9065
2018-04-29 23:47:30 +02:00
Philipp Hörist
56a5d01609 Dont allow plain BOSH by default 2018-04-29 23:34:46 +02:00
Philipp Hörist
b8554e3e22 Jingle: Check first if we have a content
Fixes #9094
2018-04-29 23:30:08 +02:00
Philipp Hörist
707599dd86 Dont determine paths at module import time 2018-04-25 21:26:02 +02:00
Philipp Hörist
8c23d5a4b5 Move some imports 2018-04-25 21:24:05 +02:00
Philipp Hörist
105427b8fd Use consistent way to get paths
This lets us now import the app module without setting paths
2018-04-25 20:49:37 +02:00
Philipp Hörist
52cbae69ee Refactor Gajim startup
Remove as much as possible startup code from GtkApplication to stay
more true to our goal to separate GUI from the rest of Gajim
2018-04-25 19:16:38 +02:00
Philipp Hörist
e2383fd7a4 Refactor i18n module
- Move everything translation related from gajim.py to i18n.py
2018-04-24 23:03:19 +02:00
Philipp Hörist
21d4d0cb1e Remove unused import / codestyle
Pass args to logging method instead of string formatting
2018-04-24 21:34:53 +02:00
Philipp Hörist
e265514d88 Detect dependencys only on demand
This allows us to import the app module without triggering
dependency detection

Also add is_installed() for checking if a dependency is installed and
disable_dependency() in case we dont want to use a dependency
2018-04-24 19:36:33 +02:00
Philipp Hörist
986898f69d Dont check for OpenSSL we require it on install 2018-04-23 23:47:17 +02:00
Philipp Hörist
5ee45b86e9 Refactor database migration
- Move database migration to the logger module
- Dont depend on Gajim version for migration use PRAGMA user_version
- Refactoring of some methods in the logger module
- Dont use cursor object, if there is no reason
- Make some attributes and methods private
2018-04-23 21:27:01 +02:00
Philipp Hörist
4c1bfda48d Fix const imports 2018-04-23 18:32:01 +02:00
Philipp Hörist
4f2033faff Move constants into const module 2018-04-23 18:23:57 +02:00
Philipp Hörist
86bfc81ad3 Remove old unused migration method 2018-04-23 17:34:14 +02:00
Philipp Hörist
3efa731fbf Add stanza_id index also when we create the DB 2018-04-23 00:10:35 +02:00