Commit graph

2040 commits

Author SHA1 Message Date
Florent Le Coz
5cc714a327 “Disconnected from server” message is now an error only if we didn't ask for it 2015-04-13 18:07:58 +02:00
mathieui
91fde24388
Display error messages inside a conversation
if the error has the same id as a sent message, it will be displayed
    with a cross where there is usually a checkmark (ack), and the
    received error will be appended to the message, in red.
if it does not have a know id, it will be added as another message to
    the conversation, without a nick, and in red.
2015-04-13 17:35:40 +02:00
mathieui
1c9257b4a2
Handle error messages for real 2015-04-13 15:24:12 +02:00
mathieui
83113d42fc
Add a "." shortcut to /set in order to set the section for the current tab JID
e.g. /set . notify_messages false would set the option for a section
named after the current tab.
2015-04-13 14:31:35 +02:00
mathieui
c8caccc9a1
Fix a bug introduced in ee6c7d3
(the command args parser would never parse three args, making /set
unable to set section-specific options)
2015-04-13 14:28:52 +02:00
mathieui
8f373ccb0e
Fix #3029 (reset completion when a command is executed) 2015-04-12 18:24:21 +02:00
mathieui
abc3af1bac
Allow /set option=value
/set displays its results in the form “option=value”, so allowing the
command to interpret the same format as a valid command is only logical
(and allows quick copy/paste and edit).
2015-04-12 18:14:25 +02:00
mathieui
ee6c7d374a
Fix #3035 (display config values on empty /set) 2015-04-12 18:10:33 +02:00
mathieui
190c7a4a7b
Save the bookmarks after changing the storage method
also fix a check that would make the handler never trigger…
2015-04-10 17:19:18 +02:00
Florent Le Coz
7b05fa47c1 Do not traceback on /set without any argument 2015-03-18 14:25:24 +01:00
Florent Le Coz
1a8b4eaebe The /list command should list rooms on the given fulljid, not just the bare jid 2015-02-26 03:16:42 +01:00
mathieui
4fd222a493
Remove the unused "logfile" option and do not append 'logs' to every log path 2015-02-21 23:17:59 +01:00
mathieui
1209bd94b6
Add a -c/--check-config option to check the config file
It displays the missing options and the ones which are changed
from the default values.
2015-02-21 23:16:52 +01:00
mathieui
5fc1f9728a
Fix a bug in /bookmark 2015-02-21 22:05:32 +01:00
mathieui
2583b6a934
Add a force_remote_bookmarks option 2015-02-21 22:04:03 +01:00
Florent Le Coz
c9a89dad87 Revert the --version thing, it is not supposed to display the software version 2015-02-16 20:41:35 +01:00
Florent Le Coz
a657d472cd Remove the optparse backward compatibility, and fix the --version feature 2015-02-16 20:33:54 +01:00
mathieui
14b58c528e
Update setup files
- remove “make uninstall” target which was broken a long time ago
- move very install action to the setup.py (alias “make install” to
  “python setup.py install”
- add some stuff to “make clean”
- update the config.py to search the default config file using
  pkg_resources (more reliable than dirname(__file__))
- install the html doc only if available
- use README.rst for the setup.py long_description

- also, update the copyright notice to 2015
2015-02-10 21:08:36 +01:00
mathieui
b376cdb35e
Fix a color not going back to normal when adding a row in the BookmarksTab 2015-02-09 23:02:26 +01:00
mathieui
9141e0c4d3
Add a bookmarkstab (fixes #2004)
now we can edit stuff, save or cancel those modifications, and change
the chose storage easily
2015-02-09 22:35:41 +01:00
mathieui
2da4474d6a
Refactor /bookmark to avoid code duplication 2015-02-09 22:35:41 +01:00
mathieui
6d6c38a82a
Do not enable the cursor during full screen redraw
(and restore it afterwards)
Could take care of some refresh issues with the position of the cursor
2015-02-09 22:35:41 +01:00
mathieui
9b773e6909
Change the bookmark interface
move the modulename to bookmark → boookmarks
add a bookmarklist class with
remove module-level variables
do a features check on startup before trying to fetch
    the bookmarks
2015-02-09 22:35:41 +01:00
mathieui
235fab4e9c
Fix some docstring spelling 2015-02-08 15:04:40 +01:00
Eijebong
5da85b94b3 Add a random arg to /color 2015-02-03 20:07:13 +01:00
mathieui
3c46d49704
Minor fixes to the certificate warning prompt (#2949)
- slightly lower the CPU usage (callback instead of active waiting w/ sleep)
- make the terminal beep so the user knows something happened
- prevent the user “escaping” the prompt by pressing /, s, or S
2015-01-28 09:54:30 +01:00
mathieui
eb6309da75
Remove another snippet of pre-3.4 compatibility 2015-01-21 14:19:02 +01:00
mathieui
1c5589bbd3
Make the ncurses unicode check earlier
and improve the message.
2015-01-20 20:35:25 +01:00
mathieui
a2678b02d9
Add a check for python ncurses unicode support
Exit almost gracefully instead of generating gigabytes of error logs.

TODO: pressure the python maintainers into dropping ncurses and curses
      support, and use ncursesw only instead.
2015-01-20 00:57:26 +01:00
Florent Le Coz
c580840d77 Properly ignore stderr and redirect stdout when execute a command
fix #2933
2015-01-19 17:50:05 +01:00
mathieui
889eea463d
Fix a fallback path in bookmarks.py and use a single-dispatch function
(if we gave parse_from_element an Element instead of a Conference object,
it would crash)
2015-01-15 21:45:57 +01:00
Florent Le Coz
b02716ffbd Remove the annoying (and pretty useless) warning about psi+ users 2015-01-08 16:38:11 +01:00
Florent Le Coz
b6019edfa2 Trigger a /recolor when we set deterministic_nick_colors=true 2015-01-06 01:08:05 +01:00
mathieui
741ea61454
Log the plugin errors too 2015-01-05 16:57:28 +01:00
mathieui
70536f4f0b
Fix #2578 (disable roster features with anonymous connections) 2015-01-04 15:13:38 +01:00
mathieui
d809ba05bf
Do not trigger the “tab_change” event when going over a gaptab 2015-01-03 21:06:56 +01:00
Célestin Matte
8e575de52c
Fix broken CTRL+arrow key shortcuts under some terms 2014-12-31 00:06:41 +01:00
mathieui
cf04e65983
Add a callback on enable_vertical_tab_list change 2014-12-30 23:55:31 +01:00
Eijebong
71f3848706 Add a command to reload the config. 2014-12-30 22:58:22 +01:00
Célestin Matte
2a376cf419
Update color in all tabs with /color 2014-12-30 19:57:32 +01:00
mathieui
25d2bcbbff
Only graphically ack a message if it was sent by us 2014-12-30 19:54:04 +01:00
Célestin Matte
9da530f854 Make it possible to change the nick of a user not in the room, and change color of its aliases 2014-12-24 00:30:52 +01:00
Célestin Matte
0ae1ee2fbf Add nick_color_aliases (default: true), to look for color of aliases 2014-12-24 00:29:41 +01:00
Célestin Matte
1bbdab7f12 Unset color with /color <nick> unset 2014-12-24 00:29:39 +01:00
Célestin Matte
251a10ab0d Add a muc_color section in the config file to permanently fix a color to a nick 2014-12-24 00:28:22 +01:00
Célestin Matte
f7e7836f97 Add a /color command to fix color for a nick 2014-12-24 00:27:38 +01:00
mathieui
3c195dd9cc
Remove the remaining pre-3.4 compatibility hacks 2014-12-20 23:32:56 +01:00
mathieui
2452706b90
Add a deterministic_nick_colors option (default: true) 2014-12-20 23:13:26 +01:00
mathieui
030b4d7bcd
Do not assign the result of get_room_form because it does not return anything 2014-12-19 22:28:51 +01:00
mathieui
9acca77e12
Fix /info (9/78) 2014-12-19 22:28:36 +01:00
mathieui
26025511cf
Fix a traceback in /role 2014-12-19 22:22:39 +01:00
mathieui
d932921be3
Fix /last_activity (8/78) 2014-12-19 22:22:05 +01:00
mathieui
db60b72cf1
Fix /destroy_room (7/78) 2014-12-19 22:11:21 +01:00
mathieui
98102b34bb
Fix /toggle (6/78) 2014-12-19 22:08:59 +01:00
mathieui
5217111ab9
Add a missing import of the XEP-0048 URL element 2014-12-19 22:07:24 +01:00
mathieui
d7e2a46070
Remove an useless input method which was needed with threads 2014-12-19 22:06:11 +01:00
mathieui
f0dac14e32
Fix #2861 (fix /ignore and /unignore (5/78)) 2014-12-19 19:20:18 +01:00
mathieui
b720a3f8ca
Fix a hidden traceback in /set completion 2014-12-18 23:36:31 +01:00
mathieui
631f5dd42a
Allow -1 as a value for optional arguments in the args parser to collect an unspecified number of items 2014-12-18 22:22:27 +01:00
mathieui
ea7d86ed51
Update CHANGELOG and versions 2014-12-17 21:31:15 +01:00
mathieui
596f269621
Fix scrolling inside the input when the text is small enough to fit
(e.g. during a completion, the input might scroll due to the length of
the completed item, and not go back to its original state without this
change)
2014-12-17 21:22:21 +01:00
mathieui
92265678dc
Add completions for /cert_add and /cert_fetch 2014-12-17 21:21:57 +01:00
mathieui
2bb4f45ed4
Fix the file (/import & /export) completion on the roster tab 2014-12-17 21:20:55 +01:00
mathieui
64ef02d586
Explicitly disconnect when refusing to acknowledge a certificate change 2014-12-17 19:07:54 +01:00
mathieui
c76279c345
Handle invalid certificate chains (with the ca_cert_path option) 2014-12-17 19:07:15 +01:00
mathieui
00396c158a
Fix #2847 (SASL External support)
- Add two new options, keyfile and certfile, which must be both set for
  the auth to work.
- if both are set, then poezio doesn’t force-prompt a password if there
  is none specified
- add /cert_add, /cert_fetch, /cert_disable, /cert_revoke and /certs
  commands.
- add a page of documentation on the process
2014-12-11 22:28:44 +01:00
mathieui
003c28e953
Allow the plugins to use a default configuration too
through overloading the class variable default_config.
also fix a bug that would add meaningless sections to plugin
configurations.
2014-12-10 23:12:17 +01:00
mathieui
4c7a470dc8
Do not list __init__.py in /theme completion 2014-12-10 22:26:19 +01:00
Florent Le Coz
9667013304 Fix command_name’s arguments 2014-12-10 18:54:12 +01:00
mathieui
bbc79e089d
Fix #2842 (complete all existing options with /set-completion) 2014-12-09 16:56:43 +01:00
Florent Le Coz
2e25595aec Introduce the go_to_previous_tab_on_alt_number option
fix #2841
2014-12-09 16:43:23 +01:00
mathieui
ed7fe693b4
Fix #2802 (add a /closeall command, with a new plugin) 2014-12-09 01:13:14 +01:00
mathieui
7b3265c636
Fix #2754 (make /xhtml send a message with receipts, chatstates and display it properly)
(also make the message appear in PrivateTabs)
2014-12-08 23:50:16 +01:00
mathieui
122edc539e
Fix #2804 (handle privatetabs in /message) 2014-12-08 23:15:34 +01:00
mathieui
99b9b1d81b
Fix #2691 (don’t glitch on failed /configure) 2014-12-08 22:49:58 +01:00
mathieui
d6ec189776
Add a visual “feature check” for chat states too 2014-12-08 20:43:38 +01:00
Florent Le Coz
b852f7279b Remove a print statement that causes screen garbage when exec_remote is false 2014-12-08 18:22:52 +01:00
mathieui
82a5a69f6f
Fix /filter_xmlmask 2014-12-08 17:16:17 +01:00
mathieui
e273a32ec7
Improve the xhtml_to_poezio_colors sanitization
add some tests, and remove the test_datetime_tuple because
of python time module misbehavior with timezones set manually.
(potentially due to http://bugs.python.org/issue6478)
2014-12-08 17:01:44 +01:00
mathieui
4b8749ca88
Sanitize the XHTML output by removing useless formatting chars 2014-12-08 03:09:21 +01:00
mathieui
5826623228
Fix the autojoin of bookmarks with passwords 2014-12-07 23:37:58 +01:00
mathieui
2e46a93215
Don’t put newlines between xml stanzas in the xml tab 2014-12-07 22:59:50 +01:00
mathieui
148451c774
Fix the xml tab when pygments isn’t present 2014-12-07 22:44:56 +01:00
mathieui
1cd0b4d6ea
Fix #2570 (add /filter_jid to XMLTab, and syntax highlighting)
Also add /filter_from and /filter_to, and allow chaining filters.
2014-12-07 20:50:24 +01:00
mathieui
93f05f04d7
Fix the rawxml command (3/78) 2014-12-07 20:09:15 +01:00
mathieui
8c63e26335
Add documentation for /set_default
and fix minor typing mistakes too
2014-12-05 21:35:35 +01:00
Eijebong
9caa992333
Add a set_default command. 2014-12-05 20:39:23 +01:00
Florent Le Coz
6f9f1796b3 fix wrong argument name (2/78) 2014-12-04 16:42:15 +01:00
Florent Le Coz
0800c666eb Set auto_reconnect to True by default 2014-12-04 15:30:18 +01:00
mathieui
a8ed5bc4e1
Fix /name 2014-11-29 19:12:23 +01:00
mathieui
a0a00d5e7d
Add our own JID to the roster 2014-11-29 18:53:02 +01:00
Florent Le Coz
823e3d178e fix wrong argument name (1/78) 2014-11-25 17:12:47 +01:00
Florent Le Coz
e1808a8455 Parse command arguments using a decorator and make things more consistent
Avoid surprises with some commands accepting quoted arguments and some other
not.

fix #2555
2014-11-25 17:07:45 +01:00
Florent Le Coz
1faf8576e2 Remove DelayedEvent.repetive (sic) member which is not used 2014-11-25 13:51:04 +01:00
Florent Le Coz
81ae3e7eec Implement MUC self-ping to regularly check if we are still in the room 2014-11-25 13:51:04 +01:00
mathieui
61b5c6a91e
Merge branch 'master' of git.poez.io:poezio into slix 2014-11-15 19:20:43 +01:00
mathieui
0eb5c241f0
Fix the color of the first line for offline messages 2014-11-15 19:18:50 +01:00
mathieui
d2bbbbffb9
Merge branch 'master' of git.poez.io:poezio into slix 2014-11-13 23:36:12 +01:00
mathieui
a400bfc1e9
Fix a typo in /unlock help 2014-11-13 21:33:17 +01:00
mathieui
c2f9ffff33
Merge branch 'master' of git.poez.io:poezio into slix 2014-11-12 21:46:18 +01:00
mathieui
20487e46b7
Don’t display a feature check of the remote party if it doesn’t support anything
it’s confusing.
2014-11-12 21:45:52 +01:00
mathieui
5cd854f7cc
Add a stream error handler in order to display error messages 2014-11-02 17:57:03 +01:00
mathieui
1c1ab3cb83
Merge branch 'master' of git.poez.io:poezio into slix
Conflicts:
	src/bookmark.py
	src/config.py
	src/connection.py
	src/core/commands.py
	src/core/core.py
	src/core/handlers.py
	src/windows/info_bar.py
	src/windows/muc.py
	src/windows/roster_win.py
	src/windows/text_win.py
	src/xhtml.py
2014-10-31 19:16:44 +01:00
mathieui
ea2b703bfd
Fix the default value of Config.get to None
Might fix some not-yet-seen bugs
2014-10-31 18:14:56 +01:00
mathieui
f097efd852
Fix some tracebacks on /set completion
(introduced by the automated default arguments of config.get)
2014-10-31 15:54:33 +01:00
mathieui
58b424a923
notify_messages is of course True by default 2014-10-30 22:02:23 +01:00
mathieui
f93f92517d
Use a space instead of a cross while checking features 2014-10-30 21:43:49 +01:00
mathieui
cedc5a6ec8
Fix the ssl check for asyncio 2014-10-30 19:55:19 +01:00
mathieui
616d0d2c73
Fix two potential tracebacks on /set completion 2014-10-29 23:28:20 +01:00
mathieui
29942d38bb
Add some unit tests using py.test
- we need to have more
2014-10-27 20:01:22 +01:00
mathieui
d2ca062eaa
Make the features disco in chat more user-friendly 2014-10-25 16:50:51 +02:00
mathieui
0dc36d9598
Typo 2014-10-22 19:10:40 +02:00
mathieui
9d58c9d32e
Fix #2719 (write/read in the plugin config files even when not loaded) 2014-10-20 23:24:27 +02:00
mathieui
6b8af2413e
Fix #2713 (make /set <option> return the value of the option)
Should work for any case (plugin, different section, etc)
2014-10-20 22:54:00 +02:00
mathieui
7bc5d0de66
Initialize PluginConfig properly 2014-10-20 22:52:41 +02:00
mathieui
b803db7ff6
Make the runtime changes to max_lines_in_memory useful 2014-10-20 21:21:06 +02:00
mathieui
b44dae8fae
If the whitespace_interval value set in the config is null or negative, don’t send any 2014-10-20 21:21:06 +02:00
mathieui
f9734cde56
Remove the (sometimes wrong) default values in the config.get() calls 2014-10-20 21:21:04 +02:00
mathieui
7b01c62e07
Change the API of Config.get_by_tabname
Make the "default" parameter optional and thus move it to the end of
the command with the other optional parameters.

And change all the calls.
2014-10-20 21:20:43 +02:00
mathieui
ece9b2082b
Keep the default config options in a dict and make the “default” parameter of config.get() optional
the Config object now also optionally takes a dict of default values
in its constructor.
2014-10-20 21:20:41 +02:00
mathieui
a9f642f743
Extract XHTML-IM inline imags by default
- Add two new options: tmp_image_dir and extract_inline_images
- tmp_image_dir is $XDG_CACHE_HOME(usually ~/.cache)/poezio/images if unset
- Name the images from a SHA-1 of their data and their mimetype
- Output file:// links inside the message
2014-10-16 18:56:12 +02:00
Florent Le Coz
d4590949f7 Do not ignore empty topics 2014-10-16 10:45:00 +02:00
mathieui
076b899b45
Fix a traceback when the terminal is not behaving as it should 2014-10-14 16:16:11 +02:00
mathieui
545ad1bd71
Merge branch 'master' of git.poez.io:poezio into slix
Conflicts:
	src/core/handlers.py
	src/tabs/xmltab.py
2014-10-14 15:51:30 +02:00
mathieui
5a5d5812ed
Add an open_all_bookmarks option
this option determines if the non-autojoin bookmarks will
be opened on startup or not.

It is false by default.
2014-10-12 23:06:44 +02:00
mathieui
6c62f62402
Color the JID in locking/unlocking messages 2014-10-12 22:34:41 +02:00
mathieui
577d6ea87b
Output the result of the /info command in the MUC window
and not the global info buffer
2014-10-12 22:28:10 +02:00
mathieui
8e29f6d1ff
Add a /dump <filename> command to the XML tab 2014-10-11 16:52:41 +02:00
mathieui
8f6ab25fc9
Fix /me display in delayed messages 2014-10-10 14:20:59 +02:00
mathieui
8d2408c169
Use SHA-2 (SHA-512) to store the certificate fingerprint instead of SHA-1
Because SHA-1 is not really relevant anymore.
Too bad it's significantly longer and tiring to check, even if that is
to be expected.
2014-10-08 12:55:22 +02:00
mathieui
dc4f9cc35a
Fix #2692 (ad-hoc mistakes show /help list) 2014-10-03 22:46:21 +02:00
Florent Le Coz
37fe4be7ec Fix an other call to an old SleekXMPP function name 2014-09-30 22:11:38 +02:00
Emmanuel Gil Peyrot
5a618cf2c2 Don’t use deprecated-then-removed aliases from slixmpp. 2014-09-29 00:07:37 +02:00
Emmanuel Gil Peyrot
b6953d3fcf Get the asyncio event loop only once. 2014-09-29 00:07:27 +02:00
Florent Le Coz
07c4c53e03 Clear the numbers already entered on alt+j when the new one is not digit 2014-08-25 13:34:34 +02:00
Florent Le Coz
2e73331d07 Fix a traceback on command_win: matchin_names() must return strings, not JIDs 2014-08-08 18:11:56 +02:00
Florent Le Coz
8a32ab2514 Remove the timeout and the pre-get_wch things from the keyboard module 2014-08-07 23:31:56 +02:00
Florent Le Coz
3ef9228211 Continuation keys (like after M-j or Ctrl-c) are handled without blocking 2014-08-07 23:20:21 +02:00
Florent Le Coz
30b31b3215 Fix an indentation issue introduced earlier (bar tab displaying only one tab) 2014-08-01 17:06:19 +02:00
Florent Le Coz
30194a8a91 Fix a traceback when a receiving a message from a bare JID 2014-08-01 16:13:52 +02:00
Florent Le Coz
271fd662a1 Entirely remove the g_lock (used to avoid a few race conditions with ncures) 2014-08-01 16:00:01 +02:00
Florent Le Coz
ba93f3f236 Ad-hoc requests can be sent on any JID, not just servers 2014-08-01 15:12:58 +02:00
Florent Le Coz
992fe72554 Fix a few blocking iq, and remove all block=False function arguments 2014-08-01 15:01:25 +02:00
Florent Le Coz
3ec9e80de4 Little comments fix 2014-08-01 13:38:12 +02:00
Florent Le Coz
d84071a804 Privacy: do leak our last activy when our status is away or xa 2014-08-01 13:32:07 +02:00
Florent Le Coz
6250ba345e Fix the data form retrieval, by making it non-blocking 2014-08-01 13:03:18 +02:00
Florent Le Coz
52f50cd949 The password used can be changed at runtime using /set and /reconnect 2014-08-01 04:07:38 +02:00
Florent Le Coz
df569d4e66 First implementation of auto_reconnect, poezio-side 2014-08-01 04:01:08 +02:00
Florent Le Coz
2fd71cd637 Display “authentication failed” only when all auth methods failed 2014-08-01 03:15:39 +02:00
Florent Le Coz
87cf38995a Make the TimedEvents work with asyncio
Improvements: events now occur precisely at the specified date. You don’t
need to stop touching your keyboard to execute them.
2014-08-01 01:22:59 +02:00