Commit graph

1369 commits

Author SHA1 Message Date
mathieui
0cb39b32a4 Do not generate invalid jids (e.g. localpart@domainpart/)
This is in prevision of a sleekxmpp update with JID validation.
Also, comment the “server” option in the config file a bit better.
2012-08-01 20:10:00 +02:00
mathieui
f76e80c5fa Sort resources from highest priority to lowest
- Previously it was from lowest to highest
- Add the “Priority:” info to the “i” key in the roster
2012-08-01 15:45:10 +02:00
mathieui
9905646184 Various changes to the roster sorting
- Change the separator from _ to :
- Move the functions away in another module to avoir cluttering the
  roster code
- Add a case-sensitive sort (“sname”)
2012-08-01 14:42:02 +02:00
mathieui
c890fefbc4 Add an "online" contact sorting method
- put the online contacts at the beginning of the list
- allows, e.g. jid_reverse_online_reverse, to put offline contacts at
  the start of the group, in alphabetical order
2012-08-01 01:36:18 +02:00
mathieui
47c593ddaf Sort the unavailable contacts at the end of the contact list 2012-08-01 01:24:42 +02:00
mathieui
71f813af28 Add a roster_group_sort option, which works like roster_sort
- defaults to "name" (sort by group name)
- document it
- also, micro-optimize get_nb_connected_contacts()
2012-08-01 01:06:57 +02:00
mathieui
1625a4f41f Add a roster_sort option to sort the contacts inside the roster groups
- defaults to jid_show (which means that they are sorted into sub-groups
  by show and are sorted by JID inside those)
- See the default config file or the documentation for details
2012-07-31 23:40:53 +02:00
mathieui
4096e7f427 Also sort the contacts alphabetically
Contacts are first sorted alphabetically, and then sorted again
depending on their show; since the python sorts are stable, the order
will remain and the sub-groups (corresponding to one show type) will be
sorted alphabetically too.
2012-07-31 21:12:59 +02:00
mathieui
4a7f6c5eaf Sort the contacts in the roster groups by show (xa/away/…) 2012-07-31 20:51:18 +02:00
mathieui
ee97ba6b6c Make the autorejoin option work with bans, too, and fix the documentation 2012-07-31 13:38:53 +02:00
mathieui
88d32a7bc4 Add an autorejoin_delay option
- document it
- works in per-tab config too
2012-07-30 19:05:20 +02:00
mathieui
ec7dd75012 /bind with only one argument now resets the binding 2012-07-29 19:45:46 +02:00
Florent Le Coz
21eeef5c7b Implement the sending of underlined text in xhtml-im messages (C-c u).
Note that a portion of text can NOT have a color AND be underlined at the
same time, but it's not really tragic (see comment in source code).
2012-07-29 03:36:05 +02:00
Florent Le Coz
c9ea00b963 Fix get_conversation_by_jid when a string is passed. 2012-07-27 16:07:27 +02:00
mathieui
8a0a100bf5 Add a /self command 2012-07-26 14:15:11 +02:00
mathieui
1c29b39a6e Add a /runkey command
This allows the user to run the action defined on a key without having
to press that key. The completion completes all the available keys that
will have an effect.
2012-07-26 12:57:42 +02:00
mathieui
d8623d1c50 Change how scrolling is done
- All functions involved return a boolean, and the core function use
  that value to determine if a refresh is needed or not. (avoids useless
  refreshs)

- Scrolling with PGUP/DOWN on the roster now only does _one_ action, an
  not a range corresponding to the screen size (should be way faster)
2012-07-26 12:40:08 +02:00
mathieui
c4fcf3c71a Remove the duplicate function get_tab_of_conversation_with_jid
- get_conversation_by_jid() now behaves like the removed name
2012-07-26 12:35:49 +02:00
mathieui
721367e8f7 Refactor core.py to have meaningful sections
- Put the commands and the related completions together
- Put the xmpp handlers together
- Put the curses-using functions together
2012-07-26 00:47:06 +02:00
mathieui
2767da0b78 Small non-impacting modifications
- Write the config with “option = value” instead of “option= value”
- Docstring for sighup_handler
- Optimize a join() in the main loop
- Rename the verbose get_error_message_from_error_stanza() with
    get_error_message()
- Remove the unused Tab.just_before_refresh() which is litterally used
  nowhere in poezio
2012-07-26 00:09:23 +02:00
mathieui
82e242305d Remove the shell_completion
- completion is normal with no way to change it
(shell_completion was buggy)
- remove it in the default config and in the doc too
2012-07-19 02:09:24 +02:00
mathieui
0de6a197f6 Fix /info (role and affiliation were inverted) 2012-07-19 02:05:43 +02:00
Florent Le Coz
082067afe9 [labedz] Add keys to jump to the next and previous contact in the roster. 2012-07-18 22:30:08 +02:00
mathieui
8317b845d8 Fix /version to find a fulljid when available
And improve the completion in the roster (go to the resources)
2012-07-17 21:56:04 +02:00
mathieui
9322835659 Finally fix the ipv6 issues.
- with reattempt = True & max_attempts = 0
2012-07-13 02:22:25 +02:00
Florent Le Coz
d47c31a587 Properly quote the %(body)s and %(from)s used in the simple_notify plugin. 2012-07-05 00:50:47 +02:00
mathieui
73b8addafe Use no_auth instead of failed_auth event
With failed_auth, poezio was showing an error message for each
authentication mechanism tried (3, usually). This commit fixes that.
2012-07-04 00:37:34 +02:00
mathieui
267be566cd Add a new color to the theme, for the warning prompt
- Currently only used by the SSL checking prompt
- fg: black ; bg: red ; bold
2012-07-03 23:50:07 +02:00
mathieui
77e3f8893c Do not reload plugins on reconnection
If the plugins_autoload list was not empty, it caused the plugins to be
reloaded upon each reconnection (with /connect or not). Now it does not.
2012-07-03 13:44:15 +02:00
mathieui
975e0d96b2 Make /status comply with the command args rule
- if there are more args than handled, no message will be set
- fix the 'status' plugin accordingly
2012-07-03 03:55:57 +02:00
mathieui
c3f822e7b2 Remove the duplicated sort_by function in the MUCList 2012-07-03 03:32:12 +02:00
Florent Le Coz
4bc215806b Improve the simple_notify plugin and the daemon to execute a command to clean the notification and to execute the remote commands through sh -c, letting us use pipes and redirections. Also adds the highlight event for plugin, and make the simple_notify plugin use it as well. 2012-07-03 01:59:25 +02:00
mathieui
a7e3814c09 Prevent a crash when the value of custom_port is not expected 2012-06-01 22:46:21 +02:00
mathieui
262de9094a Move ^D to ^X 2012-05-29 12:35:03 +02:00
mathieui
cea0d284d9 Change version to 0.8-dev 2012-05-24 23:57:32 +02:00
mathieui
a8947a3a31 Change version to 0.7.5 2012-05-24 23:55:30 +02:00
mathieui
5e6838fd9f Truncate everything in the roster if needed.
Group names, resources jids, and bare jid/roster name combinations
are now truncated if they are bigger than the window size. If there is
a resource (for a contct) or a number of online contacts (for groups),
it will still be displayed at the end of the line.
2012-05-24 23:11:26 +02:00
mathieui
32f8ada92d Put the personal words in the last words completion (M-/)
(instead of the normal completion)
2012-05-23 16:34:07 +02:00
mathieui
12bd9b589c Add personal words completion - Fixes #1723
This commits adds a “words” variable to the configuration file. This
variable must contain a list of words, separated by colons (:).
Those words will then be completed upon tab completion in the chatrooms,
private conversations, and direct conversations.
2012-05-23 16:25:53 +02:00
Florent Le Coz
e1c7f63a3a Add a few punctuation char to avoid in recent words completion. 2012-05-22 21:12:07 +02:00
mathieui
b36247e7c9 Remove the unused “port” option.
custom_port is already used instead.
2012-05-22 20:04:41 +02:00
Florent Le Coz
3879a91112 Fix the ^I (when pasting) issue correctly this time. 2012-05-21 13:28:38 +02:00
Florent Le Coz
f525bcc1f0 Revert "Do not display ^I when pasting a tabulation char."
This reverts commit 837b46d68b.
2012-05-21 13:28:38 +02:00
mathieui
0af1c7fe9a Docstrings, and small cleanup 2012-05-21 02:14:25 +02:00
Florent Le Coz
837b46d68b Do not display ^I when pasting a tabulation char. 2012-05-20 13:54:38 +02:00
Florent Le Coz
65c2d3dc88 Merge branch 'master' of https://git.louiz.org/poezio 2012-05-20 13:43:53 +02:00
mathieui
51c788ad96 Allow nick completion in the Private tabs as well. 2012-05-19 22:28:30 +02:00
mathieui
c77e2878b8 Do not add a '…' if the nick has the exact same size as the limit 2012-05-17 20:48:46 +02:00
mathieui
fb450a7138 Use a different theme variable for the /me message 2012-05-17 17:28:53 +02:00
mathieui
3411d8ca83 Add a shortcut to go to the first unread message (separator) with M-p 2012-05-17 17:15:15 +02:00
mathieui
0f8a5abdc0 Add an option to always show the separator - Fixes #2240 2012-05-17 16:55:31 +02:00
mathieui
64defba0ae Show subscription changes in the info buffer - Fixes #2234 2012-05-17 16:45:40 +02:00
mathieui
65062754e1 Fix a crash if there are no messages in the room 2012-05-17 14:11:02 +02:00
mathieui
4c0a3fb5a2 Resolves separator persistence problems - Fixes #2073
Now we have to pass the textbuffer object when we want to add a line
separator.
2012-05-17 03:34:04 +02:00
mathieui
0f7bda20b8 Add a way to review room highlights - Fixes #1673
This new features is available with M-p and M-n (previous/next).
It saves the last highlight viewed, meaning that if you scroll in the
buffer, M-n or M-p will take you to the next or previous hl compared to
the one before you started scrolling.

For convenience, going to the previous highlight of the first highlight
will take you to the bottom of the buffer, and going to the next
highlight of the last highlight will do *the same*.

If there are several highlights in one message, only the first line will
be considered a highlight.
2012-05-17 01:00:35 +02:00
mathieui
da30c8c79f Put color in the topic again 2012-05-16 19:50:56 +02:00
mathieui
155914470d Complete the commands differently.
If there is 0 match for the beginning of command, delete the last
letter (over and over) until there is a match, then complete that.
2012-05-16 17:39:14 +02:00
mathieui
1e07cd4f58 Put a space after completion only if there is one (and only one) command 2012-05-16 17:22:13 +02:00
mathieui
c04f0e9783 Prevent the rooms from going “offline”
Add a blacklist inside the roster that contains the bare JIDs of all the
rooms ever joined in this session, so that no JID using this server will
ever be shown as getting “offline”.

If there is a cleaner way to do that (discriminating JIDs), I welcome it.
2012-05-16 02:01:50 +02:00
mathieui
58a41fe065 Add status code handling - Fixes #2338
Get status codes in presence and message stanzas, and show information
related to them. If the change hinders privacy (logs added, or public
JIDs), then a red “Warning” message is shown instead of the classic
“Info”.
2012-05-16 01:59:32 +02:00
mathieui
e86ecb3a52 Fix the “/bookmark{,_local} *” behaviour 2012-05-14 00:01:19 +02:00
mathieui
ecc40fdc5e Catch a possible exception when trying to retrieve the rgb value in curses
Fixes #2354
2012-05-13 19:01:27 +02:00
mathieui
28c15a889e Add the ignore_private and private_auto_response options
MUC-specific options.
private_auto_response is empty by default.
+ new event ignored_private
2012-05-12 20:44:38 +02:00
mathieui
5498ad37c8 Prevent iq errors & timeouts on /join completion 2012-05-10 18:22:10 +02:00
mathieui
c0c0b16218 Fixes #2358 2012-05-10 13:22:37 +02:00
Florent Le Coz
0f0efb7ada Avoid a traceback on /close on a non-joined MucTab. fixed #2358 2012-05-10 13:22:05 +02:00
mathieui
dfa8f33c67 Fix the usr join/rejoin when someone gets kicked or banned 2012-05-10 11:00:34 +02:00
mathieui
3dc5c5e5b5 Add a way to execute a custom command with a custom key binding
(+doc)
2012-05-10 01:26:35 +02:00
mathieui
70a724c127 Add new status & bookmarks actions 2012-05-10 01:07:59 +02:00
mathieui
5c327ef232 Allow a config to be set & created directly 2012-05-09 19:17:53 +02:00
mathieui
600af6d5a7 Fix the size of the XMLTab 2012-05-09 00:13:50 +02:00
mathieui
61d23e6da3 Add the possibility to map keys on 'actions' 2012-05-08 19:09:05 +02:00
mathieui
f2377f747b Fix some roster length issues with group folding 2012-05-08 16:14:51 +02:00
mathieui
784e608f66 Fix the duplicate messages when talking to an offline gmail contact 2012-05-07 17:09:32 +02:00
mathieui
1a81466a09 Fix some completions 2012-05-05 19:46:01 +02:00
mathieui
5670304b17 Use COLOR_OWN_NICK whenever possile (Fixes #2318) 2012-05-05 17:32:13 +02:00
mathieui
fcdf98eda2 Add a /ban command, and fix completion & parameters for /kick 2012-05-05 02:07:48 +02:00
mathieui
18ba25fa6b Fix /groupmove 2012-05-04 23:05:36 +02:00
mathieui
91ab569e52 Do not quote the JID for /remove completion 2012-05-04 19:41:59 +02:00
mathieui
7778ad9216 0030 query now says 'Poezio' or nothing for the client’s identity
(Fixes #2273)
2012-05-04 18:52:36 +02:00
mathieui
8fc6e53661 Make the visitor’s color readable (Fixes #2342) 2012-05-04 18:31:36 +02:00
mathieui
3c3750098c Remover leftover unused 'resources' property 2012-04-29 19:17:38 +02:00
mathieui
ffae7e7eb8 Trigger only the 'normal_presence' event if the contact is in the roster 2012-04-28 00:01:35 +02:00
mathieui
24341c8429 Prevent some iteration problems 2012-04-27 23:42:22 +02:00
mathieui
de63a1affd Roster update: Merge branch 'master' of https://git.louiz.org/poezio
Conflicts:
	src/core.py
	src/tabs.py
2012-04-27 23:09:26 +02:00
mathieui
2488216fba Update the ConversationTab 2012-04-27 22:54:11 +02:00
mathieui
3bd893e6b4 Update group commands 2012-04-27 22:53:58 +02:00
mathieui
f71e2a9cb1 Update commmand_add, command_remove, command_accept, and command_deny 2012-04-27 22:41:16 +02:00
mathieui
7c8fe132eb Update the roster search functions 2012-04-27 22:36:58 +02:00
mathieui
2957cded91 Fix the completion for all commands manipulating the roster 2012-04-27 22:34:12 +02:00
mathieui
6743bb5d94 Add the new subscription handlers and update on_message() and disconnect() 2012-04-27 22:30:01 +02:00
mathieui
2c09dcf6b4 Update the got_online, got_offline, and presence handlers 2012-04-27 22:27:34 +02:00
mathieui
02ad8d4f1c New roster attributes and new subscription events 2012-04-27 22:17:32 +02:00
mathieui
774ed40e74 Necessary modifications for the API change 2012-04-27 21:58:31 +02:00
mathieui
725a2245f3 Remove some debug info 2012-04-27 21:09:26 +02:00
mathieui
8c5faa91f2 New Contact and Resource class
Changed from Resource:
    - __init__() takes as a parameter a reference to the sleek dict
    - No more setters, information is directly taken from the sleek
      roster

Changed from Contact:
    - __init__() takes a sleek RosterItem for the contact
    - add_resource() → Ø
    - remove_resource() → Ø
    - get_resource_by_fulljid() → Ø
    - get_nb_resources() → __len__()
    - get_resource_by_fulljid() → __getitem__() or get()
    - No more setters, information is directly taken from the sleek
      roster
2012-04-27 20:50:00 +02:00
mathieui
527e582fb0 New Roster class and new RosterGroup class
Removes for Roster:
    - empty() → Ø
    - get_contact_len() → Ø
    - remove_contact_from_group() → Ø
    - add_contact_to_group() → Ø
    - add_contact() → add()
    - remove_contact() → __delitem__()
    - get_contact_by_jid() → __getitem__()
    - edit_groups_of_contact() → update_contact_groups()

Removes for RosterGroup:
    - has_contact() → __contains__()
    - add_contact() → add()
    - remove_contact() → remove()
    - is_empty() → __len__()
2012-04-27 20:30:05 +02:00
Florent Le Coz
2a3434b1f8 Fix the get_nick issue correctly this time. 2012-04-27 19:40:39 +02:00
Florent Le Coz
4ee3566a74 Avoid a traceback when getting the nick of a converstation with someone not in our roster. fixes #2356 2012-04-26 01:57:46 +02:00
mathieui
2f78a5f2dd Add an autofill for /name in the roster when 'n' is pressed 2012-04-19 17:37:53 +02:00
mathieui
5a1a7a567d Do not quote the plugins on completion 2012-04-19 13:08:35 +02:00
mathieui
46c197ef7f Fixes #2355 2012-04-19 01:33:16 +02:00
mathieui
abe8c0ab71 Add a show_roster_jids option 2012-04-19 00:20:03 +02:00
mathieui
9ddd2481c7 Show the current status in the ContactInfoWin 2012-04-19 00:12:41 +02:00
mathieui
80b1e835b7 Show the contact info in the roster when 'i' is pressed 2012-04-19 00:12:22 +02:00
mathieui
71596ec10b Add a 'v' keybind on the roster to get the version of the selected
resource-s
2012-04-18 23:45:16 +02:00
mathieui
bdcddf56e1 Load xep_0092 even if send_poezio_info is false 2012-04-18 23:07:28 +02:00
mathieui
cc00f44e77 Add a /groupmove command. Fixes #2352
(based on a patch from gio)
2012-04-18 19:42:37 +02:00
mathieui
37e3c1ea29 Fix a small mistake 2012-04-18 19:42:04 +02:00
mathieui
b3c4dd93eb Add new options use_tab_nicks, show_tab_numbers, and show_tab_names
(thanks gio)
2012-04-18 15:55:24 +02:00
mathieui
384f6939cb Add a get_nick method to the tabs 2012-04-18 15:54:52 +02:00
mathieui
6b01e71462 Adda config.getl to return a lowercase value 2012-04-18 15:54:16 +02:00
mathieui
d52f5ba40f Do not quotify completions where it is not allowed 2012-04-18 00:35:24 +02:00
mathieui
609f55a4d7 Quote everything that is completed by default, except commands 2012-04-18 00:23:28 +02:00
mathieui
c2e122d873 Do not split on command_accept as it is unneeded 2012-04-18 00:22:30 +02:00
mathieui
5c06af299e Fix some completions accordingly (name/groupadd/groupremove) 2012-04-18 00:21:53 +02:00
mathieui
1fdb91a983 Split correctly on command_groupremove 2012-04-18 00:18:18 +02:00
mathieui
abd8d30990 Split correctly on command_name 2012-04-18 00:17:46 +02:00
mathieui
3a1a1dcc6d Do not split on command_deny as it is unneeded 2012-04-18 00:17:16 +02:00
mathieui
3138240150 Do not split on command_unignore as it is unnecessary 2012-04-18 00:16:44 +02:00
mathieui
e934d8b513 Do not split on command_ignore as it is unnecessary 2012-04-18 00:16:00 +02:00
mathieui
4ab6a591cf Remove a if not len(list) in command_kick 2012-04-18 00:14:56 +02:00
mathieui
1c18c6e2b5 Do not split on command_part as it is unnecessary 2012-04-18 00:14:08 +02:00
mathieui
d0e0be2dd6 Do not split on command_nick as it is unnecessary 2012-04-18 00:13:44 +02:00
mathieui
dd751ea14d Do not split on command_version as it is unnecessary 2012-04-18 00:13:09 +02:00
mathieui
13a9811cf6 Do not split on command_recolor as it is unneeded 2012-04-18 00:11:58 +02:00
mathieui
d049ea7534 Do not split args in command_info as it is not needed 2012-04-18 00:10:57 +02:00
mathieui
22cd80feb5 Refactor command_win a bit 2012-04-18 00:10:10 +02:00
mathieui
54a43ab132 Remove if len(list) in command_theme 2012-04-18 00:09:39 +02:00
mathieui
aef2a905d1 Refactor command_list a bit 2012-04-18 00:09:12 +02:00
mathieui
43b28a1ab0 Replace arg.split with shell_split in command_message 2012-04-18 00:07:51 +02:00
mathieui
406e24dcff Remove if len(list) in command_help 2012-04-18 00:07:22 +02:00
mathieui
265702b150 Add a way to bookmark all the rooms at once
(/bookmark * or /bookmark_local *)
2012-04-15 23:55:50 +02:00
mathieui
941acdb612 Fixes #2350 (reloading static resources on SIGHUP) 2012-04-02 18:30:06 +02:00
mathieui
4cf1acd9e4 Fixes #2349 2012-04-02 17:09:11 +02:00
mathieui
a6187895c7 Do not show the traceback if unloading a plugin failed 2012-03-31 01:28:11 +02:00
mathieui
372b032380 Should fix the refresh issue 2012-03-30 15:57:43 +02:00
mathieui
791bcf19b1 Fixes #2347 2012-03-28 23:08:31 +02:00
mathieui
b1cbbc62c8 Remove some useless refreshs 2012-03-26 15:26:03 +02:00
mathieui
418b800ad7 Do not add stanzas to the xml_tab buffer unless there an is active one 2012-03-25 14:37:40 +02:00
mathieui
3734304091 Fixes #2343 2012-03-17 13:33:00 +01:00
mathieui
c6e4358706 Fix bookmarks 2012-03-13 21:39:06 +01:00
mathieui
5ce8105ec6 Fix /affiliation 2012-03-13 21:31:36 +01:00
mathieui
27a7bfc92c Add a whitespace_interval option 2012-03-13 18:46:02 +01:00
mathieui
6d2af1116c Fix a bug in plugin unloading (commands/keys not deleted properly) 2012-03-09 23:24:29 +01:00
mathieui
4f423f1e3a Fixes #2339 2012-03-09 22:45:41 +01:00
mathieui
163efe809a Bring back /set completion 2012-03-09 22:01:28 +01:00
mathieui
5c412a66b8 Add a ca_cert_path option 2012-03-09 00:48:49 +01:00
mathieui
9d42ebdf2e Validate the SSL cert using the TOFU (Trust On First Use) model 2012-03-08 22:39:30 +01:00
mathieui
13a269d6b2 Fix a bug in the configuration writer 2012-03-08 22:38:26 +01:00