Commit graph libervia-backend/frontends/src/primitivus
Author SHA1 Message Date
Goffi
d8b9c85cc0 core (menus): improvments:
- use the new convention for bridge names (getMenus ==> menusGet, etc.)
    - menu now use canonical path, which is the untranslated path with each element stripped and lowercase, it must be unique by menu type
    - added menuLaunch method to manually launch a menu like an action, canonical path is used instead of id
    - added SECURITY_LIMIT_MAX constant
2017-01-26 20:29:48 +01:00
Goffi
4eaf5d626f plugin XEP-0054, quick frontend(app): various improvments:
- memory.cache is now used
    - getAvatar and setAvatar has been renamed to avatarGet and avatarSet to follow new convention
    - getAvatar now return (optionally) full path, and may request vCard or only return avatar in cache
    - getAvatarFile has been removed as it is not needed anymore (avatarGet can return full path)
    - getCard has been removed from bridge as it was only used to request avatar
    - new internal method getBareOfFull return jid to use depending of the jid being part of a MUC or not
    - cache is now set per profile in client, instead of a general one for all profiles
    - thanks to the use of memory.cache, correct extension is now used in saved file, according to MIME type
    - fixed and better cache handling
    - a warning message is shown if given avatar hash differs from computed one
    - empty hash value is now in a constant, and ignored if received
    - QuickApp has been updated to follow new behaviour
    - Primitivus has been fixed (it was not declaring not using avatars correclty)
    - jp has been updated to follow new methods name
2017-01-15 17:51:37 +01:00
Goffi
f237685c1a Primitivus (xmlui): use constants for BOOL_TRUE and BOOL_FALSE value 2016-12-20 21:06:42 +01:00
Goffi
0a5fd6f3f4 primitivus, jp: dynamic bridge + fixed D-Bus bridge:
Primitivus and jp can now load the bridge specified in sat.conf, but they are only working with D-Bus so far (need to change all sync calls to async).
    Exit code 3 is used for Bridge init error.
2016-12-18 16:28:51 +01:00
Goffi
372f54ec2a bridge (D-Bus): bad design fixes:
- renamed outputed module to dbus_bridge (to avoid uppercase and conflict with dbus module)
    - class name is now Bridge for both frontend and core (make discovery/import more easy)
    - register renamed to register_method in core, and register_signal in frontend
2016-10-03 21:15:39 +02:00
Goffi
bb9e22c020 quick_frontend, primitivus (chat): renamed updated to update, using a dict as argument + fixed Primitivus group chat 2016-09-15 21:58:35 +02:00
Goffi
78750cb265 quich frontend, primivius (chat): better avatar handling:
- new getAvatar method in QuickApp which request vCard if avatar if needed and return default avatar is no avatar is found
    - frontends based on quick frontend can now specify if they handle avatar or not using AVATARS_HANDLER
    - when avatar is updated, occupant widget(s) and all message widget(s) of the concerned entity are updated
2016-09-09 23:54:33 +02:00
Goffi
55357178ef core, bridge, frontends: removed deprecated bridge method askConfirmation, confirmationAnswer, actionResult, actionResultExt and getWaitingConf 2016-08-28 19:23:58 +02:00
Goffi
56211b33c6 primitivus, quick frontend (chat): moved time text generation to QuickChat 2016-08-08 21:05:04 +02:00
Goffi
2d468f9e94 quick frontends, primitivus: messageState signal handling 2016-08-02 23:11:44 +02:00
Goffi
c0e4960c55 primitivus (chat): added :topic (and :subject and :title aliases) to change subject with a dialog (/!\ urwid SàText need to be updated) 2016-07-24 19:00:50 +02:00
Goffi
82a12186ea quick frontend, primitivus (chat, contact_list): fixed MUC private messages handling:
- occupants can be clicked again
    - QuickChat.Occupant now keep room jid and real jid if available
    - history messages are filtered correctly when requesting history for MUC room or private conversation
2016-07-24 18:07:45 +02:00
Goffi
9f853cd774 quick_frontend, primitivus (chat): fixed widget bad locking + don't send notification when locked 2016-07-24 17:59:24 +02:00
Goffi
9456417949 quick_frontend, primitivus (contact_list): ContactList widget must now call postInit() when ready, to avoid being registered before being constructed 2016-07-24 17:56:18 +02:00
Goffi
e32bd443a3 quick_frontend, primitivus: better notifications handling 2016-07-24 17:56:14 +02:00
Goffi
57daef07a7 quick_frontend, primitivus (contact_list): improved and simplified handling of "special" entities:
- special_extras has been removed
    - specials handle all entities (bare + full) in a single set
2016-07-24 17:47:09 +02:00
Goffi
9647e90943 backend (memory), frontends: improved history filtering:
a "filters" dictionnary is now use to filter, it can have, for now, filtering on:
        - "body": filter only on the body (equivalent to former "search" parameter, but not case sensitive)
        - "search": fitler on body + source resource
        - "types": allowed types
        - "not_types": forbidden types

    primitivus now do searching using "search", i.e. source resource is now taken into account (and search is now case insensitive)
2016-07-18 00:52:02 +02:00
Goffi
6422e8733d primitivus: dont call chatStateComposing where history keys are pressed 2016-07-17 19:44:15 +02:00
Goffi
2368e68c37 primitivus (chat): don't send notification for move messages 2016-07-17 17:59:14 +02:00
Goffi
73a8db4e64 primitivus, quick_frontends: show global notifications counter in contact_list + method to get these notifications in QuickApp 2016-07-17 17:32:46 +02:00
Goffi
8c9161bc87 primitivus: fixed notifications counter for simple messages in MUC rooms 2016-07-17 17:12:42 +02:00
Goffi
cc160e03d7 plugin XEP-0085, quick_frontends, primitivus: chat states are working again 2016-07-17 16:47:33 +02:00
Goffi
0a197cab88 quick_frontend, primitivus: moved main_message property to quick_frontend 2016-07-10 12:26:13 +02:00
Goffi
a3feb39a59 primitivus: fixed XMLUI window creation
newWidget method was not working if a widget was already selected, breaking all XMLUI with window type.
2016-07-01 00:02:28 +02:00
Goffi
bd46cb609e primitivus (chat): fixed a crash when page-up was pressed on room contacts list 2016-07-01 00:00:12 +02:00
Goffi
6b75a82f04 primitivus (chat): moved occupants widget to a dedicated class + display occupants count in footer 2016-07-01 00:00:11 +02:00
Goffi
edfdc06654 merged main branch 2016-06-28 18:37:29 +02:00
Goffi
dc69b62b16 primitivus: paste is now treated as normal text instead of discarded if edit_bar doesn't exist 2016-06-28 18:32:57 +02:00
Goffi
a16d8bfc01 primitivus (chat): mention is now visible by date in red instead of body (or a "[*]" if date is hidden) 2016-06-28 18:31:08 +02:00
Goffi
2e204f182a primitivus (chat): fixed timestamp/nick (un)hiding + new redraw and printMessages methods 2016-06-28 18:29:56 +02:00
Goffi
4afff0d837 merged main branch 2016-06-27 22:49:36 +02:00
Goffi
aace5a2520 quick_frontend, primitivus (chat): mention detection in group chat + notification (mention and messages) 2016-06-27 22:37:51 +02:00
Goffi
b388d2b172 quick_frontend, primitivus: notifications refactoring
replaced old "alerts" system by a more generic one which use listeners and can activate callbacks on notification click.
2016-06-27 22:36:22 +02:00
Goffi
604706eb9c primitivus: ignore paste if edit bar is not selected 2016-06-27 22:04:55 +02:00
Goffi
22d70f23c4 primitivus (chat): fixed nick completion. Completion is now managed per widget, if completion method exists 2016-06-27 21:45:13 +02:00
Goffi
04515e5013 plugin XEP-0045, quick_frontend + primitivus (chat): cleaning of XEP-0045 (first pass):
- bridge methods/signals now all start with "muc" to follow new convention
    - internal method use client instead of profile to follow new convention
    - removed excetpions from plugin XEP-0045 in favor of core.exceptions, NotReady added
    - cleaned/simplified several part of the code. checkClient removed as it is not needed anymore
    - self.clients map removed, muc data are now stored directly in client
    - getRoomEntityNick and getRoomNicksOfUsers are removed as they don't look sane.
        /!\ This break all room game plugins for the moment
    - use of uuid4 instead of uuid1 for getUniqueName, as host ID and current time are used for uuid1
2016-06-27 21:45:11 +02:00
Goffi
a28bb7be8f merged main branch 2016-06-24 22:41:28 +02:00
Goffi
be443a043f primitivus (chat): fixed filters clearing when changing filter while one already exists 2016-06-20 23:07:53 +02:00
Goffi
e784c1694c primitivus: basic handling of filter, only language can filtered for now 2016-06-20 19:19:16 +02:00
Goffi
a7de473107 backend, frontends: message refactoring (huge commit):
/!\ several features are temporarily disabled, like notifications in frontends

next step in refactoring, with the following changes:
    - jp: updated jp message to follow changes in backend/bridge
    - jp: added --lang, --subject, --subject_lang, and --type options to jp message + fixed unicode handling for jid
    - quick_frontend (QuickApp, QuickChat):
        - follow backend changes
        - refactored chat, message are now handled in OrderedDict and uid are kept so they can be updated
        - Message and Occupant classes handle metadata, so frontend just have to display them
    - Primitivus (Chat):
        - follow backend/QuickFrontend changes
        - info & standard messages are handled in the same MessageWidget class
        - improved/simplified handling of messages, removed update() method
        - user joined/left messages are merged when next to each other
        - a separator is shown when message is received while widget is out of focus, so user can quickly see the new messages
        - affiliation/role are shown (in a basic way for now) in occupants panel
        - removed "/me" messages handling, as it will be done by a backend plugin
        - message language is displayed when available (only one language per message for now)
        - fixed :history and :search commands
    - core (constants): new constants for messages type, XML namespace, entity type
    - core: *Message methods renamed to follow new code sytle (e.g. sendMessageToBridge => messageSendToBridge)
    - core (messages handling): fixed handling of language
    - core (messages handling): mes_data['from'] and ['to'] are now jid.JID
    - core (core.xmpp): reorganised message methods, added getNick() method to client.roster
    - plugin text commands: fixed plugin and adapted to new messages behaviour. client is now used in arguments instead of profile
    - plugins: added information for cancellation reason in CancelError calls
    - plugin XEP-0045: various improvments, but this plugin still need work:
        - trigger is used to avoid message already handled by the plugin to be handled a second time
        - changed the way to handle history, the last message from DB is checked and we request only messages since this one, in seconds (thanks Poezio folks :))
        - subject reception is waited before sending the roomJoined signal, this way we are sure that everything including history is ready
        - cmd_* method now follow the new convention with client instead of profile
        - roomUserJoined and roomUserLeft messages are removed, the events are now handled with info message with a "ROOM_USER_JOINED" info subtype
    - probably other forgotten stuffs :p
2016-06-20 18:41:53 +02:00
Goffi
f12803fa65 backend, frontend: messages refactoring (huge commit, not finished):
/!\ database schema has been modified, do a backup before updating

    message have been refactored, here are the main changes:

    - languages are now handled
    - all messages have an uid (internal to SàT)
    - message updating is anticipated
    - subject is now first class
    - new naming scheme is used newMessage => messageNew, getHistory => historyGet, sendMessage => messageSend
    - minimal compatibility refactoring in quick_frontend/Primitivus, better refactoring should follow
    - threads handling
    - delayed messages are saved into history
    - info messages may also be saved in history (e.g. to keep track of people joining/leaving a room)
    - duplicate messages should be avoided
    - historyGet return messages in right order, no need to sort again
    - plugins have been updated to follow new features, some of them need to be reworked (e.g. OTR)
    - XEP-0203 (Delayed Delivery) is now fully handled in core, the plugin just handle disco and creation of a delay element
    - /!\ jp and Libervia are currently broken, as some features of Primitivus

    It has been put in one huge commit to avoid breaking messaging between changes.
    This is the main part of message refactoring, other commits will follow to take profit of the new features/behaviour.
2016-05-24 22:11:04 +02:00
Goffi
8851addc20 quick frontend, primitivus: quickContactList refactored to handle several profiles at once 2016-04-18 18:31:13 +02:00
Goffi
6bbcbaf522 use of /usr/bin/env instead of /usr/bin/python in shebang 2016-04-17 14:45:26 +02:00
Goffi
645ade7e73 primitivus: fixed window resize (was blocked by paste detection) 2016-04-23 23:46:35 +02:00
Goffi
724fa7541a primitivus: added bracketed_paste option in sat.conf (if set, the bracketed paste mode will be activated on Primitivus start) 2016-04-23 01:28:35 +02:00
Goffi
0d3a96a8da primitivus: bracketed paste mode is now detected 2016-04-23 00:31:59 +02:00
Goffi
6c30009ef8 primitivus: fixed paste detection/handling:
- mouse and window events are discarded
    - input_ is used to get text
    - cursor position is used to paste buffer in the good place, and updated once finished
2016-04-22 22:30:13 +02:00
Goffi
6dd58f0878 primitivus: paste is now detected, and put in edit bar, so use can check and validate it 2016-04-21 20:20:40 +02:00
Goffi
bc371c5569 primivitus: Primivitus doesn't handle microblog yet, configure QuickApp accordingly 2016-01-13 18:55:30 +01:00
souliane
923dcc593d primitivus (chat): since dialog refresh is done in message notification, print the message first and then notify 2016-01-13 08:50:40 +01:00