Commit graph

1,007 commits

Author SHA1 Message Date
Goffi
7d313660eb core: added "one_shot" option to registered callback:
when this keyword is used, the callback is automatically removed once it has been called.
2014-02-04 18:24:27 +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
72fd99f679 plugin XEP-0045, primitivus: added MUC configuration 2014-02-04 18:06:12 +01:00
Goffi
3fdca75224 xmlui: added boolean type management in XMLUIResult2DataFormResult 2014-02-04 18:04:32 +01:00
Goffi
8ee9e2529e plugin XEP-0055, Primitivus: Directory search dialogs are now entirely done in plugin XEP-0055, specific code in frontend is not needed anymore 2014-02-04 18:03:53 +01:00
Goffi
67df03f7bf core: XMLUI now use @property for session_id and submit 2014-02-04 18:02:40 +01:00
Goffi
3b86e8b106 primitivus: fixed bad closure, resulting in menus bug. 2014-02-04 18:02:37 +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
souliane
41ce40b0e4 test: added tests for the plugin "room game" + rename other test files 2014-01-10 18:20:30 +01:00
souliane
ddcfdd99ac test: make FakeClient profile dependent and add some tools to test MUC 2014-01-10 18:15:02 +01:00
souliane
cd45ede2d2 test: silent info/warning that were polluting the output 2014-01-10 18:19:34 +01:00
souliane
db832c1f6b test: define the constants JIDs and profiles as lists 2014-01-09 11:18:33 +01:00
souliane
f2503f89ae plugins room games, XEP-0045: small fixes, improved docstrings 2014-01-10 18:07:36 +01:00
souliane
9f9ea3acf0 plugin room game: improved docstrings, added '_' as prefix for internal methods names 2014-01-09 10:28:25 +01:00
souliane
6be767ae3b test: use the SatTestCase methods instead of builtin "assert" in tests for memory, plugin xep-0033 2014-01-07 09:27:53 +01:00
Emmanuel Gil Peyrot
31607daee1 plugin XEP-0054: also work with python2-pillow 2014-01-10 21:12:06 +01:00
souliane
84bfd205dd test: added tests for XEP-0033 2014-01-05 13:05:31 +01:00
souliane
96b1d58eb7 test: FakeMemory inherits from Memory + more helpers basic support + cleaning 2014-01-05 13:04:54 +01:00
souliane
1986ea26ca plugin XEP-0033: the comparison for auto-fixing for the stanza recipient was not correct 2014-01-05 13:00:17 +01:00
souliane
78a3d845db memory: factorize the node checks in Params.__constructProfileXml 2014-01-05 07:26:41 +01:00
souliane
9dc518a2a9 test: added tests for XEP-0085 2014-01-04 21:09:32 +01:00
souliane
6007937962 test: added some tests for Memory 2014-01-04 17:16:40 +01:00
souliane
8307896c4f test: added support of basic memory stuff in helpers.py 2014-01-04 15:46:30 +01:00
souliane
a21e3c2783 test: store the constants in constants.py + better PEP8 compliance 2014-01-04 15:45:08 +01:00
souliane
821f0b36ef memory: bug fix related to method paramsRegisterApp + getParams was not always returning a Deferred 2014-01-04 21:13:51 +01:00
souliane
409bbccebe memory: fixed wrong information in the docstrings for security_limit 2014-01-04 21:12:49 +01:00
souliane
4a0d8be8ec core, bridge: new method paramsRegisterApp to register frontend's specific parameters 2013-12-27 13:28:26 +01:00
Goffi
fc003ecf77 frontends: fixed sendMessage calls, sendMessage is now async so callback and errback need to be specified + redraw in PrimivitusApp.notify 2014-01-03 21:25:07 +01:00
Goffi
401f47273b i18n: merged jp i18n french translation in core fr.po 2013-12-29 17:48:14 +01:00
Goffi
61735f8d8f core: fixed setup.py (removed former sat_frontends and jp i18n references) 2013-12-29 17:48:04 +01:00
Goffi
b7bf434cd2 core: dynamics menus refactoring:
- menu now use generic callback system, with extra data
    - asyncMenuCall is removed in favor of launchAction
    - menu_id (== callback_id) is used to identify menu instead of category/name/type tuple
    - i18n is managed throught deferred translation, and returned with _i18n suffix
        e.g.: menu (D_('File'), D_('Open')): (u'File', u'Open') is menu_path, (u'Fichier', u'Ouvrir') is french menu_path_i18n.
    - type actually can have the following values:
        - NORMAL: classical menu
        - JID_CONTEXT: contextual menu, used with any jid
        - ROSTER_JID_CONTEXT: like JID_CONTEXT, but restricted to jids in roster.
        - ROSTER_GROUP_CONTEXT: contextual menu, use with groups
    - security_limit is used, in the same way as for parameters
    - when using importMenu, callback can be an actual callback, or one already registered with registerCallback
2013-12-29 17:10:14 +01:00
Goffi
f46a7bf23d i18n: merged sat_frontends and sat translations in core's i18n
Translations still need to be updated
2013-12-29 17:10:10 +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
souliane
5b623dbb5c plugin groupblog, XEP-0277: store both published and updated timestamps 2013-12-19 13:54:40 +01:00
souliane
13a644531f tools: addURLToText moved from libervia to sat_frontends/tools/strings 2013-12-18 15:37:30 +01:00
souliane
ea34ae362a core: fix bridge method getContactsFromGroup return value (list of jids --> list of strings) 2013-12-18 10:39:19 +01:00
souliane
74fc11535c quick_frontend: fix presence/status update (do not share between different resources) 2013-12-18 09:55:02 +01:00
souliane
0f2ba87b59 primitivus: redraw after changing the presence or status 2013-12-18 07:44:35 +01:00
souliane
b97f78ca93 plugins radiocol, xep-0054: better handling of upload errors:
- radiocolSongAdded is now asynchronous
- _buildAvatar return a Failure if the image is not readable
2013-12-17 18:44:53 +01:00
souliane
5b632eca67 plugin radiocol: fix wrong call of deleteFile 2013-12-17 11:35:41 +01:00
Goffi
edb1d7c76b plugin xep-0050 (ad-hoc commands): requesting part. first draft 2013-12-24 15:43:52 +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
aa8ca0772c plugin xep-0050: using new Sessions class 2013-12-24 15:19:08 +01:00
Goffi
3f236bbb32 core (memory): added optional profile checking in Sessions:
if profile is set in newSession, getProfile must be used instead of __getitem__, and it is checked to insure session is not used by the wrong profile
2013-12-24 15:19:08 +01:00