Commit graph

3,050 commits

Author SHA1 Message Date
Goffi
84ebd0a241 doc (jp/common_arguments): updated note about --pwd 2019-10-01 22:54:18 +02:00
Goffi
36ccde03b9 jp: password is now prompted if needed:
if password is not specified on command line, it is now prompted if it is needed to start
a profile session or connect it. The password is prompted with echo disabled, so somebody
seing the computer screen can't see the password.

fix 207
2019-10-01 22:49:11 +02:00
Goffi
5fbbd75f9f changelog: update 2019-10-01 22:49:11 +02:00
Goffi
5a2d7e2943 jp (debug): new "theme" command to print colour theme according to background value:
fix 321
2019-10-01 22:49:11 +02:00
Goffi
1efb60a429 jp: dark and light theme:
- `background` setting can now be used in sat.conf to indicate if the terminal use a
  `dark` or a `light` colour
- if `background` is not set or set to `auto`, the background colour is autodetected
- Jp.get_config (or CommandBase.get_config) method can now be used to retrieve a setting
2019-10-01 22:49:10 +02:00
Goffi
d4bf063788 tools (common): helping method to calculate luminance:
- a new `utils` module has been added for backend and frontends generic utilities
- per_luminance method calculate the perceived luminance of a colour (is it dark or
  light?). This is useful to automatically select the suitable colour in a theme.
2019-10-01 22:49:10 +02:00
Goffi
310ce2eb13 core (patches): updated TLS patches:
- updated patches to handle TLS after implementation in Twisted 19.7.0. A patch is still
  needed for Wokkel.
- minimum required version of Twisted is now 19.7.0
2019-10-01 22:49:10 +02:00
Goffi
c61f6237a4 jp: handle dbus bridge with asyncio:
D-Bus bridge is now working again, using the new AsyncIO version. To make it work, the
GLib loop is run in a separated thread.

Loops have been moved to the `loops` module.
2019-10-01 22:49:10 +02:00
Goffi
92cb7ed130 bridge (dbus): AsyncIO version of D-Bus bridge:
The frontends D-Bus bridge has now an AIOBridge version which can be instantiated to use asyncio (the loop must be managed by frontends).
2019-10-01 22:49:10 +02:00
Goffi
7bfa63a751 doc (jp): jp commands are now fully documented:
rel 232
2019-10-01 22:49:06 +02:00
Goffi
76aadbb3fb jp: jp asyncio port:
/!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\

This patch implements the port of jp to asyncio, so it is now correctly using the bridge
asynchronously, and it can be used with bridges like `pb`. This also simplify the code,
notably for things which were previously implemented with many callbacks (like pagination
with RSM).

During the process, some behaviours have been modified/fixed, in jp and backends, check
diff for details.
2019-09-25 08:56:41 +02:00
Goffi
5cee4fbab7 bridge (pb): implemented an asyncio compatible bridge:
`pb` bridge can now be used with asyncio by instantiating AIOBridge.
2019-09-25 08:53:38 +02:00
Goffi
e87c07b200 common (template): suppress jinja2 depreaction warning (to be removed once 2.10.1 is released) 2019-09-25 08:41:36 +02:00
Goffi
b8e9212b8d jp (common): fixed draft path use in BaseEdit 2019-08-26 09:14:58 +02:00
Goffi
2b062e9cde install (setup.py): updated classifiers 2019-08-25 12:16:18 +02:00
Goffi
c9574e2b87 install (setup.py): updated python_requires 2019-08-25 09:53:03 +02:00
Goffi
a2ce271498 tools (common/email): fixed email sending after python 3 port 2019-08-16 17:06:52 +02:00
Goffi
4b2d53b797 tools (async_process): log command as str 2019-08-16 17:06:51 +02:00
Goffi
b00ea1546c plugin XEP-0329: fixed ShareNode item() and values after Python 3 port 2019-08-16 17:06:44 +02:00
Goffi
b039dc4572 tools (config), memory: renamed SafeConfigParser following Python 3 port 2019-08-16 17:06:43 +02:00
Goffi
155d75bf32 install (manifest): fixed old paths which where still used 2019-08-16 14:14:19 +02:00
Goffi
8495c9b0a5 doc: replaced deprecated installation link in INSTALL 2019-08-14 08:08:25 +02:00
Goffi
fbfe96c505 Python 3 port:
/!\ this is a huge commit
/!\ starting from this commit, SàT is needs Python 3.6+
/!\ SàT maybe be instable or some feature may not work anymore, this will improve with time

This patch port backend, bridge and frontends to Python 3.

Roughly this has been done this way:

- 2to3 tools has been applied (with python 3.7)
- all references to python2 have been replaced with python3 (notably shebangs)
- fixed files not handled by 2to3 (notably the shell script)
- several manual fixes
- fixed issues reported by Python 3 that where not handled in Python 2
- replaced "async" with "async_" when needed (it's a reserved word from Python 3.7)
- replaced zope's "implements" with @implementer decorator
- temporary hack to handle data pickled in database, as str or bytes may be returned,
  to be checked later
- fixed hash comparison for password
- removed some code which is not needed anymore with Python 3
- deactivated some code which needs to be checked (notably certificate validation)
- tested with jp, fixed reported issues until some basic commands worked
- ported Primitivus (after porting dependencies like urwid satext)
- more manual fixes
2019-08-13 19:08:41 +02:00
Goffi
d21a6a660f 0.8 development starts 2019-07-31 11:31:22 +02:00
Goffi
d6b06d33f4 Added tag 0.7.0 for changeset c7138e913213 2019-07-24 20:05:00 +02:00
Goffi
541477d234 0.7.0 « La Commune » release 2019-07-24 19:47:30 +02:00
Goffi
89f3756834 install: added doc to MANIFEST.in 2019-07-24 19:54:29 +02:00
Goffi
633e1eb203 plugin XEP-0313: log issues in addToHistory instead of raising error 2019-07-24 07:51:48 +02:00
Goffi
f627edaabe doc: some corrections:
- added missing `tls_private_key` value in configuration sample
- added a label for `installation`
- removed useless repetition of "Salut à Toi" in overview title
- changed text for jp and primitivus documentations links
- use a better may to indicate keyboard shortcuts in Primitivus
2019-07-24 07:51:07 +02:00
Goffi
efcaedcc49 doc: added, overview, configuration and Primitivus documentation + some small modifications 2019-07-21 22:14:30 +02:00
Goffi
200ee13a97 plugin XEP-0198: don't crash if transport is None in onAckTimeOut 2019-07-21 10:16:32 +02:00
Goffi
5e051ddb20 plugin XEP-0198: catch and log an error if buffer is unexpectedly empty 2019-07-20 20:55:17 +02:00
Goffi
303f82d012 plugin android: catch and log exception when using the vibrator:
vibrator is currently not working with plyer, this patch avoid a crash and log the issue.

rel 332
2019-07-20 20:53:52 +02:00
Goffi
cf83f04af4 quick frontend (app): show an info log if avatar is not found instead of raising exception
fix 288
2019-07-20 16:03:28 +02:00
Goffi
d2064fc175 core: fixed handling of button callback in popups:
Button use themselve as callback, and this was causing troubles in the removePopUp method.
This patch work around this by considering a Button widget in the same way as None (we
never use Button directly in popups).

fix 183
2019-07-19 23:04:35 +02:00
Goffi
adc5204b1a plugin XEP-0045: fixed a bad attribute in a log message. 2019-07-19 23:01:57 +02:00
Goffi
9487b0534b plugin ad-hoc D-Bus: fixed warning when no media player is found 2019-07-19 17:07:56 +02:00
Goffi
420bc6bcfe memory (sqlite): properly wait for messages to be writen in database:
the deferreds of the queries writing message to databases where not gathered and returned,
so the caller was not waiting for them to continue its workflow. This was resulting in
messages not always written when database was read just after the write (a case common
with MUC implementation), and message was appearing empty when sent to bridge.

fix 328
2019-07-18 21:58:34 +02:00
Goffi
72c91471c1 memory (disco): fixed boolean to string conversion 2019-07-18 20:26:49 +02:00
Goffi
6f5718a045 plugin XEP-0198: retrieve missing messages + send buffered ones on hot reconnection:
Missing one2one messages are now retrieved with MAM on hot reconnection, and buffered ones
(which have most probably not been received by the server) are resent at the end of the
reconnection workflow. IQ results are not re-sent on hot reconnection, as they don't make
sense anymore with a new session.

fix 330
2019-07-17 09:28:35 +02:00
Goffi
1c862e7c3f primitivus: fixed status popup's cancel button
fix 329
2019-07-17 09:28:34 +02:00
Goffi
a6b9873462 plugin adhoc D-Bus: typo 2019-07-17 09:28:33 +02:00
Goffi
9e2a35f6e5 plugins XEP-0045, XEP-0198: rejoin MUC rooms while a hot reconnection is done:
when resuming is not possible with stream management, a hot reconnection is done
(reconnecting without restarting every plugin). This was causing trouble for joined MUC
rooms, which were not accessible anymore (because they were not re-joined).
This patch fixes it by clearing rooms first (to avoid considering the room joined and
broadcasting the initial presence to them), then re-joining them.

fix 322
2019-07-16 21:59:30 +02:00
Goffi
cb85f61fe4 plugins account, email invitation: fixed import of "email" module after it has been moved 2019-07-15 22:36:28 +02:00
Goffi
36f87054d1 quick frontends (app): setSpecial is now called before getOrCreateWidget in mucRoomJoinedHandler:
this avoid a issue in Primitivus where the contact list selection is done
before the room is actually added to the contact list.
2019-07-14 21:19:47 +02:00
Goffi
3b21a727dd primitivus: better popup sizing:
- showPopUp now takes absolute height and width, this makes more sense than the relative
  ones used before
- if height or width is not set, a default is used which depend of the type of the widget
  (it's smaller if the widget is a note)
- size is set to a low value for widget alerts
- size is bigger else

fix 324
2019-07-14 20:42:14 +02:00
Goffi
8fc78a71f0 primitivus: select the widget even if an other one is selected when the selection comes from an user action:
new `user_action` arguments has been added to newWidget to specify when the new widget
comes from a direct user action.
2019-07-14 20:38:34 +02:00
Goffi
4743b1c840 plugin XEP-0054: reject image without MIME type if it's not PNG 2019-07-14 16:43:04 +02:00
Goffi
692a5b34fc plugin 0249: fixed invitation handling + some improvments:
- properly retrieve payload by namespace
- now use a trigger instead of observer, so the message workflow is stopped if an invitation is found
- namespace is registered

fix 241
2019-07-14 11:23:25 +02:00
Goffi
7459275a68 primitivus: don't focus on new widget if one is already selected:
new widgets were getting focus even when one was already selected.

fix 326
2019-07-14 11:23:23 +02:00