Commit graph libervia-backend/sat_frontends
Author SHA1 Message Date
Goffi
4cb56362ec bridge (dbus): new bridge_dbus_int_prefix option (in [DEFAULT] settings) to change interface prefix 2020-01-29 18:54:40 +01:00
Goffi
e1a44cf4e4 fixed shebangs 2020-01-29 10:07:00 +01:00
Goffi
a39349fe64 dates update 2020-01-29 09:50:54 +01:00
Goffi
af4320dfbe quick frontend (app): log own jid when received 2020-01-27 19:53:31 +01:00
Goffi
87659cf0f0 core (memory/params): added extra argument to filter out params notably in getParamsUI:
In some case, it may be desirable for a frontend to not expose some parameters to user
(e.g. it is the case on Android with the `autoconnect_backend` parameter). An new `extra`
parameter has been added to a couple of parameters method for that: it can contain the
`ignore` key with a list of [category, name] of parameters to skip.
2020-01-25 21:08:40 +01:00
Goffi
610a8ff10b jp (profile): added --autoconnect argument in modify and create + use output in info 2020-01-25 21:08:39 +01:00
Goffi
da3b7b5fea jp (common): various Table fixes:
- renamed fromDict to more accurate fromListDict
- fixed handling of None filter in fromListDict
- fixes show_header when no header exist
- escape headers when using namedtuple, so it won't fail
2020-01-25 21:08:37 +01:00
Goffi
9dc875550c quick frontend (app): call getReady once connected to bridge:
namespaces and encryption plugins are only retrieved once backend is ready, else they may
not yet be available (can happen notably when the backend is start at the same time as the
frontend, e.g. on Android).
2020-01-25 21:08:26 +01:00
Goffi
eca0f773cf quick frontend (widgets): don't use *args for onDelete + more debug logs 2020-01-17 20:27:35 +01:00
Goffi
d9e1ba8ce1 quick frontend (widgets): some more errors handling in getOrCreateWidget 2020-01-17 18:47:02 +01:00
Goffi
6bff1bdc33 quick frontend (widgets): fixed widget creation in getOrCreateWidget:
when a new widget was created, it was overwritting the exiting instances list. This patch
fixes it.
2020-01-17 17:55:57 +01:00
Goffi
6a18650a99 quick frontend (app): removed workaround for pyjamas 2020-01-17 15:27:39 +01:00
Goffi
f1372b6b94 quick frontend (widgets): added "widget_hash" helper property 2020-01-17 15:26:44 +01:00
Goffi
ced601a824 quick_frontend (widget): typo 2020-01-03 20:10:58 +01:00
Goffi
160739e50f frontends (tools/strings): added "geo:" scheme in RE_URL 2020-01-03 17:10:53 +01:00
Goffi
7dd0df7f41 core, bridge: encryptionPluginsGet now returns a serialised list + added "directed" in metadata 2019-12-30 20:44:04 +01:00
Goffi
efe52d755d plugin XEP-0045: added room statuses to metadata:
room statuses are now sent with other metadata on bridge signals, and saved in Room
instance. They give useful data on the room, for instance they can be used to know if a
full jid is used in this room.
2019-12-30 20:44:02 +01:00
Goffi
b7a74d5034 plugin XEP-0060, jp (pubsub/set): publish-options implementation:
- publishing options (XEP-0060 §7.1.5) implementation.
- jp pubsub/set can specify publish-options using `-f` and `-F`
- doc has been updated to explain that
- psItemSend and psItemsSend now use serialisation for "extra"
- publish-options can be specified in extra['publish-options'] with those methods
2019-12-28 20:02:18 +01:00
Goffi
1eee84c8f3 jp (blog): added --language to common publish argument 2019-12-20 14:23:42 +01:00
Goffi
2d49de9209 jp (file): new get command + encryption with upload:
- new file/get command let download a file from URL. It handles `aesgcm:` scheme by
thanks to backend decryption on the fly.
- new `--encrypt` option for upload. When used, the file will be encrypted using AES-GCM
  algorithm, and the `aesgcm:` URL will be returned
- for both commands, the XMLUI note is displayed in case of error
2019-12-20 12:28:04 +01:00
Goffi
5c1dd0da49 jp (xmlui_manager): use level for notes:
display notes in specific colors according to level, and use stderr for warnings and
errors.
2019-12-20 12:28:04 +01:00
Goffi
edbee4d719 plugin upload, XEP-0363: code modernisation + preparation for extension:
- use of async/await syntax
- fileUpload's options are now serialised, allowing non string values
- (XEP-0363) Slot is now a dataclass, so it can be modified by other plugins
- (XEP-0363) Moved SSL related code to the new tools.web module
- (XEP-0363) added `XEP-0363_upload_size` and `XEP-0363_upload` trigger points
- a Deferred is not used anymore for `progress_id`, the value is directly returned
2019-12-20 12:28:04 +01:00
Goffi
6bf470ea9f quick frontend(chat): store filters used with initial historyGet 2019-11-18 22:34:13 +01:00
Goffi
4f4c4448ee quick frontend(app): catch exception when trying to remove a missing listener, and log it 2019-11-18 22:34:13 +01:00
Goffi
adf7621495 quick frontend (chat): removed hack not needed anymore now that Pyjamas is not used anymore 2019-11-08 11:56:21 +01:00
Goffi
7f66a2f154 jp (file/upload): fixed exception when no jid is specified 2019-11-08 11:47:42 +01:00
Goffi
93a4e488ea core: added imageCheck and imageResize methods:
imageCheck will give a report on image, notably it will tell if it's too big and needs to
be resized before a transfer.

imageResize will create a new image with the requested size and return a path to it.
2019-10-29 20:38:39 +01:00
Goffi
fb2dc9b7a0 quick frontend (contact list): added "contactsFilled" event 2019-10-29 20:24:29 +01:00
Goffi
24aa7d2e38 bridge (pb): added missing _generic_errback 2019-10-21 23:06:30 +02:00
Goffi
4e9b0f0d54 jp: default to "dark" if background is not set and can't be detected 2019-10-03 22:17:19 +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
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
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
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
b8e9212b8d jp (common): fixed draft path use in BaseEdit 2019-08-26 09:14:58 +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
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
1c862e7c3f primitivus: fixed status popup's cancel button
fix 329
2019-07-17 09:28:34 +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
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
Goffi
fb58a375f8 jp (blog/preview): fixed watch restoring when file is moved/deleted:
with some editors (e.g. vim), when file is written it is actually replaced with a buffered
one. In this case, jp replace the watch to check the new file, but it was not working
anymore with latest version of inotify module. This patch fixes it by removing the old watch
before adding a new one.
2019-07-12 11:29:05 +02:00
Goffi
1e327c01e1 Backed out changeset cf0dda0d4cda
check_output can't be used as it's waiting for command to return, blocking the edition.
2019-07-12 09:04:45 +02:00
Goffi
a6b4c9c56a jp (blog/edit): fail and show error message if --preview is not working 2019-07-12 08:55:41 +02:00
Goffi
80be7cddb9 frontends (xmlui): fixed crash when CURRENT_LABEL is None:
fix 323
2019-07-11 09:21:10 +02:00