Commit graph

1787 commits

Author SHA1 Message Date
Florent Le Coz
16d80a2f25 FormWin now scrolls when needed, as the cursor is moved up and down 2014-05-01 16:33:44 +02:00
Florent Le Coz
f7a5847f75 Move data_forms in the tabs directory 2014-05-01 05:24:50 +02:00
mathieui
c287a959b4 Fix bugs in the previous/next highlight functions 2014-05-01 02:28:01 +02:00
mathieui
c1d19fa548 Set the terminal title to "poezio" by default 2014-04-30 21:54:25 +02:00
mathieui
bbdc14aaa5 Remove Tab.get_name() and use Tab.name instead
(keep a get_name() fallback just in case for now)
2014-04-30 21:34:09 +02:00
mathieui
d859ec2ea1 Add a 'tab_change' event 2014-04-30 20:37:18 +02:00
mathieui
4e4ab569cf Fix #2447 (OTR & HTML) -- partial WONTFIX
- Guess-parse the OTR messages in search for xhtml upon arrival
- add a configurable option to decode it or not
- We have XHTML-IM for a reason, and therefore we will *not* implement a
  full html parser for clients that dump whatever formatting inside the
  OTR payload (looking at you, pidgin)
2014-04-30 01:55:23 +02:00
mathieui
c3dd20fc74 Fix #2510 (link displayed twice in xhtml-im)
- also, fix the /xhtml command that was nesting one <body/> too many
2014-04-30 00:43:21 +02:00
mathieui
5f0afab060 Do not ask for receipts in messages without a body 2014-04-29 22:14:03 +02:00
mathieui
793b78f009 Fix a traceback in /topic (with no argument) 2014-04-29 03:12:57 +02:00
mathieui
6391d97b3a Fix most UI issues with introduced in 0caf941 2014-04-29 02:20:06 +02:00
mathieui
9e72f8336d Add the size manager (forgotten in the previous commits) 2014-04-29 00:29:54 +02:00
mathieui
8241f5d6fc Update CHANGELOG
(also, fix a traceback-typo)
2014-04-28 23:37:42 +02:00
mathieui
0caf9417b2 Make the size modular, remove small-size lock (also seems to fix #2155)
some stuff is now hidden wen the window size gets too small (might need
some adjustments). The info buffer in the roster tab, the userlist in
mucs, the vertical tab list, the info buffer everywhere, etc…
2014-04-28 23:29:21 +02:00
mathieui
069283e349 Don’t escape backslashes unless we are inside a quoted string and the next char is a quote
Sadly, we can’t doctest stuff with backslashes because it drives doctest
crazy.
2014-04-28 00:20:57 +02:00
mathieui
31716565a7 Provide our own wrapper for checking the host category (ref #2511?)
xmpp.plugin['xep_0030'].has_identity appears to be unreliable at best,
so we provide our own.

Might help the case of carbons not displayed.
2014-04-27 22:38:24 +02:00
mathieui
3fb3d8db3d Fix memleaks in pooptmodule.cut_text (ref #1914)
- we need to decrement the refcount after giving the tuple to the
  retlist in order to transfer ownership

The example script below will quickly take gigabytes of ram with the
old module, while the new will not take noticeably more memory.

The leak is not very visible on launch, because we “only” leaked each
tuple returned, and (int, int) is not heavy. However, after weeks of
use and many messages, the memory still isn’t freed and it shows.

import poopt
import gc

a = 'coucouco ' * 1000
for i in range(100000):
    if not (i % 10000):
        print(i)
    poopt.cut_text(a, 50)
2014-04-27 21:38:29 +02:00
mathieui
5999b71c41 Fix #2106 (implement message delivery receipts)
- two options request/ack_message_receipts
- two new theme parameters : CHAR_ACK_RECEIVED and COLOR_CHAR_ACK
- if a message has a receipt, the character is displayed between the
  timestamp and the nick, using the color
2014-04-27 16:32:03 +02:00
mathieui
60224bb76a Fix weird behavior while using the input in the muclisttab 2014-04-27 02:17:00 +02:00
mathieui
3cb2c8351a Fix a resize issue when vertical tab list options are set from the roster 2014-04-27 01:59:02 +02:00
mathieui
fea4f95de9 80-columns wrap for MucTab and fix some completions
- fix the /version completion with spaces
- fix the /unignore completion with spaces
2014-04-26 23:49:52 +02:00
mathieui
0d5d36465c Document /recolor random with /help too 2014-04-26 14:41:19 +02:00
mathieui
4172a79117 Fix #2514 (add a /toggle command) 2014-04-26 14:27:02 +02:00
mathieui
1f0ff4f0c3 Fix #2444 (implement room destroy)
- destroy the current room if no parameter
- destroy the room given as a parameter if any
- no reason or alt room because it would be ambiguous in a command
  (implementation ideas welcome)
2014-04-26 14:05:28 +02:00
mathieui
4c4e2083a6 Fix the nickname of server-generated messages 2014-04-26 11:50:00 +02:00
mathieui
947cd13107 Disable 0198 for now because we will properly implement it later 2014-04-26 11:49:11 +02:00
mathieui
4a26dea66d Fix #2516 (display error with carbons)
- fix the bug where messages from our own jid were incorrectly displayed
- the nick is now fixed for the whole conversation
2014-04-25 20:48:40 +02:00
mathieui
98914b8b0a Fix a traceback when sorting a listwin 2014-04-24 23:39:12 +02:00
mathieui
1bd9f78fe6 Improve src/theming.py (print the colors and do not pollute the terminal) 2014-04-24 21:26:13 +02:00
mathieui
828f60fcb8 Update the themes dir during execution, and not at module level 2014-04-24 21:25:31 +02:00
mathieui
5012611bd7 Make keyboard.py a bit nicer to use 2014-04-24 21:13:31 +02:00
mathieui
4de2dfc72b Fix a bug in the config._parse_file function (traceback when parsing empty files) 2014-04-24 21:12:48 +02:00
mathieui
3bfe93824c Wrap yet another curses operation with a lock 2014-04-23 20:05:51 +02:00
mathieui
efa6b4254d Fix #2450 (redraw top-scrolled tabs properly after resize) 2014-04-23 20:05:02 +02:00
mathieui
e6ce1ce7b6 Map Config.remove_and_save to PluginConfig.remove 2014-04-22 20:17:19 +02:00
mathieui
b01d94294a Add a way to remove options from the config file
(still surgically, without touching comments or anything else)
2014-04-22 20:16:27 +02:00
mathieui
3415619895 80-columns wrapping and some docstrings
also bump version, and add some gettext wraps
2014-04-22 20:02:07 +02:00
mathieui
b14aceaa4f Close the file descriptor of the fifo on closing
(also, it indeed needs to be a thread because opening
a fifo for reading is a blocking operation)
2014-04-22 19:57:25 +02:00
mathieui
266ab8e10d Split the config.write_in_file method to be more modular and cleaner
Will also allow a remove_in_file or whatever to remove options instead
of blanking them.
2014-04-21 23:46:12 +02:00
mathieui
d66aa8cf66 Log exit from signals to the error log
(SIGTERM, SIGHUP, and SIGPIPE for now)
2014-04-20 17:47:16 +02:00
mathieui
3622443631 Keep a file descriptor reading the fifo instead of just opening and closing it
should take care of the sigpipe when no one is reading it anymore due to
broken connection
2014-04-19 06:36:10 +02:00
mathieui
0401029854 Same formatting changes in core.commands 2014-04-18 23:10:12 +02:00
mathieui
2879d3c694 Mostly line-wrap at 80 chars and add docstrings
- also fix some erroneous comment(s)
- remove self.background which wasn’t set to something other than false
- fix the chatroom address (and the doc) in the first help message
2014-04-18 19:41:20 +02:00
mathieui
28d928999d Fix #2297 (crash after resize)
wrap some curses calls with try/except block
2014-04-18 19:18:48 +02:00
mathieui
dc08adf605 Do not lock on the “composing” chat state with otr
might send too many stanzas when send_chat_states is false, but I don’t
care.
2014-04-17 20:39:01 +02:00
mathieui
71ae73ca7b Log part messages and show a leave message on /cycle 2014-04-17 00:02:19 +02:00
mathieui
214904f199 Change the formatting of join/part messages
also remove some hardcoded stuff
2014-04-16 23:07:00 +02:00
mathieui
a784216196 Fix #2440 (highlight composing tabs)
- add a show_composing_tabs option, default value: "direct"
- todo: find a nice different color for this
2014-04-15 22:57:44 +02:00
mathieui
80ebe9edc0 Fix the color of the message with /part
(it now uses the theme)
2014-04-14 22:59:40 +02:00
mathieui
3221534b0f Implement XEP-0249 (Direct MUC Invitations)
- fallback to mediated invitations if only the bare jid is given to the
  command or if the jid does not advertise support

TODO: provide a way to send passwords
2014-04-14 22:32:34 +02:00
mathieui
245f5f050c Fix #2422 (traceback in input) (also #2431)
now the scroll is made with 1/3 of the input size every time instead of
fixed offsets
2014-04-14 20:56:05 +02:00
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