Commit graph

469 commits

Author SHA1 Message Date
Xavier Del Campo Romero f2096694c6 Add send button / Enter key settings
Two new switches have been added to the application preferences:

- Enable send button
- Use Enter to insert newline ('\n')

The latter cannot be active or sensitive if the former is not active.
Otherwise, users would not be able to send messages.

Thanks to horazont for suggesting a separate switch for the behaviour
of the Enter key.
2024-03-29 16:58:50 +03:00
Andrei Voronin bee7dd0ef4
Offline members (#33)
This commit is supposed to change the showing of members of chat.
Beforehead only online members was show in chat members. Now it's all
members who are shown, including the ones who is offline and the one who
didin't accept the invite
2024-03-28 17:50:34 +03:00
Xavier Del Campo Romero d3a2e52285 Setup default encryption settings 2024-03-26 11:22:56 +03:00
Konstantin Kuznetsov b18f49cda3 Skip duplicate invites for active conversations 2024-03-25 17:06:44 +03:00
Konstantin Kuznetsov 3a0d2d2ffe Wait for messages instead of MAM pages 2024-03-22 16:11:31 +03:00
Konstantin Kuznetsov bcac03ef6a Fetch MAM pages when scrolling in chats 2024-03-19 15:34:58 +03:00
emil 39d1a29ced Phone ringing and dialing
Corrections have also been made for Windows (by Maxim Logaev)

Co-authored-by: emil <emil@dekeyser.xyz>
Co-authored-by: Maxim Logaev <maxlogaev@proton.me>
2024-03-19 12:02:40 +03:00
Maxim Logaev e2075ed9fc Added support for changing password (#9)
* Fixed: server refuses to respond in any way to the sent iq stanza.
* Fix issue #261.

---------

Co-authored-by: Miquel Lionel <lionel@les-miquelots.net>
Co-authored-by: Stanislav Malishevskiy <stanislav.malishevskiy@gmail.com>
2024-03-19 11:31:57 +03:00
Konstantin Kuznetsov 825cc5836c Fetch MAM pages when scrolling 2024-03-19 11:06:58 +03:00
Konstantin Kuznetsov 1532d181c4 Fetch MAM history for conversations without local mam catchup data 2024-03-19 11:06:58 +03:00
Konstantin Kuznetsov fa357527fe Add button to fetch MAM history for conversation 2024-03-19 11:06:58 +03:00
Maxim Logaev 6fd8f9a45c
Added full Windows support (#8)
* Windows compatibility Tweaks

* Add experimental windows installer

This nsis script should create a windows installer.
Although the installer worked for the first tests
you should handle it with care and consider it
highly experimental

* Prepare signing

Collected some infos regarding signing
a windows build.

* Revert "Prepare signing"

I copied the files into the wrong folder…
… it's late, sorry.

This reverts commit 7d6b9e7f4c.

* Prepare signing

Collected some infos regarding signing
a windows build.

* Fix typo in Dino slogan

* Add license to windows installer

* Add startmenu folder with several items

Added a startmenu folder with the following items:
* Dino launcher
* License
* Link to Dino website
* Uninstaller

* Prevent duplicated DLLs

* Add dino logo again

The dino logo for the startmenu was accidentally
no longer included since the last commit.

* Simplify installer script

The current build script already places the files in the right
folder structure so the installer doesn't have to do it itself

* Add german language.

* Add option to install without OpenPGP plugin

* Removed compenent section

This section was only introduced to be able to
disable the OpenPGP plugin as Dino often crashed
on Windows if OpenPGP was not installed but the
plugin enabled.

This is no more necessary as the OpenPGP plugin
is now disabled by default.

* Remove installation type "OpenPGP" support

This is no longer needed (see previous commit)
but was forgotten to remove in the previous
commit.

* Add compression to achieve smaller installer size.

* Add AppID (untested).

* Fix syntax error for setting AppID.

* Windows compatibility Tweaks

* fix build on newest MSYS2

* Do not search for the built-in libraries when compiling with MINGW

* Added _WIN32 define to VALAC on Windows

* Add missing _WIN32

* Add support for OpenPGP on Windows

* Use ShellExecute instead of AppInfo to open files on Windows

* Use slight larger font on Windows so it matches Linux style

Also fixes some fuzzy fonts.

* Fixed some Windows not appearing when opening file

* Set alternate file stream for downloaded files.

* Added information and Dino icon to Windows executable

* Set Windows executable version from PROJECT_VERSION

* Add WIN32 fonts as a plugin

* Every call to CoInitialize() must be balanced
with a call to CoUninitialize()

* Add --export-all-symbols to Windows compilation

* Add implicit link directories to package HINT path on MingW

Instead of blacklisting those libraries

* Do not hardcode GPG path on Windows

* Export all plugin symbols on Windows

* Use Dino.Util.get_content_type also on preview

* Allow 32-bit linking

Win32 apis are __stdcall

* Use last_index_of instead of index_of

* Initial notification support

* Refactor windows-notification plugin

* Clean up

* Use code from Dino.Ui.Util

* Convert C code to Vala

* Add callback support

* Allow null image_path

* Use dynamic linking instead of runtime loading

Also made me notice that the signature of the function with the callback was wrong. Oops.

* Added 32-bit wintoast linker library

* Use VAPI and generate template in-app

* Initial plugin using new notification provider

* Add support for custom actions on notification

* Add notification retraction

* Use list with all notifications

* Rename field

* Fix muc invite and voide request not working

* Do not use GLib to open links in messages

Use ShellExecute

* Add MIT licensed winrt headers

* Initial code for using winrt headers

* Initial callback support

* Initial GObject wrapper for WinRT notifications

Still missing a lot of stuff

* Initial code to allow buttons and text

* Use string_view

* Increase ref on event token

* Add toastnotifier

* Fix string conversion

* Actions can stack

* Remove unity compilation unit

* No need to enable coroutines

* Fields must be created in the private struct

Also change unordered_map to list, we do not need hashing and stuff.

* Add failed and dimissed actions

* Cleanup dismissed actions on toast notification finalizer

* Add template type enum

* Rename enums to better match what Vala expects

* Rename plugin vala file

* Add template getter

* Initial experiments with notification XML building

* Anitial builder

* Initial notification provider using WinRT

Crashes when activating actions, might be related to threads.

* Delegate `activate_action` to UI thread

* Fixed crash with multiple notifications

Sometimes an invalid function pointer was called with an invalid context

* Add comment to builder

* Use async

* Use g_new0 and g_free to generate raw strings

* Valac think that getters are always owned by the struct

* introduce try_invoke -- a logging exception catcher

* stop exceptions from crossing ABI boundary in a few places

* mark exception-safe C entry points as such

* clarify some entry points' names

* make GetCurrentModulePath and GetShortcutPath throw win32 errors

* clarify GetCurrentModulePath's name

* generalize GetShortcutPath into GetEnv

* make GetEnv more robust and not limit length of variables

* change some local functions' signatures

* constify all the things

* rewrite shortcut management code with RAII, error logging and exceptions

It actually works now.

* add restoration of shortcut's target path

* switch to runtime loading of PropVariantToStringAlloc

Now it really should work.

* Add ginvoke to CMakeLists

* Removed unused library on linker

It is loaded dynamically

* Add README.md to Windows notification plugin

* Fix notifications not hiding

* unimplement accidentally implemented wide string overloads of describe_argument

* work around GetEnvironmentVariable not resetting last error

* handle exe paths longer than 259 chars

* move some whitespace around

* use lower-case 0x prefix for hresult code formatting everywhere

* remove an unused include

* make meta-error messages more precise

* handle empty hresult_error message specially

* handle theoretical future failures of wsview_to_char

* fix UB in glib::describe_arguments called with no arguments

Makes failure logging of nullary invokables non-crashy.

* make glib::impl::varstring less explosive

* fiddle with punctuation

* add nullary version of g_try_invoke macro

* generalize glib::try_invoke to any return-by-value type and void

* protect GetTemplateContent callers from exceptions

* rewrite InitApartment and protect callers from (the rest of the) exceptions

Initializing COM by calling `winrt::init_apartment()` would always cause
stack unwinding *in practice*, which is suboptimal at best, and even using
`apartment_type::single_threaded` still would require exception filtering
*just in case*.

* handle empty menu-relative shortcut paths

* move module loading functions out of shortcutcreator.cpp

* work around a (pedantic) format specifier warning

* silence enum stringification warnings by first casting to underlying types

* fix / work around uninitialized fields warnings

* don't use FALSE as a null pointer constant

* replace C-style concurrent initialization of statics

C++ statics are thread-safe as is and are usually implemented more
efficiently. Besides, `volatile` is likely misused here anyway.

* reflow/respace

* stop checking for empty AUMIDs

The downstream code handles them just fine.

* log SetCurrentProcessExplicitAppUserModelID errors

* remove the no-longer-needed -municode compile option

* replace lists with vectors

* init `Callback` completely always

The `token` pointer was left dangerously uninitialized after construction.

* comment out unused arguments [-Wunused-parameter]

* Add support for adaptive Windows 10 notifications

* Add support for inline images to notification

* Allow null header, body, applogo, and image on notification builder

* DelegateToUi must be an owned function

* Prefer primary DirectSound device on Windows

It automatically selects the default device for use,
there is no book keeping necessary and things just work

The primary DirectSound device has a (NULL) guid, making
it wasy to be found.

* Do not allow selection of WASAPI devices

Dino would have to resample it own audio, do more book keeping and
somehow find out manually which is the default device.

* Add initial call notifications

* Use correct generic type for ArrayList

Nullable crashes Dino

* Allow devices with properties and use has_classes

* Remove YoloRT from tree

* Build YoloRT on project build

* Do not generate WinRT headers, just download them on build

* Fix compilation on gcc 11

* define _POSIX_C_SOURCE=1 on windows

Fixes "undefined reference to `localtime_r`" in, e.g., Vala's GLib.Time.local
when building on mingw-w64.

* fix call notifications buttons not working

* no need to ignore wasapi

* Ignore wasapi devices as they do not work well yet

* Removed version from Dino executable

We need a better way to get the version number

* Automatically set PANGOCAIRO_BACKEND to fontconfig on win32

* Fixed using GTK3 instead of GTK4

* Check YoloRT checksum before building

* Fix GPGME

* Added build script for windows

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

* Added README-WIN64.md

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

* Fixed dist-install dir

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

* Removed unnecessary installer files

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

* Added build-installer target to build-win64.sh

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

* Fixed build dependencies

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

* Move download yolort headers logic into prepare stage, delete yolort download script

* Added CI for MSYS2 (MINGW64) (#2)

- Use quotes in windows build script;
- Added missing gstreamer, webrtc-audio-processing and git;
- Added CI for Windows.
---------
Signed-off-by: Maxim Logaev <maxlogaev@proton.me>

---------

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
Co-authored-by: LAGonauta <lagonauta@gmail.com>
Co-authored-by: Martin Dosch <spam@mdosch.de>
Co-authored-by: Martin Dosch <martin@mdosch.de>
Co-authored-by: mjk <yuubi-san@users.noreply.github.com>
Co-authored-by: Daniel Reuther <daniel.reuther@liferay.com>
Co-authored-by: Felipe <LAGonauta@users.noreply.github.com>
Co-authored-by: Psayker <kirill970528@yandex.ru>
2024-03-18 22:51:50 +03:00
eerielili 86b101900c
Start conversation if closed when receiving an audio or video call (#1485)
* Start conversation if closed when receiving an audio or video call

* Fix starting conversation on new calls, move setting conversation.last_active

---------

Co-authored-by: fiaxh <git@lightrise.org>
2023-10-08 13:51:30 +02:00
fiaxh 1e167eeea6 Fix some compiler warnings 2023-10-07 14:34:23 +02:00
fiaxh e2c34bf223 Rewrite contact details dialog 2023-09-24 19:54:04 +02:00
Marvin W 9eafe4139d Fix build on some Vala compiler versions
See https://gitlab.gnome.org/GNOME/vala/-/issues/1474 and https://gitlab.gnome.org/GNOME/vala/-/issues/1478
2023-09-24 19:51:33 +02:00
mesonium bc5a1d35cb
fix: Add x node to MUC PM stanza (#1462)
Add <x/> tag in MUC-PMs to support better Carbon delivery in
compliance with XEP-0045 v1.28 and above.

Fixes #1306
2023-07-29 14:02:38 +02:00
fiaxh 0bddf9f3da Fix character counting for fallbacks
fixes #1420
2023-05-01 19:21:05 +02:00
fiaxh 10315a245d Code cleanup: Remove left-over usages of mam_earliest_synced 2023-04-23 11:48:29 +02:00
fiaxh 2b9a0ccf7e Fix crash on NS_URI call when own server has no MAM; drop broken mam:1 "support"
fixes #1405
2023-04-23 11:40:06 +02:00
Marvin W 6e60cfcbbe
Fix empty alias being handled different than none 2023-04-22 20:08:49 +02:00
hrxi 5a90e793dd First steps of meson support
Basic configuration of qlite, xmpp-vala, the Dino library and the Dino
application are supported. There's no support for the plugins.

This e.g. enables using the Vala language server.
2023-03-24 19:32:50 +01:00
hrxi b617bf7cc4 Make members of Plugins.Registry public instead of internal
They are being used from outside the library.
2023-03-24 19:32:50 +01:00
fiaxh 65efaca6fd
Fix images from another client in our account not being displayed right away 2023-03-23 12:14:22 -06:00
Marvin W 4e1311dfa9
Improve database performance while reconnecting and syncing
Also move some tasks to low priority idle queue so they won't block UI updates
2023-03-21 17:35:58 -06:00
Marvin W 3721027edb
Improve history sync
- Ensure we fully fetch desired history if possible (previously, duplicates
  from offline message queue could hinder MAM sync)
- Early drop illegal MAM messages so they don't pile up in the pending queue
  waiting for their query to end (which it never will if they were not
  requested in first place).

Fixes #1386
2023-03-21 17:35:58 -06:00
Marvin W db3b0d5f23
New Avatar UI 2023-03-05 16:47:46 +01:00
Marvin W 76e1410c2a
Fix typing notifications in groupchats 2023-03-02 00:02:32 +01:00
fiaxh c526848098 Stop regenerating message menu buttons
mitigates #1343
2023-02-16 12:51:33 +01:00
fiaxh 9bf304095c Remove spell check setting
As there is currently no spell check support for GTK4
2023-02-09 12:35:50 +01:00
Marvin W 9c5e36020d
Don't accept corrections from MUC MAM
We don't know if they're from the same user as someone else could have joined with the same nickname after sender left
2023-02-07 21:36:33 +01:00
Marvin W 32ae87a3c4
Fix some form entries not updating properly 2023-02-07 20:23:51 +01:00
Marvin W 1559a7a603
Show "Me" instead of bare jid when no local alias is set 2023-02-07 20:23:51 +01:00
Marvin W d092473fe4
Improve history sync under load 2023-02-07 10:50:45 +01:00
Marvin W f74c1f18b1
Deduplicate messages before storing in database 2023-02-07 10:50:45 +01:00
Marvin W d76e12b215
Add priority for and allow cancellation of outgoing stanzas 2023-02-07 10:50:45 +01:00
Marvin W 18321ed15c
Collapse most stream releated errors into IOError 2023-02-07 10:50:43 +01:00
fiaxh e0ece2aa62 Fix placeholder being shown on startup, fix missing vertical line in no-conversations placeholder 2023-01-31 20:16:23 +01:00
Marvin W 921f28c84b
Fix reaction display in private MUCs 2023-01-31 15:14:55 +01:00
fiaxh 1e23b7bbd2 Fix reading reactions in private groups w/o occupant ids 2023-01-31 11:06:53 +01:00
fiaxh b0b81b88c6 Always display reaction+reply buttons, disable if not possible 2023-01-30 22:54:55 +01:00
fiaxh 26be9d4bb4 Fix reactions from MAM getting attributed to the wrong message 2023-01-25 19:42:19 +01:00
Marvin W e35df88d4a
Fix UI for libadwaita 2023-01-25 11:02:02 +01:00
fiaxh 7e0d1db196 MAM: Fix latest range not being stored in db if it contained a duplicate 2023-01-17 19:56:43 +01:00
fiaxh 73c0263f35 Add debug outputs to summarize_whitespaces_to_space and don't assert_not_reached
related #1335
2023-01-13 11:44:28 +01:00
fiaxh 75500dc767 Support pinning of conversations (locally)
fixes #290
fixes #1330
2023-01-11 19:54:02 +01:00
fiaxh cb3b19b01d Support replies and reactions to files 2023-01-11 19:49:03 +01:00
fiaxh 0c4aea96ff Replies: Fix fallback bodies with multi-line quotes 2023-01-08 12:34:25 +01:00
fiaxh 424a429062 Reactions: Fix wrong time being stored for outgoing reactions (micro sec teated as milli sec)
fixes #1296
2023-01-07 23:44:43 +01:00
fiaxh dc52e7595c Add support for XEP-0461 replies (with fallback) 2023-01-06 14:03:54 +01:00