Commit graph libervia-backend/frontends/src/tools
Author SHA1 Message Date
Goffi
f5f25e8ab5 misc: date update (yes it's a bit late :p ) 2017-11-03 14:31:42 +01:00
Goffi
3ccb4c1038 core (XMLUI), template(XMLUI): added flags to ListWidget:
following flags have been added:
- noselect: list selection is not allowed (options are the important data)
- extensible: user can add elements to the list
- reducible: user can remove elements from the list
- inline: presentation hint: the list should be displayed horizontally
2017-10-27 18:03:35 +02:00
Goffi
3fe93a1b45 frontends (xmlui): added ValueGetter.keys 2017-10-20 08:39:58 +02:00
Goffi
d78aa6f922 frontends (xmlui): new _xmlui_for_name attribute:
_xmlui_for_name is an attribute which can be set to Label widgets to indicate the name of the linked widget.
This attribute is set automatically for LabelContainer.
data argument in _parseChilds is now a dict (or None)
2017-10-16 07:21:44 +02:00
Goffi
5a34d090b3 frontends (xmlui): new widget_value dict to get first value of widget by name 2017-10-16 07:18:07 +02:00
Goffi
83aa722103 frontends (xmlui): a dict of named widgets is kept, so they can be easily be retrieved 2017-10-01 12:21:23 +02:00
Goffi
506f948214 core, frontends (xmlui): new LabelContainer:
LabelContainer is like a PairContainer where first widget can only be LabelWidget or EmptyWidget. This case is the most common, and allow to generate better code when label can be associated to widget (e.g. in HTML).
2017-09-24 16:36:11 +02:00
Goffi
66e393336b frontends(tools/strings): put URL regex outside of getURLParams and precompile it 2017-01-01 16:39:26 +01:00
Goffi
5768160d2d frontends(xmlui): better handling of missing _xmluiAppend 2016-12-18 10:15:57 +01:00
Goffi
b19c00773b frontends (tools): added a module to parse CSS colors 2016-09-25 15:41:43 +02:00
Goffi
0c83d13b7c frontends (xmlui): added a user_action attribute:
this attribute indicate if the data is a result of a user interaction or an event from the backend (in the later case, the frontend can choose to avoid interrupting the user).
Internally (in XMLUI), "FROM_BACKEND" is added to XMLUI.flags if the UI result from a backend event.
2016-08-21 12:07:31 +02:00
Goffi
25bbaa705a frontends (xmlui): cancelling form now trigger submit with {"cancelled": "true"} instead of being silently ignored 2016-06-29 13:51:39 +02:00
Goffi
06663b9571 core: removed pyfeed and xe dependencies:
pyfeed and xe where still used only for date format handling, and there is already dateutil which is a dependency of Wokkel.
    Furthermore pyfeed and xe are still not on pypi, causing troubles for installation with pip
2016-04-17 17:08:12 +02:00
Goffi
6bbcbaf522 use of /usr/bin/env instead of /usr/bin/python in shebang 2016-04-17 14:45:26 +02:00
souliane
849683ec70 frontends (tools/strings): fixXHTMLLinks skips internal anchors (links starting with "#")
fix bug 126
2016-03-05 13:58:02 +01:00
souliane
aa1e0714dd tools (strings): add method fixXHTMLLinks to add a scheme if missing, and force opening in new tab 2016-01-15 12:27:34 +01:00
souliane
fab073076c tools (strings): add a parameter "new_target" to addURLToText 2016-01-13 13:08:31 +01:00
Goffi
348be27934 copyright update 2016-01-03 16:28:30 +01:00
souliane
9e0b24a4a5 memory (params): parameter jids_list values are specified with <jid>...</jid> 2015-12-15 14:12:19 +01:00
Goffi
fd271b69ba primitivus (xmlui): fixed closing on popup panel "OK" button press 2015-11-16 09:25:05 +01:00
Goffi
5226e6ef6b frontends (xmlui): fixed widget closing on submit 2015-11-16 08:57:02 +01:00
Goffi
719a624892 quick_frontend, primitivus (xmlui): removed _xmluiClose from workflow were submit is triggered, as submit launch the callback which close the dialog itself + fixed dialogs _xmluiClose 2015-11-11 18:29:32 +01:00
Goffi
6f1d742645 frontends (xmlui): fixed a bug in xmlui resulting in a bad dialog creation (parameters were lost, including profile) 2015-08-27 17:59:01 +02:00
Goffi
dd8462f07a frontends: callback are now always used in QuickApp launchAction (before it was only used if validated is present):
- actionManager is used by default (no callback provided)
    - in XMLUI, the dialog is closed before calling actionManager
    - if keys are not managed in resuling data, an exceptions is raised
2015-08-25 14:41:42 +02:00
souliane
a90bcacfe9 tools, frontends (xmlui): allow to select a tab when adding it 2015-08-21 14:17:41 +02:00
Goffi
9df7cd6d33 frontends, primitivus: JidsList XMLUI widget management /!\ urwid SàText must be updated 2015-08-20 18:36:53 +02:00
Goffi
7f14e1865d core , privmitivus (xmlui): add jidInput handling, with a simple String for now 2015-08-18 10:35:44 +02:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
souliane
294b42f15c primitivus: prefill "Join MUC" dialog with only the JID's node part when in debug version + display error directly from the DBus object 2015-03-24 07:38:40 +01:00
souliane
d24eb9976d quick_frontend: display MUC games symbols 2015-03-20 16:29:03 +01:00
souliane
14f4b4b8ec quick_frontends, primitivus: move the chat states logic to quick_frontend 2015-03-20 16:28:19 +01:00
Goffi
0a10ae37a6 frontends: added a host_listener module which manage a listener launched when host is ready, useful to instantiate things on host in optional modules (e.g. menus). 2015-03-17 19:30:43 +01:00
souliane
8b15911077 frontends (XMLUI): fixes wrong argument name 2015-03-03 06:00:23 +01:00
souliane
9461ac75ce frontends: merge sat_frontends.constants to sat_frontends.quick_frontend.constants 2015-02-22 14:13:42 +01:00
souliane
5b0a210fab frontends (tools): Pyjamas's JID implementation can be compared to an object of a different type:
- always return False if the other object is not a JID
    - to not fake list membership's test, hash(jid) now differs from hash(unicode(jid))
2015-02-07 14:47:23 +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
ac59d061f4 memory (params), tools (xml_tools), plugins, frontends: add "int" parameter type with "min" and "max" attributes 2014-10-03 12:27:43 +02:00
souliane
0443149ef8 sat_frontends (tools): force JID's node and domain to lower-case:
- this changeset should go with a modification of PRIVATE_PREFIX, but the change has been already (accidentally) pushed with the previous changeset
2014-08-26 13:33:12 +02:00
souliane
987cfbf89d move sat.tools.jid to sat_frontends.tools.jid 2014-08-26 12:52:46 +02:00
Goffi
38c4e128ad frontends: dialog don't crash anymore is no submit_id is given (submit does nothing in this case) 2014-08-20 21:16:14 +02:00
Goffi
b6563c596b frontends: XMLUI refactoring + dialogs:
- there are now XMLUIPanel and XMLUIDialog both inheriting from XMLUIBase
    - following dialogs are managed:
        - MessageDialog
        - NoteDialog
        - ConfirmDialog
        - FileDialog
    - XMLUI creation is now made using xmlui.create(...) instead of instanciating directly XMLUI
    - classes must be registed in frontends
    - "parent" attribute renamed to "_xmlui_parent" to avoid name conflicts with frontends toolkits
2014-08-13 14:48:49 +02:00
Goffi
0cbc88ac39 frontends (XMLUI): use of logging system instead of print 2014-06-25 14:01:58 +02:00
Goffi
8ca72f8a9f core/frontends (XMLUI): value can now be inserted as a <value/> element, if not present value attribute is tested, else empty string is used. 2014-06-25 14:01:57 +02:00
Goffi
e002d55880 frontends (XMLUI): implementation of read_only attributes for widgets String, TextBox, Password and Bool 2014-06-25 14:01:56 +02:00
souliane
38eb876e94 tools, frontends (xmlui): add Widget.setInternalCallback:
- to add UI callback not communication with the bridge
    - a list of predefined actions can be used to copy, move, select values
    - extra data can be passed within the 'internal_data' element
TODO: frontend side operation to retrieve the data from node to data structure should be generic
2014-04-03 14:56:16 +02:00
souliane
ec579aff81 reverted changeset 5c7707c958d8 (revision 969) 2014-04-03 14:38:48 +02:00
souliane
6608eafb9f tools, frontends (xmlui): add setter methods for widgets + new widget InternalButton to process UI operations 2014-04-01 21:30:21 +02:00
souliane
608e2ba9fa tools, frontends, memory: param definition and XMLUI handle multi-selection for list widgets:
- we need to update urwid_satext to revision 79
                          - no more "value" attribute value in the "list" element, use
                            HTML-style "select" attribute in the "option" elements instead
                          - /!\ param saving do not handle multiple values yet!
2014-04-01 21:21:13 +02:00
Goffi
8f0cf4697b core (xmlui), frontends: handling of "text" type in params xml + bug fixes 2014-02-25 23:01:26 +01:00