1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-19 00:56:35 +02:00
Commit Graph

1962 Commits

Author SHA1 Message Date
0d8e6d713e Update readme screenshot and bump to v0.9.1 v0.9.1 2020-11-26 16:58:09 -05:00
39e4ff8bd6 Fix tab complete bug
If a directory contains a single entry tab complete will no longer fail
2020-11-26 16:20:51 -05:00
0434ac186a Fix bug causing file transfer status bars to be truncated 2020-11-26 16:17:00 -05:00
8d9d51640c Fix display bug caused by noread flag appended to unread messages
A line's line count now increments without messing up the formatting in cases where
the noread flag wraps to the next line.

Additionally, the way noread flags are handled has been refactored and made
more efficient.
2020-11-26 16:16:59 -05:00
c4c0c0d1f4 Another logging fix
When renaming a log file, if the new name already exists we just
start appending to it and delete the old file. There's no need
to create a backup.

This fixes an issue where leaving and rejoining the same group
multiple times will eventually lead to the logger not working
due to trying to use the same file name over and over again.
2020-11-26 16:10:59 -05:00
3f2826bd66 Add release and LLVM asan build options
The release build uses -O2 and flto, and has no debug symbols.
-Wmissing-field-initializer was removed due to false positives
on newer versions of clang
2020-11-26 16:04:54 -05:00
7b7ea0e386 Fix small regression
This wasn't supposed to make it into the commit
2020-11-24 23:42:25 -05:00
d35a38735b Fix line wrapping/padding issues
It should now parse messages with newlines properly as well as messages that
contain long sequences of characters with no spaces
2020-11-24 19:47:04 -05:00
f0c4906fdc Fix some off by one bugs with line scrolling and some cleanup
Instead of trying (and failing) to correctly calculate the number of lines on the
screen a given message will need space for, we dynamically set the value both
on initiation of a new line, and whenever that line is printed to the screen
using the print_wrap() function.

This should fix the screen occasionally not scrolling down the correct number of
lines when a new message is printed.
2020-11-24 19:36:03 -05:00
56ba61e061 Cleanup and refactor x11 code
- Deleted X11 code for an unfinished/broken feature
- Rename xtra -> x11focus
- Cleanup the remaining code a bit
2020-11-24 19:31:59 -05:00
898d89e95a Properly handle failures to convert widechar strings to multibyte 2020-11-24 16:41:42 -05:00
1fd1e27bdf Remove seconds from default timestamp
Also reduce the --- prefix to one dash before a message. These characters are taking
up valuable real-estate
2020-11-22 18:53:32 -05:00
8e84ac58d4 Implement word wrapping
It's about time
2020-11-22 18:41:12 -05:00
9d65997871 Add notification counters to bottom tab
A counter now increments in the bottom bar for unfocused windows showing how
many unread messages are pending. Tabs with no pending messages show [*]
instead of their index (showing the index is useless and somewhat confusing)
2020-11-21 11:25:41 -05:00
da2889f3ab Fix UI regression
The conference number needs to be displayed in the tab name
so that you can invite friends to conferences
2020-11-20 02:10:52 -05:00
312b38d253 A few small fixes
- Fix race condition in draw_peer()
- Handle realloc_peer_list() error
- Remove dead code in cmd_conference()
- Reduce scope of a few variable variables
- Fix possible buffer truncation in api.c
2020-11-19 14:23:32 -05:00
0554bf0240 Create backup of duplicate log file instead of deleting it
This case should never occur, but just in case it does it's good to handle it
without any data loss
2020-11-19 14:23:31 -05:00
53a7530e8a Some UI improvements
- Bottom tab now only shows indices of active chat windows unless focused
- Always focus Home screen on startup instead of the last loaded conference
- Conference tab names are no longer prefixed with the conference number
- Home and Contact tab names are now capitalized
2020-11-19 01:30:30 -05:00
41be04a142 Implement push-to-talk for conference audio 2020-11-18 16:57:26 -05:00
31f36318a2 Add config settings for audio channels 2020-11-18 16:29:01 -05:00
f882fdf608 Use two channels for conference audio 2020-11-17 16:31:17 -05:00
7e1e410307 Refactor logging
- Conference logging now behaves the same as 1-on-1 chats: Instead
  of creating a new log file every time we restat the client
  we use the unique conference ID to keep track of path names.
  This also allows us to load history for saved groups on client startup

- Added a log init function / general code refactor.

- Fixed a bug that caused log files to be created even when logging
  is disabled.
2020-11-17 16:05:20 -05:00
c135c812c2 Fix playing unallocated memory on opening audio device 2020-11-16 00:00:00 +00:00
6c239193ab Fix bug sometimes preventing typing status from being updated 2020-11-15 12:30:26 -05:00
de7db08352 Bump to version 0.9.0 v0.9.0 2020-11-14 14:30:56 -05:00
ba5ded9bc2 Use compound literals to zero out structs instead of memset 2020-11-14 00:00:05 +00:00
4581dee4fc astyle 2020-11-14 00:00:05 +00:00
d75d6e8b60 sort includes 2020-11-14 00:00:05 +00:00
142ce642f0 Per-call pending status and state handling
* Proper handling of incoming video calls.
* Add command /vcall for initiating video calls
* Add command /res command to set video resolution
2020-11-14 00:00:10 +00:00
7dead5ec96 Implement simplistic VAD 2020-11-14 00:00:01 +00:00
ddcf224db2 Implement groupAV 2020-11-14 00:00:01 +00:00
daf794c4a2 Rework audio device handling
We now have at most one input and one output device open at any time,
but can have multiple capture callbacks and multiple output sources.
2020-11-14 00:00:01 +00:00
dac0124f0f Fix some issues with file transfers
- Fix bug causing failed avatar transfers to be sent as normal file transfers
      when a friend goes offline and comes back online
- Remove some unused members of the FileTransfer struct
- Rename filenum -> filenumber and friendnum -> friendnumber
2020-11-13 19:38:33 -05:00
15b7a30925 Fix some bugs/issues with the message queue
- It's no longer possible for messages to be sent out of order
- Check if logger is enabled before doing pointless API calls
- Fix linked list bug (a part of the code almost never executes)
2020-11-12 11:39:19 -05:00
77ab71f26f Refactor message queue
We now attempt to send all queued messages per call to cqueue_try_send() instead
of just the oldest message in the queue. This speeds things up substantially.

Also fixed a very unlikely bug where the read receipt might wrap around to zero
which we used as a reserved value for an unsent message
2020-11-11 16:28:50 -05:00
68e1ba312d Use compound literals to zero out structs instead of memset
This is cleaner and much less prone to bugs
2020-11-10 21:25:27 -05:00
752fc6d619 Fix race condition when window is closed with active notifications
A ToxWindow's notifications need to be halted before the window is freed
2020-11-10 17:20:40 -05:00
16bcb27ca7 Update openal version for macos travis build 2020-11-09 17:29:19 -05:00
71d7d355a6 Use enum to identify window types instead of bool variables 2020-11-09 17:01:22 -05:00
4188b392cc Rename: groupchats -> conferences
This is in line with the toxcore API naming scheme and is in preparation
for the merge with the new groupchat implementation
2020-11-08 10:08:24 -05:00
811fbfbb1e Fix char -> widechar comparisons 2020-11-08 00:07:28 -05:00
32eb7d3040 Filter invalid file names for inbound file transfers 2020-11-05 10:55:48 -05:00
42763905d7 Replace deprecated usleep function with nanosleep
usleep was declared obsolete in POSIX.1-2001
2020-11-04 22:05:59 -05:00
f64300d1d6 Close file handlers when inbound file transfer fails 2020-11-03 13:26:23 -05:00
1a723f0e8e Fix bad behaviour with duplicate file names
If the new path is too long for the buffer we cancel the file transfer
and return an error instead of truncating the file name and continuing.
2020-11-03 13:03:47 -05:00
a86884c40e Remove legacy code and fix a couple format specifiers
This code was added over 5 years ago and no longer serves a purpose
2020-11-03 01:00:08 -05:00
3f02e119f4 add missing malloc error checks and fix widechar to char comparison 2020-11-03 00:59:28 -05:00
1bbd50aac7 Fix a few issues
- realloc needs to be error checked
- use correct format specifiers
- make sure optarg and DATA_FILE aren't null before using them
2020-11-02 18:08:54 -05:00
e7a0c32a68 Refactor a few complex functions
Also moved some single use functions from misc_tools to their
respective files
2020-11-01 15:55:07 -05:00
7560bc9547 modularize string arrays for line completion
Instead of using various different forms of string arrays and having to handle them
differently for string completion, we now always use char pointer arrays. This allows
us to remove some large stack allocations, remove a bunch of confusing defines that
keep track of global array sizes, and generally unclutters the code so it's easier
to read.
2020-11-01 11:29:51 -05:00