Commit Graph

757 Commits (257a19caaaa3a31b0890e3eeb728ef9e19f28ede)

Author SHA1 Message Date
Mick Sayson 257a19caaa feat(filesform): Add in progress transfers to files form
As part of #1532 it was identified that long running file transfers
could get lost deep in the chatlog. This could result in unexpected use
of bandwidth over time if users lose track of old/large transfers. This
commit updates the files form to show in progress file transfers and
offer a way to control them.

* FilesForm now works on ToxFiles instead of finished file paths
* FilesForm widgets have been replaced with an MV tree view with depth
  1. The existing QListWidget did not provide us the controls to render
  more complex items. The use of delegates allows us to efficiently draw
  progress bars and controls
* getHumanReadableSize has been extracted from FileTransferWidget into a
  more general utils file
2021-12-11 15:38:35 -08:00
Mick Sayson c7efe320d2 refactor(filetransfer): Move file transfer progress into ToxFile
* Refactor/test ToxFileProgress to ensure that when it's moved it
  behaves well
* Notice problems with speed averaging. We were average speeds without
  keeping track of the times they were over. Adding samples of different
  lengths would result in incorrect speeds. Refactor whole class to correct
* Move ToxFileProgress to be a member of ToxFile
* Remove duplicated members between ToxFile and ToxFileProgress
* Move sample addition into CoreFile
2021-12-11 15:38:35 -08:00
Mick Sayson 3bc4aa52be fix(filetransfer): Fix UI inconsistencies with pause/resume 2021-12-11 13:56:08 -08:00
woxcab d621d74511
fix(ui): reorder the window title 2021-10-24 23:30:30 -07:00
Mick Sayson 916834fb9c feat(chatlog): Add SystemMessages to SessionChatLog
* Rendering of system messages consolidated into single place
* API added to ichatlog to insert a system message at current location
* System messages are now used as type + args which will fit nicely with
  the work in #6221
2021-10-16 14:29:57 -07:00
sudden6 c95057283e
fix: correctly destroy on group remove 2021-08-28 00:26:45 +02:00
bodwok 18b34b325f
refactor(ui): separation of responsibility for sorting the contact list 2021-06-13 20:11:19 +03:00
Mick Sayson 26701283cd
feat(extensions): Split messages on extended messages
v0.0.2 of toxext_extended_messages brought in a user configurable max
message size. This changeset implements the minimum work required for
qTox to work sanely under the new API.

* Hardcode a max message size for all friends
* If a friend negotiates a max message size below the hardcoded value
  pretend they do not have the extension
* Move splitMessage out of Core to MessageProcessor
* Updates to allow for extended messages to be split
2021-01-30 18:15:49 -08:00
Mick Sayson 5f5f612841
feat(messages): History and offline message support for extended messages
* Added new negotiating friend state to allow delayed sending of offline
messages
* Added ability to flag currently outgoing message as broken in UI
* Reworked OfflineMsgEngine to support multiple receipt types
    * Moved resending logic out of the OfflineMsgEngine
    * Moved coordination of receipt and DispatchedMessageId into helper
    class usable for both ExtensionReceiptNum and ReceiptNum
    * Resending logic now has a failure case when the friend's extension
    set is lower than the required extensions needed for the message
    * When a user is known to be offline we do not allow use of any
    extensions
* Added DB support for broken message reasons
* Added DB support to tie an faux_offline_pending message to a required
extension set
2021-01-30 12:52:06 -08:00
Mick Sayson 7474c6d8ac
feat(messages): Multipacket message support
* Introduced ToxExt and CoreExt abstraction
    * Along with interfaces for mocking and unit testing
* Add "supportedExtensions" concept to Friend
* Dispatch messages to CoreExt instead of Core when friend supports
extended messages
    * Only split messages for core when extended messages are unavailable
* Offline message engine/History not altered. Currently only valid for
an existing session after extension negotiation has completed
2021-01-30 12:52:06 -08:00
powerjungle 98976547fe
fix(translation): match text to translation files part 2
Fixes various issues around the tree.
2020-11-17 14:07:32 +02:00
powerjungle 251beb5b70
fix(translation): match text to translation files
For "Search Contacts" and "By Name".
2020-11-17 11:07:07 +02:00
TriKriSta a97c53313a
fix: clear custom style before update style 2020-08-28 10:26:40 -07:00
TriKriSta 3bf3128a4f
fix(ui): implement and connect reloadTheme in leaf classes
This allows leaf classes to update independently when the GUI has changed themes, without
their parent having to call updateTheme() manually.

Fix #5924
Fix #5592
2020-08-28 10:19:53 -07:00
sudden6 3612e94f5f
refactor: cleanup Widget 2020-08-16 21:32:05 +02:00
sudden6 5fdadadfb5
refactor: remove getInstance() from friendchatroom.cpp 2020-08-16 12:47:33 +02:00
sudden6 c5e21be0f8
refactor: remove getInstance() from groupchatroom.cpp 2020-08-16 12:47:33 +02:00
Anthony Bilinski 431fd7bfa2
Merge pull request #6073
Anthony Bilinski (1):
      fix(notification): hide snore warning log spam

Mick Sayson (2):
      feat(notification): Notification string generator for multiple messages
      feat(notification): Notifications now always replace the previous one
2020-07-02 01:34:34 -07:00
sudden6 0f4dc940ce
refactor: remove Core dependency from Group
Replace the direct call with a signal connection in Widget, this keeps
Group clean.
2020-05-27 10:39:02 +02:00
sudden6 445340a0e9
refactor: remove getInstance from ContentDialog
This UI element probably should never depend on Core, but this is to fix
for a later time.
2020-05-27 10:39:02 +02:00
sudden6 19f4a6c4e0
refactor: remove getInstance from AddFriendForm 2020-05-27 10:38:57 +02:00
Mick Sayson 6e163ca5ed
feat(notification): Notifications now always replace the previous one
This is a feature/fix to improve notification behavior when we receive
over 3 messages.

SnoreNotify prevents over 3 notifications from being displayed before a
user clears the notification. This is presumably to avoid infinite
notification spam.

Unfortunately this results in the notifications just coming in _after_
the user clears them. This means if there are 100s of messages built up
the user has to clear their notifications N messages / 3 times.

This feature/fix folds all notifications into a single notification
representing the current qTox notification state. See
notificationgenerator_test.cpp for what the new messages look like.
2020-05-17 00:00:53 -07:00
sudden6 a90f0762d9
refactor(cmake): change folder structure
The new folder structure will be like this:

/<module>/CMakeLists.txt
/<module>/src/file.cpp
/<module>/include/<module>/file.h
/<module>/<subdir>/<...>
2020-05-11 16:45:52 +02:00
sudden6 82e0852f3c
refactor: remove Core::getInstance from grouplist 2020-05-11 10:28:26 +02:00
Anthony Bilinski f37f9a9492
refactor(history): enforce using PK instead of ToxId in history
We need to be lenient when reading from db because of ToxIds being saved in the
db from a bug introduced in e07d8d358f, which
used self ID rather than self Pk. Was subsequently fixed in
033f28e67e.
2020-05-03 16:22:12 -07:00
sudden6 9306e946f8
refactor: remove Core::getInstance() from ChatForm classes 2020-05-02 23:36:38 +02:00
sudden6 2809cd91f5
refactor: remove Core::getInstance from SettingsWidget 2020-05-02 20:08:11 +02:00
sudden6 c1ec6bc649
refactor(widget): remove usage of Core::getInstance 2020-05-02 20:08:06 +02:00
iphydf 58b4c19709
chore: remove extra ;
These are misleading in some cases, or at least not useful in others.
Most cases of Q_UNUSED in qtox don't have a ;, so this seems acceptable.
2020-04-22 23:55:51 +00:00
iphydf e71225268f
chore: Various code cleanups.
* Reorder class data members and/or constructor initialisers to match,
  reducing confusion about when members will be initialised.
* Remove (most) unused variables. Not removed: some global variables with
  `TODO(sudden6)` on them for using them in the future. I don't know how
  far into the future sudden6 wants to use them, so I left them there for
  now.
* Distinguish different bootstrap nodes in the logs by index in the
  bootstrap node list. Originally, we used to log the address/port of the
  node we're bootstrapping to. This was removed out of privacy concerns
  (even though the bootstrap nodes are public). This made the logs much
  less useful when debugging why the client isn't connecting. Having
  indices makes it easier to see that different nodes are being selected,
  and makes it possible to determine which node was selected.
* Explicitly cast unused results of Tox API functions to `void` when all
  we want is to know whether the function succeeds or not.
* Don't try to `#include <unistd.h>` on Windows. It does not exist on
  MSVC.
* Remove extra `;` after function definitions.
* Remove reference indirection of QJsonValueRef, since a copy of that ref
  (small pointer-like object) has to be made anyway when iterating over
  QJsonArrays.
* Make some file-scope global state `static`.
* Use `nullptr` instead of `NULL`.
* Add `#if DESKTOP_NOTIFICATIONS` around the code that implements desktop
  notifications, so it becomes a bit easier to compile everything with a
  single compiler command - useful for manually running static analysers.
* Fix an error on MSVC where `disconnect` is looked up to be a non-static
  member function and the `this` capture is missing.
* Consistently use `struct` and `class` tags for types.
* Use references in ranged-for where it reduces copies.
* Move private static data members out of the Style class and into
  file-local scope. There is no need for them to be in the class. Also
  marked them `const` where possible.
* Removed unused lambda capture.
* Ensure qTox can compile under NDEBUG with `-Wunused-variable` by
  inlining the unused variable into the `assert` that was its only
  target.
* Minor reformatting in core_test.cpp.
2020-04-16 19:07:40 +00:00
Anthony Bilinski f756dbae2a
chore(cleanup): don't explicitly initialize std::unique_ptr to nullptr
Fix #6009
2020-03-21 22:15:03 -07:00
Anthony Bilinski 24e4ec3751
fix(model): take QObject receiver argument to interface signal connection macro
receiver QObject is used by Qt to automatically deregister the connection when
the receiver is destroyed. Forward it on to Qt's connect.
2020-02-06 16:48:56 -08:00
Anthony Bilinski f252816f55
Merge branch 'v1.17-dev' 2019-12-02 08:46:04 -08:00
Anthony Bilinski 88d10b1249
refactor(widget): remove uneeded check of if message is targetted
It's only relevant for group messages, where the check already exists.
2019-11-27 08:26:59 -08:00
Anthony Bilinski 239dfdc65c
refactor(status): move isOnline into Status from Friend
Allows checking if a status if equivalent to Online without needing a Friend
class.
2019-11-25 20:52:06 -08:00
Igor Kushnir f9f634b326 fix(ui): quit qTox on Ctrl+Q when "Close to tray" is enabled
Fixes #5925.
2019-11-17 15:26:49 +02:00
Anthony Bilinski 524a6b8722
Merge branch 'v1.17-dev' 2019-10-18 11:18:39 -07:00
Anthony Bilinski e85d3f522a
fix(icon): use Qt tray icon in all cases, remove platform specific backends
qTox added specialized tray icon backends over time to work around bugs with
the default implementation, since then our GTK+2 backend has stopped working,
our appindicator backend was never selected by default by cmake, and
statusnotifier was never selected at SystemTrayIcon construction, leaving us
only ever using the broken GTK+2 backend, or theoretically the Unity backend,
which I didn't see selected on Ubuntu 16.04 Unity. In all other cases we would
fall back to the Qt backend.

Qt icon has improved over time, and our platform specific icons have become
stale, with GTK+2 becoming deprecated and GTK+3 not having a similar feature,
QSystemTrayIcon has been tested on a variety of DEs and works as well or better
in all cases, as shown in the table at
https://github.com/qTox/qTox/issues/5881#issuecomment-541892457

Fix #5881
Fix #5859
2019-10-16 13:27:29 -07:00
sudden6 0e3cd7fe6b
Merge pull request #5829
jessica181920 (1):
      fix(i18n): Various English fixes
2019-09-28 14:25:18 +02:00
Anthony Bilinski f7a2a7d648
fix(widget): only change group title once
Before we were connecting the same signal to the same slot for each group we created.
2019-09-15 19:04:02 -07:00
Anthony Bilinski 602671c9dc
fix(core): don't set core status on connect, just update UI 2019-09-15 19:04:02 -07:00
jessica181920 11b34c84ef fix(i18n): Various English fixes
Consistency, typos, grammatical corrections, capitalization, punctuation,
etc.
2019-09-14 15:00:59 -04:00
sudden6 2ea5030958
fix(widget): don't try to play audio if it's disable 2019-08-30 14:07:19 +02:00
sudden6 db802822f3
fix: empty username causes mention on ever message
This fixes #2119 and additionally introduces the possibility to mention
users by their public key.
2019-08-26 23:22:17 -07:00
antony-jr 5eea8ba27f
feat(build): add the delta updater 2019-07-27 16:49:20 +05:30
jenli669 1c94f090c8
refactor(widget): replace qt_mac_set_dock_menu() in widget 2019-07-14 23:52:44 +02:00
jenli669 105f9ec401
refactor(widget): remove Widget::getInstance 2019-06-30 10:09:31 +02:00
jenli669 7fca93bde9
refactor(circlewidget): link CircleWidget ContentDialogs using signals 2019-06-30 10:09:30 +02:00
jenli669 20979744c9
refactor(chatform): make ChatForm use signals for updateFriendActivity 2019-06-30 10:09:30 +02:00
jenli669 09f37a97f9
refactor(widget): make searchWidget always use signals 2019-06-30 10:09:29 +02:00