Commit graph

1786 commits

Author SHA1 Message Date
mathieui
b884e6d6e2 Fix #2339 (put the more “important” users at the bottom in the userlist when configured)
(one-line fix, and the others are for reformatting imports to be consistent)
2014-04-14 19:51:56 +02:00
mathieui
e3859c2862 Do not load a plugin if its init() traceback
and show a somehow helpful error message in this case
2014-04-13 23:13:18 +02:00
mathieui
9c2203e7e3 Do not show the plugin unload on exit 2014-04-13 22:39:49 +02:00
mathieui
f809dffd8e Remove module-level code from the plugin manager as well 2014-04-13 22:38:25 +02:00
mathieui
165ee9ee1a Fix #2503/4 (use “.” as an alias for the current tab in /move_tab) 2014-04-12 02:59:49 +02:00
mathieui
f58dfe26af Only highlight the nick if it is not inside a word
thanks gio
2014-04-12 00:34:25 +02:00
mathieui
04aa6c8914 Fix #2428 (complete fulljids on /version in MUCs)
also clean up some newlines mess
2014-04-11 01:25:00 +02:00
mathieui
0847643b54 Fix #2421 (load and unload several plugins) 2014-04-11 00:55:42 +02:00
mathieui
d18fe6c477 Do not traceback when unable to read the config file 2014-04-11 00:43:22 +02:00
mathieui
d1609b97e4 Fix #2497/#2498 (/theme should return an error when loading fails)
It was actually doing that for old python version but not recent onces
2014-04-09 20:10:07 +02:00
mathieui
7803103891 Actually fix that bookmarks typo bug 2014-04-09 00:26:47 +02:00
Florent Le Coz
369034a64a Fix a forgotten "self." that caused alt+k to traceback 2014-04-08 23:40:01 +02:00
mathieui
1ce485c6fa Fix #2354 (logs are badly colored with xhtml history)
- now it should work properly
- add a COLOR_LOG_MSG theming option, used both for local and remote
  history
2014-04-07 01:25:30 +02:00
mathieui
53040305ce fix a wrong naming in the previous commit 2014-04-06 20:18:31 +02:00
mathieui
e216fd2112 Code cleanup
fixes whitespace issues, some builtin overrides, and some enormous lines

might make poezio run nanoseconds faster!
2014-04-06 19:58:57 +02:00
mathieui
218c71dfbf Do not instantiate the roster at module level
.
2014-04-06 17:30:52 +02:00
mathieui
e000466ab8 Do not instantiate the message logger at module level
.
2014-04-06 17:26:33 +02:00
mathieui
fe07016322 Do not instantiate the Config at module load
delayed execution is cleaner and less error-prone
2014-04-06 17:26:21 +02:00
mathieui
964e84e11b Fix room joining on muclisttab that was broken in the previous commit 2014-04-06 00:30:43 +02:00
mathieui
f405984f8d Always enable the cursor when we refresh an input
fixes some bugs when closing tabs that disable it
2014-04-06 00:19:36 +02:00
mathieui
7b446d9b4d Improve drastically the performance of the MucListTab
- avoid doing stringprep on every item, avoid at least one full copy
- add the number of items to the infowin
2014-04-06 00:15:01 +02:00
mathieui
7c7f9b2f47 Do not instantiate Keyboard at module-level 2014-04-05 21:42:27 +02:00
mathieui
8def5609d9 Remove the pubsub-related stuff from the main branch
as it is unused code anyway.
2014-04-05 17:57:45 +02:00
mathieui
587450939b Fix a bug introduced in ca0950d 2014-04-05 17:54:24 +02:00
mathieui
673788bf46 Split the Core class
Although the logic stays the same, and everything is put back together
in a single class.
2014-04-05 17:50:50 +02:00
mathieui
38061a6397 Improve /bookmark *
- /bookmark{_local,} * now keeps the order of the tabs, and puts the
  currently non-opened tabs at the end of the list.
- also fix a bug in remote bookmark saving
2014-04-05 14:19:22 +02:00
mathieui
d2de6236f2 Enable XEP-0198 (Stream Management) 2014-04-04 01:13:36 +02:00
mathieui
cbc805b6d5 Fix a hidden traceback on groupchat messages 2014-04-04 00:42:12 +02:00
mathieui
695877ba2b Do not log correction errors in the error log anymore 2014-04-04 00:25:46 +02:00
mathieui
ca0950db07 Remove unused imports
(thanks eijebong)
2014-04-04 00:24:16 +02:00
mathieui
b6d6070751 Update the ugly timestamp fixes for better DST detection 2014-04-03 01:33:59 +02:00
mathieui
ace9fc6661 Fix #1998, #2439 (reset chat state status) 2014-04-02 21:53:12 +02:00
mathieui
c9069ce623 Fix #2377 (send back unavailable presence on message from unknown room) 2014-04-02 21:40:58 +02:00
mathieui
52e6334c8c Fix #2340 (change tab priority when the input is not empty) 2014-04-02 21:33:17 +02:00
mathieui
65c247399d Fix #2323 (implement XEP-0012 last activity)
TODO: check if this method of setting activity isn’t a bit heavy.
2014-04-02 01:04:53 +02:00
mathieui
b042a07c69 Fix activation of mood/activity which was inverted 2014-04-01 23:55:26 +02:00
mathieui
a6ffc46827 Fix common.py for OLD python3 versions 2014-04-01 23:25:21 +02:00
mathieui
09254dabc7 Fix the roster offline show toggle 2014-04-01 23:18:44 +02:00
mathieui
02d9fd9ad4 Fix #2462 (wrong timezone in the logs)
Now everything in the logs is in UTC time, and is converted when read

(also, actually return the logs after loading them instead of not doing
anything)
2014-04-01 00:03:29 +02:00
mathieui
a0c7155140 Fix a traceback with broken roster items
only happens with buggy servers (hello ejabberd)
2014-03-31 22:19:42 +02:00
mathieui
c537485c0d Fix #2493 (private tab displaying a join on /nick) 2014-03-28 01:01:24 +01:00
mathieui
f7294b29e4 Improve dynamic conversation tabs
Add color to the info messages
Unlock the tab when the locked resource goes offline
2014-03-28 00:53:18 +01:00
mathieui
c2d9151f38 Returning the value fetched with RawconfigParser.getint is actually quite useful
…………………………
2014-03-28 00:30:12 +01:00
mathieui
0ee19d51eb When doing a self.config.set in a plugin, save the config too 2014-03-27 23:09:13 +01:00
mathieui
8d4202501d Use RawConfigParser.get{int,bool,float} whenever possible
config.get('option', 'value').lower() == 'value' is just ugly and
stupid, especially for bool.

One if in basetabs:556 was also missing a comparison, leading to True
whenever the option was set.
2014-03-24 23:25:06 +01:00
mathieui
6b1e3dd4ac Allow opening a static conversation even when a (dynamic) conversation with the contact is already open 2014-03-23 01:06:15 +01:00
mathieui
5c9dd44037 Add jid info to the unlock messages 2014-03-23 00:47:05 +01:00
mathieui
fba511e266 Notify the user whenever the lock state of a dynamic conversation changes 2014-03-23 00:38:33 +01:00
mathieui
186803d9a9 Fix formatting, some typos, and unused code, and add docstrings
- No idea why subclasses of ConversationTab were working before
    (info_header was overriden with None in __init__)
- Or why the date parsing worked (“Exeception”)
- Some more reformatting with pylint indications
- Document each module in the tabs module
2014-03-23 00:15:01 +01:00
mathieui
918e15d178 Fix a hidden traceback (NS_MUC_USER not exported in tabs/) 2014-03-22 17:20:15 +01:00
mathieui
1c621caae1 split the "tabs" module into separate files
- todo: write a common import file to avoid duplicating the imports
2014-03-19 02:22:25 +01:00
mathieui
be74128cb7 small refactor
- add a get_tabs(cls) method to avoid manual filtering
- move some stuff to avoid cyclic dependency hell between tab classes
2014-03-19 01:04:51 +01:00
mathieui
109b4aa1f4 Parse message timezones correctly 2014-02-23 20:30:55 +01:00
mathieui
d165f13a81
Bump dev version 2014-02-22 14:28:08 +01:00
Emmanuel Gil Peyrot
a64dd02118 Remove the dependency on poezio from xhtml.py 2014-02-22 01:11:57 +01:00
Emmanuel Gil Peyrot
9240bc3964 Move the XHTML-IM parser to SAX, to make it output a correct formatting, fixes #2239 and many more 2014-02-22 00:56:14 +01:00
mathieui
8ca738e8a9 Fix #2474 (bans aren’t logged) 2014-02-22 00:19:22 +01:00
mathieui
a9f0607123 Fix #2470 (server_cycle joining the wrong room with domain-only muc) 2014-02-20 08:39:40 +01:00
mathieui
35f3f53334 Fix a traceback in the commandinput
When the connection lags and the user presses tab,
poezio will insert a tab inside the input, wich has now
a specific formatting. This caused poezio to crash.
2014-02-17 21:44:40 +01:00
mathieui
4645bd7a2f Documentation update
ssl page (img & ref)
theming (compile errors, format and typos)
2014-02-17 20:21:54 +01:00
mathieui
384fd3e029 Call on_gain_focus on the new current tab after closing a tab 2014-02-14 00:59:59 +01:00
Mathieu Pasquet
05a9e03d53 Add a configurable way of setting cipher suites
And put reasonable defaults
2014-02-13 00:50:32 +01:00
mathieui
7e3efccb53 Fix #2407 (unencrypted connections)
Add a force_encryption option set to true by default.
2014-02-13 00:48:19 +01:00
mathieui
f43f06214e Fix #2458 (correctly display non-groupchat room messages) 2014-02-12 23:36:58 +01:00
mathieui
0320ee16d4 Remove the simple blocking warning (useless) 2014-02-04 20:17:03 +01:00
mathieui
2b9fb90ca7 Fix #2418 (Wrong character count in input with copy/pasted tabulations)
- Replace tabulations in the input by highlighted “t”s
- More readable, and less messy to deal with.
2014-02-03 23:57:18 +01:00
mathieui
199ac46d90 Fix #2208 (time_marker shows an useless timestamp) 2014-02-03 23:37:22 +01:00
mathieui
fe4404d3f0 Fix #2424 (actualize --MORE-- when doing /topic) 2014-02-03 22:51:08 +01:00
Florent Le Coz
925ea453f3 Do not crash on /names with invalid affiliations 2014-02-03 21:35:58 +01:00
mathieui
20e5c69503 Do not unlock a tab when receiving a presence from the same resource
(makes OTR bug)
2014-02-03 08:40:32 +01:00
mathieui
bf682651e0 Date the log records (error.log or debug logs) 2014-02-01 23:33:45 +01:00
mathieui
7c0cf0c8be Fix #2441 (don’t send chatstates in a non-chatstate conv)
Also enable chatstates when we receive them from our contacts.
2014-02-01 19:10:50 +01:00
mathieui
3fe044d5b8 Fix #2437 (show version in /self) 2014-02-01 18:34:43 +01:00
Mathieu Pasquet
b4b8f2a455 Fix #2430 (whatever) 2014-02-01 18:27:43 +01:00
Mathieu Pasquet
0153106145 Also do not send empty <replace/> with each message 2014-02-01 18:20:46 +01:00
Mathieu Pasquet
8fbf50fa8e Fix #2443 (:) 2014-02-01 17:57:24 +01:00
Mathieu Pasquet
c16fc9c3e9 Fix #2445 (autcorrect not showing in private convs) 2014-02-01 17:54:31 +01:00
Mathieu Pasquet
ccb3abd704 Exit on SIGPIPE 2014-01-30 18:23:44 +01:00
Mathieu Pasquet
bee12fd22b Fix the nickname with carbons 2014-01-30 15:16:49 +01:00
Mathieu Pasquet
7e4a565517 Fix a traceback when opening an empty log file 2014-01-29 16:44:43 +01:00
Mathieu Pasquet
8a44d31e85 Add a logging option to the OTR plugin
It is tab-specific and off by default.
2014-01-29 16:41:57 +01:00
Mathieu Pasquet
2ac24d6883 Provide a more standardized fingerprint representation
(also includes silent modification of the hash already
in the config)
2014-01-28 18:54:46 +01:00
mathieui
f9e70fa656 Previous commit with get/set 2013-12-28 17:16:35 +01:00
mathieui
83b44c863e Fix #2281 (display iq results when sent with /rawxml) 2013-12-28 16:57:36 +01:00
mathieui
91392c721f Fix #2414 (don’t use /tmp/dummy in the logging config) 2013-12-28 16:31:42 +01:00
Mathieu Pasquet
c0e010e2cd Write the config to a tmp file before a final copy
(should prevent some conditions leading to config
corruption happenning when poezio cannot write anymore)
2013-12-04 01:14:28 +01:00
Mathieu Pasquet
4a7e18cd03 Handle signals differently than /quit
- do not save the config (only for roster and stuff)
- do not except that resetting the curses state will work everytime
2013-12-04 00:11:44 +01:00
Mathieu Pasquet
0ad9712d0c refactor the texts in core to be more readable and fix some typos 2013-11-26 18:37:06 +01:00
Mathieu Pasquet
66d6c34f41 Fix a tb 2013-11-14 21:31:57 +01:00
Mathieu Pasquet
ff9478259d Add a /password command in the RosterTab
Thanks to Florob for the initial input
2013-11-14 21:26:19 +01:00
Florent Le Coz
0c507859fb On kick, get the actor 'nick', before trying the 'jid'
'nick' attribute has been introduced recently in the XEP. We still try the
'jid' attribute for backward compatibility. And also we don’t traceback
anymore if any of these fields is not present.
2013-11-13 00:42:08 +01:00
Florent Le Coz
e02f93a8ef Increase the number of chars to "jump" when the cursor goes out of the input 2013-10-21 00:41:50 +02:00
Florent Le Coz
32308646de And I forgot to scp this file :x 2013-10-21 00:22:39 +02:00
Florent Le Coz
b12a6b3ba9 Improve the input a lot
Noticeable changes:

- The input "view" is smarter, it always move to a decent position so we can
  see enough text around the cursor.
- The cursor goes at the end of the input when pasting some long text
- The formatting chars (^C and o, b, a, 1, 2, 3 etc) are now visible in the
  input. This makes it a lot easier to know where these special characters
  are, to change them and efficiently edit our text (we just lose a little,
  on the cosmetic side, but who cares)
- The code is actually a lot simpler in the functions to move the cursor,
  insert/delete chars: we do not have to deal with special cases where the
  formatting characters are actually composed of two chars.

fixes #2183
2013-10-20 23:42:13 +02:00
Mathieu Pasquet
dd4f8661a9 Fix #2358 (/correct is broken in private conversations) 2013-10-06 22:45:38 +02:00
Mathieu Pasquet
0124ac1b06 Give help about tab-specific command first in /help
(the tab-specific commands were executed first, but their help wasn’t
given first)
2013-10-06 19:52:57 +02:00
Mathieu Pasquet
08ce5c6d00 , 2013-10-06 18:55:16 +02:00
Mathieu Pasquet
030d4b4b2a Fix #2361 (extract the PEP list directly from the XEPs) 2013-10-06 18:44:41 +02:00
Mathieu Pasquet
11c93a12a3 Fix a refresh issue in the roster 2013-10-06 18:09:33 +02:00
Mathieu Pasquet
8e63ad3a08 Fix #2373 (/message creates duplicate tabs) 2013-10-06 18:03:38 +02:00
Mathieu Pasquet
9c775da5f7 Fix #2369 (black nick color) 2013-09-19 00:28:11 +02:00
Mathieu Pasquet
40af34ad7c Fix #2372 (traceback on space in roster after disconnect)
selected_row wasn’t reset
2013-09-19 00:19:42 +02:00
Mathieu Pasquet
b245ff6e2d Fix /export 2013-09-16 13:08:28 +02:00
Florent Le Coz
099d1d1c2c TIL splitlines() 2013-09-06 17:35:50 +02:00
Florent Le Coz
4b662ffa67 Much more efficient and clean way to get the last n messages from history 2013-09-06 14:24:05 +02:00
mathieui
cb8884bae4 quote a completed word if it has \ in it 2013-08-16 17:49:05 +02:00
mathieui
1a92c51ddf Fix an issue with shlex
(well, sort of fix)
2013-08-16 16:21:54 +02:00
mathieui
7820f98568 Move shlex to poezio_shlex to avoid conflicts with the stdlib 2013-08-15 01:07:47 +02:00
mathieui
6f2cca61d4 Remove debug 2013-08-13 07:39:12 +02:00
mathieui
a724be0e72 Typo 2013-08-10 23:24:35 +02:00
mathieui
74de91e2bf Fix potential issues with import paths 2013-08-10 15:51:35 +02:00
mathieui
518f933fb8 Fix #2343 2013-08-10 01:50:03 +02:00
mathieui
64c1a09023 Fix #2337 (search the themes the same way than plugins)
- Load the themes from:
    1 - The sources found in the directory ../data/themes/ (if it
    exists)
    2 - The user-defined dir (or ~/.local/blah)
    3 - The poezio_themes package if found

- Also fix some potential issues with the plugins importer
2013-08-10 00:24:27 +02:00
mathieui
2fe84a1188 Fix a crash for python < 3.3 2013-08-06 22:23:47 +02:00
mathieui
3e7353758e Fix the folder creation for roster changes 2013-08-06 19:07:44 +02:00
mathieui
e40a3d72f5 Add a specific /invite command for the MucTab 2013-08-05 23:29:36 +02:00
mathieui
406454fdd0 Fix common.shell_split with empty strings 2013-08-05 19:45:08 +02:00
mathieui
feb101f158 Fix some refresh quirks 2013-08-04 15:29:43 +02:00
mathieui
416ceddbe4 Add the same pluggable "information element" to the PrivateTab 2013-08-04 15:28:35 +02:00
mathieui
d01f6208d6 If plugins removed the message body in a callback, don’t send it 2013-08-04 14:50:58 +02:00
mathieui
1496876136 Add the name of the plugin when loading it fails 2013-08-04 14:50:58 +02:00
mathieui
e5e63d4725 Prevent messages with typ=0 from being logged
(new typ value)
2013-08-04 14:50:57 +02:00
mathieui
7538093a07 Do not load logs if use_logs is false 2013-08-04 11:21:28 +02:00
mathieui
135ef1b364 Fix a traceback on get_logs 2013-08-04 11:06:05 +02:00
mathieui
decb2bb27e Remove test code added by accident 2013-08-03 19:30:09 +02:00
mathieui
31c2e23c4c Logs errors by default, in a dedicated file
- log_errors option, true by default
- errors go in log_dir/errors.log (so $XDG_DATA_HOME/errors.log
    by default)

This should help a lot for debugging, and provide a way for people
to easily give debug traces without useless or personal infos.
2013-08-03 19:27:25 +02:00
mathieui
6fbb2f8593 Fix #2317 (/join completion is broken)
Also add an override parameter to new_completion so that the
completion does not care if the list matches the previous input
or not.
2013-08-02 22:00:53 +02:00
mathieui
bb59771d99 Fix #2049 (get the current completed argument)
A command argument can now be completed even if it isn’t the last
one in the input.

- Add a new method Input.new_completion
    Almost like the old auto_completion method, except taht it takes
    another argument: argument_position, which is the argument to be
    completed.
- Methods using the old completion method still work
- All completion methods in poezio now use the new one if necessary
- Further details can be found in the docstring of new_completion
2013-08-01 20:17:12 +02:00
mathieui
2744234d52 Move /clear_infos to /clear for consistency 2013-08-01 12:38:46 +02:00
mathieui
2730d8a2b5 ref #2318 (fix correction when the server doesn’t send back the same ids)
This will only work if the message ids are the same across all
participants…
2013-08-01 01:04:35 +02:00
mathieui
890945d037 Fix #2334 (wrong character length for formatting chars) 2013-07-31 23:56:49 +02:00
mathieui
19135d4a76 Fix #2306 (none, to, and from subscriptions should be more visible)
Added a configuration option and some theme variables.
2013-07-31 23:43:19 +02:00
mathieui
b249dad73d Fix #2341 (/message <bare/resource> doesn’t open a new tab…)
If a tab with the given fulljid is not found, then a new tab
will be opened, even if we are in discussion with the bare jid.
2013-07-30 20:47:12 +02:00
mathieui
cbcac03510 Fix #2335 (crash on /cycle with room without userpart) 2013-07-29 19:31:33 +02:00
mathieui
d64a95bd3b Fix an import broken with the last sleekxmpp update 2013-07-29 07:23:12 +02:00
mathieui
33a9f1434f Fix contact removal 2013-07-24 21:34:14 +02:00
Florent Le Coz
9b51377185 Correctly use Py_ssize_t instead of int, fix a segfault on some architectures 2013-07-07 20:25:58 +02:00
mathieui
cae5f64931 Move backwards in the input the same way we move forward (ref #2183) 2013-07-03 00:21:13 +02:00
mathieui
697e311ce7 Fix the repr() of messages for logging 2013-07-01 22:10:30 +02:00
mathieui
8fe39540a4 Fix an issue with roster loading
(why did that even work before)
2013-07-01 17:58:49 +02:00
mathieui
f8aa0f9826 Fix #2329 (display the info buffer in the muclisttab)
also fix some typos in the comments, and a refresh issue with the input
2013-06-30 19:36:32 +02:00
mathieui
bafecae0d3 Clear the XML Tab buffer when closing 2013-06-30 18:57:52 +02:00
Florent Le Coz
1a6dbad881 Better comments in poopt 2013-06-27 15:54:19 +02:00
mathieui
ec49a7b05d Ignore errors on PEP publishing (fix #2322)
(since we can’t do anything about them anyway)
2013-06-26 22:49:18 +02:00
Florent Le Coz
1ae7ff10d3 Nicer comments 2013-06-25 01:18:28 +02:00
Florent Le Coz
b7fbfb7f47 Aaaand that’s static 2013-06-25 01:17:20 +02:00
Florent Le Coz
1d9d085d15 Do not open a tab on Enter when searching in the roster
Often, we search people but don’t actually want to open a tab with them
(maybe the users wants to talk to a specific resource, or see the contact’s
status, or things like that)
To open a tab to talk to this contact, the user just need to type Enter twice
2013-06-25 01:10:33 +02:00
Florent Le Coz
f8c0d12750 Workaround for a bug (?) where wcwidth returns -1 for valid printable chars
For example 😆
2013-06-25 01:08:16 +02:00
mathieui
f4a4b79986 fix #2327 (don’t include chatrooms in the roster)
it might be a little slower than before (more checks)
2013-06-24 23:22:42 +02:00
mathieui
b70c154ff6 Fix /w completion 2013-06-24 15:54:39 +02:00