Commit graph libervia-backend/src/tools
Author SHA1 Message Date
Goffi
8f0cf4697b core (xmlui), frontends: handling of "text" type in params xml + bug fixes 2014-02-25 23:01:26 +01:00
Goffi
171feb26d2 core (xmlui): fixed types with empty value are now correctly managed in _dataFormField2XMLUIData 2014-02-25 02:22:17 +01:00
Goffi
fa6e44507c core(XMLUI): empty options in ListWidget now just show a warning message, no more assert 2014-02-13 18:50:49 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
54f9e557e1 core (XMLUI): fixed labels management for lists in _dataFormField2XMLUIData 2014-02-04 18:32:46 +01:00
Goffi
18aeb3a6aa core (XMLUI), frontends: advancedListContainer part 2: 2014-02-04 18:21:51 +01:00
Goffi
edf3e1bc87 XMLUI (core, frontends): added JidWidget and DividerWidget + popup type + some bugfixes:
- JidWidget is a text container a Jabber ID, this can be used by frontends for special treatment (e.g.: possibility to click on it)
    - DividerWidget is a separator, like a blank or dashed line
    - popup type is similar to normal window, but designed for a smaller popping window
2014-02-04 18:19:32 +01:00
Goffi
9661c1c2c5 core, frontends: implementation of AdvancedListContainer first draft + misc:
/!\ Urwid SàText must be updated as the new TableContainer is used /!\
    - fixed button value in paramsXML2XMLUI
    - new Urwid SàText TabContainer is used in Primitivus for PairsContainer and AdvancedListContainer
    - fixed in core's XMLUI AdvanceListContainer
2014-02-04 18:19:29 +01:00
Goffi
b3fb68cb63 core, frontends: XMLUI refactoring:
- XMLUI now use objects with 2 main classes: widgets (button, label, etc), and container which contain widgets according to a layout
    - widgets and containers classes are found through introspection, thereby it's really easy to add a new one
    - there is still the AddWidgetName helper, for example AddText('jid', 'test@example.net') will add a StringWidget with name "jid" and default value "test@example.net"
    - container can be inside other containers. changeContainer change the first parent container
2014-02-04 18:19:00 +01:00
Goffi
3fdca75224 xmlui: added boolean type management in XMLUIResult2DataFormResult 2014-02-04 18:04:32 +01:00
Goffi
67df03f7bf core: XMLUI now use @property for session_id and submit 2014-02-04 18:02:40 +01:00
Goffi
256a110471 core, frontends: XMLUI refactoring:
- now there is a base XMLUI class. Frontends inherits from this class, and add their specific widgets/containers/behaviour
    - wix: param.py has been removed, as the same behaviour has been reimplemented through XMLUI
    - removed "misc" argument in XMLUI.__init__
    - severals things are broken (gateway, directory search), following patches will fix them
    - core: elements names in xml_tools.dataForm2XMLUI now use a construction with category_name/param_name to avoid name conflicts (could happen with 2 parameters of the same name in differents categories).
2014-02-04 18:02:35 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
Goffi
3857fff974 core (xml_tools), frontends: added a prefix to XMLUI form names in result data, to avoid name conflicts (e.g.: if a form has name "submit", and this name is also used internally by SàT) 2013-12-24 15:43:22 +01:00
Goffi
4d15d4a4eb core (xml_tools): dataForm*2XML renamed to dataForm*2XMLUI and now return XMLUI instead of raw XML + submit_id is managed, and session_id is returned if present 2013-12-24 15:43:22 +01:00
Goffi
80a7423f02 backend, frontends: XMLUI refactoring:
- session_id is resent in result data if found in incoming data
    - list now use distinct labels and values (label is the one displayed, value is the one used for everything else)
    - misc refactoring

/!\ urwid SàtExt must be updated ! /!\
2013-12-24 15:19:18 +01:00
Goffi
069a250b04 backend, frontends: callbacks refactoring:
- launchAction is now async, and return a dictionary for its result
    - no more action_id, actionResult* are deprecated
    - callback system is about to be unified
2013-12-24 15:19:08 +01:00
Goffi
5723ee2ef2 core (xml tools): bad default parameter in XMLUI.addList 2013-12-24 01:31:18 +01:00
souliane
718bb98300 plugin XEP-0033: implementation of the addressing feature:
- frontends pass the recipients in the extra parameter of sendMessage
    - backend checks if the target server supports the feature (this is not done yet by prosody plugin)
    - features and identities are cached per profile and server
    - messages are duplicated in history for now (TODO: redesign the database)
    - echos signals are also duplicated to the sender (FIXME)
2013-12-11 17:16:53 +01:00
souliane
b674011891 core (tools): set min and max priorities for triggers and warn if several triggers have the same not null priority 2013-12-13 05:35:24 +01:00
souliane
d7d411d6ef frontends tools: moved src/tools/frontends to frontends/src/tools 2013-11-21 18:57:10 +01:00
souliane
674a3e958d plugin tools: turn src/plugin/games.py into a plugin and move it to src/plugins/plugin_misc_room_game.py 2013-11-21 18:23:08 +01:00
souliane
ea67ed7a61 plugins (games): more factorization and flexibility for launching and joining games:
- "MUC user joined", "MUC user left" and class XMPPHandler are managed directly in RoomGame
- renamed __init__ parameters 'player_init_data' to 'player_init' and 'options' to 'game_init'
- pass the players list in radiocol method 'createGame' and signal 'radiocolStarted' (needed for invitation system and for UI players identification)
- added some parameters to manage who can invite, who can join, who to wait for... managed with check***Auth methods
- joining a game that is already launched may be possible, regarding these parameters and the invitation list
- leave and join a game again is partly managed: new tarot round is launched, we should keep playing the same round instead
2013-11-21 15:49:53 +01:00
souliane
6a99705523 frontends tools: added symbols for MUC user activity identification 2013-11-21 15:38:53 +01:00
souliane
d3c12524c9 plugins (games): add a method to send messages more easily 2013-11-18 14:25:40 +01:00
souliane
8190f82caf plugins (MUC, tools, games): generalize the generation of a unique room name when joining a MUC and no room is specified:
- method to get the MUC service moved to plugin_xep_0045
- joinMUC returns the muc name (given by user or generated)
- getUniqueName can receive a specified service in argument
2013-11-17 16:59:12 +01:00
souliane
3be7c13314 plugins (tools): collective games (with no opponent, like radiocol) were handled like other games 2013-11-17 16:30:46 +01:00
souliane
f1cf1fb53f tools frontend: moved here from Libervia some definitions for message composition 2013-11-09 09:12:38 +01:00
souliane
f59304a2f6 misc: added a file for frontend's string operations:
- the method getURLParams defined here is needed for Libervia autologin feature
2013-11-08 19:14:13 +01:00
souliane
36cea6fc91 tools: renamed tools.jid.JID attribute "short" to "bare" 2013-10-29 16:26:55 +01:00
souliane
d792723caa core (tools): small fix in using imported methods 2013-10-24 08:47:45 +02:00
souliane
34947f8840 plugins radiocol, card_game, quiz: code factorization 2013-10-23 12:45:13 +02:00
souliane
ba4c9158ea tools: moved src/tools/games.py to src/tools/frontends/ 2013-10-18 11:58:42 +02:00
Goffi
33a1a7e1c3 new xml tools module (sat.tools.frontends.xml):
- inlineRoot display the first XHTML tag as inline.
2013-11-09 10:17:53 +01:00
Goffi
a96a957bfb moved sat.tools.frontend to sat.tools.frontends 2013-11-08 16:35:51 +01:00
souliane
7b4fa64df8 frontend, primitivus: added input history (mode-wise) 2013-11-07 16:58:20 +01:00
Goffi
eb60e0ff33 core, plugins: fixed bad use of children instead of elements() for domish.Element instances. 2013-10-15 19:28:34 +02:00
souliane
010e305d53 core, primitivus: better support for parameter of type list 2013-10-02 17:38:29 +02:00
Goffi
92d861f334 core: misc bug fixes 2013-09-21 15:34:10 +02:00
Goffi
0cce82d3ea core: added advanced list to XMLUI (need improvment, very basic so far)
- the advanced list use headers which can be used as columns
    - in the future, should provide the ability to highly customize list disposition, in a way similar to Amarok 2's playlist.
2013-09-08 18:05:19 +02:00
Goffi
c1b5ccf1d2 plugins XEP-0060, XEP-0277, groupblog: comments implementation (first draft, not finished yet):
- PubSub options constants are moved to XEP-0060
    - comments url are generated/parsed according to XEP-0277
    - microblog data can now have the following keys:
        - "comments", with the url as given in the <link> tag
        - "comments_service", with the jid of the PubSub service hosting the comments
        - "comments_node", with the parsed node
    - comments nodes use different access_model according to parent microblog item access
    - publisher is not verified yet, see FIXME warning
    - so far, comments node are automatically subscribed
    - some bug fixes
2013-05-20 23:21:29 +02:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Goffi
dfe67edc26 jp, core: jp's clean_ustr moved to a new general utils module 2013-02-22 00:11:47 +01:00
Emmanuel Gil Peyrot
fb0d7c9ca4 Fix pep8 support in src/tools. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
88074cd284 Remove every old-style class. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
a6d8990e49 core, plugins: fixed bad namespace in stanza creation 2012-11-01 22:41:39 +01:00
Goffi
d7ec36d6db core: Triggers can now frobid other triggers execution
if a trigger raise SkipOtherTriggers exception, normal behaviour will occure, skipping other triggers
2012-10-21 19:28:38 +02:00
Goffi
b5ddf942f7 core: added priority management in triggers 2012-10-20 18:18:40 +02:00