Commit graph libervia-backend/frontends/src/quick_frontend/quick_app.py
Author SHA1 Message Date
souliane
ff0166e95f quick_frontend, primitivus: various fixes (MUC and cached signals):
- actually call the cached signals, everything was there but the call was not done
    - display '[]' instead of '[None]' when group message coming from the room (no resource)
    - catch the exception when trying to delete an occupant who's not in the room
    - do not cache a "main resource" for MUC entities
2015-03-25 15:25:51 +01:00
souliane
9071298061 quick_frontend: better PEP-8 compliance 2015-03-25 15:21:17 +01:00
souliane
78f14091b1 quick_frontend, primitivus: remove QuickChat.updateEntityState and QuickChat.setContactStates, use more general QuickChat.update (also called when joining the room to initialise the occupants list) 2015-03-24 17:31:08 +01:00
souliane
5c1fe63580 quick_frontend, primivitus: remove QuickChat.getUserNick + primivitus ChatText gets the user nick directly from parent Chat instance 2015-03-23 15:38:32 +01:00
souliane
6dc8b211bf quick_frontend, primitivus: better PEP-8 compliance + remove/rename some (Quick)Chat attributes:
- remove QuickChat.id, use QuickChat.target instead
    - rename Chat.present_panel to Chat.occupants_panel
    - rename Chat.present_wid to Chat.occupants_list
2015-03-22 14:20:19 +01:00
souliane
29ffc8a544 plugin XEP-0085, quick_frontend: fixes chat states 2015-03-20 17:47:48 +01:00
souliane
14f4b4b8ec quick_frontends, primitivus: move the chat states logic to quick_frontend 2015-03-20 16:28:19 +01:00
souliane
c6419871ac quick_frontends, primitivus: know who are the MUC occupants from the presence informations:
- QuickChat.occupants is now a property using cached information
    - some MUC handlers are no more needed, the presence handler is enough
2015-03-20 16:25:38 +01:00
Goffi
76065758df renamed tools.misc to tools.trigger 2015-03-19 19:44:37 +01:00
Goffi
80e65d5b84 core, quick_frontends: added an "extra" item in getMenus + use of new quick_menus module in QuickApp 2015-03-17 19:33:05 +01:00
Goffi
991a2cbf33 quick_frontends: added "menu" listeners, which is called when a menu is added or removed. 2015-03-17 19:33:04 +01:00
souliane
b76d829249 quick_frontend, primitivus (chat): pass a sorted list to Chat.setPresents 2015-03-11 20:06:13 +01:00
souliane
e597a804d9 frontends (quick_frontend, primitivus): fixes room games:
- add quick_frontend.quick_games for registering the signals and registering the UI classes
    - rename the signals handlers to fit the convention (e.g.: tarotGameScoreHandler)
    - rename card_game to game_tarot, quick_card_game to quick_game_tarot, CardGame to TarotGame
2015-03-11 12:43:48 +01:00
souliane
6336e629c0 quick_frontend: register the 'personalEvent' signal 2015-03-06 14:22:49 +01:00
souliane
728d264136 quick_frontend: replace last occurences of QuickApp.chat_wins with QuickApp.widgets 2015-03-05 13:48:49 +01:00
souliane
16cdbbbe1f frontends: add listeners 'profilePlugged', 'disconnect' and 'gotMenus' (the last one to be removed when the menus are refactored to quick_app) 2015-03-03 22:17:57 +01:00
souliane
5d1681de93 frontends (QuickApp), tools (TriggerManager): frontends can also use triggers + add those for sending and receiving a message 2015-03-03 15:05:10 +01:00
Goffi
3ed295e7b1 quick frontends: signal cache: if a signal arrives between the beginning of profile plugging, and the when the profile is actually ready, it is cached and replayed when the profile is ready. 2015-02-24 20:29:57 +01:00
Goffi
8f5b116211 quick_frontends, primitivus (contact list): added nick observer + implemented onNickUpdate 2015-02-24 17:14:10 +01:00
Goffi
d1dad92f8c quick frontends, primitivus: fixed listener calls (kwargs where forgotten) + fixed presence listener + renamed updatePresence to onPresenceUpdate for consistency with oter listeners 2015-02-24 16:52:44 +01:00
Goffi
3d568ab9c8 quick frontends: fixed use of profile for listeners 2015-02-24 14:40:19 +01:00
Goffi
27c26487c3 merged souliane changes 2015-02-23 18:08:22 +01:00
Goffi
288aaca7e8 primitivus, quick_frontends: moved newMessage signal handler to quick_frontend 2015-02-23 18:04:25 +01:00
souliane
b836fef4dd quick_frontend, primitivus: use a listener to update the contact list when receiving a presence 2015-02-22 21:30:20 +01:00
souliane
8c46a23869 quick_frontend (quick_app): addListener takes a profiles_filter argument to check the profile before calling a listener (profile must be passed right after the event type in callListeners) 2015-02-22 20:39:33 +01:00
souliane
ed8821d54b quick_frontend: add a 'presence' listener for the 'presenceUpdate' signal 2015-02-22 15:11:29 +01:00
souliane
fa8f119a56 quick_frontend (quick_app): fixes the call to a bridge method that was done with a JID instead of unicode 2015-02-22 13:58:33 +01:00
souliane
b5d70cbe34 core, quick_frontends: fixes one typo and a variable naming issue 2015-02-21 17:22:39 +01:00
souliane
269e2a7c8b frontends (quick_frontend): fixes a typo (listerner --> listener) 2015-02-20 22:06:13 +01:00
Goffi
01364793ed quick frontends(quick app): add a listeners (observer/observable) mechanism to call a callback when a event happen. Implemented an "avatar" event. 2015-02-09 21:39:51 +01:00
Goffi
b705b5688f frontends (quick frontend): use of new getEntitiesData to get cached values for avatars on profile connection. 2015-02-09 21:39:51 +01:00
Goffi
8ce5c1862b core, frontends: refactoring to base Libervia on QuickFrontend (big mixed commit):
/!\ not finished, everything is still instable !
    - bridge: DBus bridge has been modified to allow blocking call to be called in the same way as asynchronous calls
    - bridge: calls with a callback and no errback are now possible, default errback log the error
    - constants: removed hack to manage presence without OrderedDict, as an OrderedDict like class has been implemented in Libervia
    - core: getLastResource has been removed and replaced by getMainResource (there is a global better management of resources)
    - various style improvments: use of constants when possible, fixed variable overlaps, import of module instead of direct class import
    - frontends: printInfo and printMessage methods in (Quick)Chat are more generic (use of extra instead of timestamp)
    - frontends: bridge creation and option parsing (command line arguments) are now specified by the frontend in QuickApp __init__
    - frontends: ProfileManager manage a more complete plug sequence (some stuff formerly manage in contact_list have moved to ProfileManager)
    - quick_frontend (quick_widgets): QuickWidgetsManager is now iterable (all widgets are then returned), or can return an iterator on a specific class (return all widgets of this class) with getWidgets
    - frontends: tools.jid can now be used in Pyjamas, with some care
    - frontends (XMLUI): profile is now managed
    - core (memory): big improvment on entities cache management (and specially resource management)
    - core (params/exceptions): added PermissionError
    - various fixes and improvments, check diff for more details
2015-01-24 01:00:29 +01:00
Goffi
e4708c9cbb quick_frontend, primitivus: multi-profiles refactoring part 1 (big commit, sorry :p):
This refactoring allow primitivus to manage correctly several profiles at once, with various other improvments:
    - profile_manager can now plug several profiles at once, requesting password when needed. No more profile plug specific method is used anymore in backend, instead a "validated" key is used in actions
    - Primitivus widget are now based on a common "PrimitivusWidget" classe which mainly manage the decoration so far
    - all widgets are treated in the same way (contactList, Chat, Progress, etc), no more chat_wins specific behaviour
    - widgets are created in a dedicated manager, with facilities to react on new widget creation or other events
    - quick_frontend introduce a new QuickWidget class, which aims to be as generic and flexible as possible. It can manage several targets (jids or something else), and several profiles
    - each widget class return a Hash according to its target. For example if given a target jid and a profile, a widget class return a hash like (target.bare, profile), the same widget will be used for all resources of the same jid
    - better management of CHAT_GROUP mode for Chat widgets
    - some code moved from Primitivus to QuickFrontend, the final goal is to have most non backend code in QuickFrontend, and just graphic code in subclasses
    - no more (un)escapePrivate/PRIVATE_PREFIX
    - contactList improved a lot: entities not in roster and special entities (private MUC conversations) are better managed
    - resources can be displayed in Primitivus, and their status messages
    - profiles are managed in QuickFrontend with dedicated managers


This is work in progress, other frontends are broken. Urwid SàText need to be updated. Most of features of Primitivus should work as before (or in a better way ;))
2014-12-10 19:00:09 +01:00
souliane
5781d78d2b frontends (quick_app): fixes wrong JID construction when processing getPresenceStatuses result 2014-10-18 13:02:41 +02:00
souliane
c850615a2d primitivus: implement parameter "Show empty groups" 2014-10-06 13:54:41 +02:00
souliane
e554934f31 primitivus: implement "Show offline contacts" parameter (sync with "DISCONNECTED_HIDE" action key) 2014-10-06 12:44:58 +02:00
souliane
7a344fcf5d frontends: printInfo and printMessage timestamp attribute defaults to None instead of '' 2014-10-04 10:23:13 +02:00
Goffi
b41bda0a18 frontends: use of new "info" type in newMessage 2014-09-05 19:29:30 +02:00
souliane
987cfbf89d move sat.tools.jid to sat_frontends.tools.jid 2014-08-26 12:52:46 +02:00
souliane
162b310cd7 quick_frontend: fixes an issue with the profile in the signal handler 2014-08-21 22:46:57 +02:00
Goffi
c75cee8241 frontends: signals are managed in a more generic way 2014-08-11 19:10:24 +02:00
Goffi
08be0324a6 core, frontends (menus): MENU_ROOM and MENU_SINGLE are now managed 2014-06-26 00:05:20 +02:00
souliane
7fd9b694a6 frontends (quick_frontend): fixes the handling of asyncConnect failure 2014-06-15 16:09:30 +02:00
souliane
a5dd35ce65 frontends: async failures are more detailed (full class name + error message) 2014-06-07 15:39:20 +02:00
souliane
244a33d2c7 core (xmpp), stdui (profile_manager), bridge, frontends: raise an exception if the XMPP connection failed instead of sending a signal 2014-05-23 09:59:35 +02:00
souliane
f09fb76752 frontends: fixes bug with private message introduced with revision 1000 (6f1e03068b5f) + display messages from contacts not in roster 2014-05-29 14:34:01 +02:00
souliane
8be7416569 core, stdui (profile manager), quick_app: ask for another XMPP password when profile authentication succeed but XMPP connection fails 2014-05-21 23:15:01 +02:00
souliane
fa430d5105 quick_app, primitivus: update the connection mechanism to ask for non empty profile passwords 2014-05-07 16:11:32 +02:00
souliane
1eeddf5900 better PEP-8 compliance 2014-05-07 15:44:31 +02:00
Goffi
468206e529 quick_frontend: use of new logging system 2014-05-05 18:58:34 +02:00