Commit graph libervia-backend/frontends/src/quick_frontend/quick_widgets.py
Author SHA1 Message Date
Goffi
387c10cc0d dates update 2018-01-26 11:14:13 +01:00
Goffi
f5f25e8ab5 misc: date update (yes it's a bit late :p ) 2017-11-03 14:31:42 +01:00
Goffi
2808312c77 quick fronten (widgets): if a widget is recreated, "recreateArgs" method can be implemented to specify arguments to clone it correctly 2016-09-09 23:54:33 +02:00
Goffi
4785af58c6 quick_frontend(quick_widgets): deleteWidget can use additional arguments which will be passed to onDelete 2016-08-28 18:22:46 +02:00
Goffi
5347f89dd4 quick frontend (widgets): a deletion with onDelete can now be cancelled if onDelete return False 2016-08-22 20:56:51 +02:00
Goffi
8a7029b549 quick frontend (quick_widget): getWidgets can now filter on hash (using target), handling recreated widgets too 2016-08-21 17:03:18 +02:00
Goffi
21bdd2cbca quick frontend (widget): minor profiles check on widget creation 2016-08-08 00:49:17 +02:00
Goffi
cc160e03d7 plugin XEP-0085, quick_frontends, primitivus: chat states are working again 2016-07-17 16:47:33 +02:00
Goffi
becdbf205a quick_frontend (QuickWidget): keep on_new_widget argument when recreating a widget 2016-07-11 19:22:40 +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
348be27934 copyright update 2016-01-03 16:28:30 +01:00
souliane
2203e6aa52 quick_frontend, primitivus: fixes a couple of issues:
- chat: notification was raising an error when you just entered the room and self.nick is None
    - quick_widget: deleting a widget was modifying a dict while looping on it + unselect widget when it's being deleted
2015-04-16 17:17:28 +02:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
souliane
b160e3d92c quick_frontend: add a method getWidget to return a widget without creating it if it doesn't exist 2015-03-04 14:17:38 +01:00
souliane
61f1d1de6a quick_frontend (quick_widgets): revert commit 1319 2015-02-10 10:33:54 +01:00
Goffi
1b684d2dba quick frontends (quick widgets): doesn't force anymore "on_new_widget" to None for on_existing_widget=C.WIDGET_RECREATE: the original behaviour for on_new_widget need to be kept 2015-02-10 19:08:01 +01:00
souliane
902616219a quick_frontend: getOrCreateWidget callbacks can return another widget 2015-02-09 09:19:30 +01:00
souliane
b1ab06ba6a quick_frontend: fixes hash setting for QuickWidget 2015-02-06 22:28:00 +01:00
Goffi
fcfe8c8517 quick frontend(quick widgets): fixed bad condition test in previous commit 2015-02-06 20:46:14 +01:00
Goffi
95faddd84c quick frontend(quick widgets): added the ability to use a callable with getOrCreateWidget's on_existing_widget 2015-02-06 20:43:28 +01:00
Goffi
ca2e0ccc66 quick_ frontend (quick widgets): added explanation in docstring for non special keywords in getOrCreateWidget 2015-02-06 20:09:01 +01:00
Goffi
679e5759bb quick frontend (quick widgets): class' __name__ method is used for classes_map hash because the use of class directly was causing bugs with pyjamas (difficult to find, several MicroblogPanel instances were added only once in Libervia's TabPanel, hash method seemed buggy) 2015-02-06 19:05:51 +01:00
Goffi
f9f86f67a1 quick frontend (quick_widgets): add deleteWidget method 2015-02-06 19:03:13 +01:00
Goffi
588d65132c Quick Frontend (quick_widgets): added on_existing_widget in getOrCreateWidget (see docstring for more infos) + use of constants 2015-02-06 19:01:06 +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