about summary refs log tree commit diff stats
path: root/src/ui
Commit message (Collapse)AuthorAgeFilesLines
* Add WIN_VCARD to win_get_tab_identifier()Michael Vetter2023-03-231-0/+4
| | | | | | Thanks to 12b997c5f34776f34634d4ca155a14586aebc905 we already found a place where we should add this missing window type. AFAIK there can be only one vcard window.
* Adapt to new g_string_free() usageMichael Vetter2023-03-232-13/+4
| | | | | Somehow this must have been overlooked when doing e59c401c840f379e64945734969db03b0e55ef22.
* ui: make it easier to find non covered window typesMichael Vetter2023-03-231-20/+31
| | | | | | | | | | | | | | | | Rewrite `win_get_title()` to using switch without a default case. So the compiler warns us (`enumeration value ‘WIN_XXX’ not handled in switch`) in case we add a new window type (WIN_CHAT, WIN_PRIV etc) and forget to adapt this function. Add assert() in the end to make compiler happy when he realizes there the function might have no return value (`control reaches end of non-void function`). This should ever be reached. Replace the default value of `win_to_string()`, `win_get_tab_identifier()` as well, and replace it with an assert. See discussion started at https://github.com/profanity-im/profanity/pull/1799#discussion_r1142444684
* Adapt to g_string_free glib 2.75.3 changeMichael Vetter2023-03-214-29/+7
| | | | | | | | | | | | glib 2.75.3 changes warning behaviour of `g_string_free()`. See: * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3219 * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3226 Use this opportunity to replace the use of GString with `g_strdup_printf()` where possible. Otherwise correctly take the return value of `g_string_free()` which is nicer anyways.
* change OMEMO QR code `0` bits to 'space'Steffen Jaeckel2023-03-121-2/+6
| | | | | | This makes the generated QR code a lot better recognizable in my case. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Fix duplicate download IDs.IsaacM882023-03-092-3/+3
| | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1794 Explanation The problem is the download's identifier. Downloads are given an ID so they can be referenced later when their progress changes. Currently, the download's ID is the download's URL. When you download the same file twice, you have two downloads with the same ID. Download progress updates are shown on the first of both downloads with the same ID. Solution Change the download's ID from its URL to a random number. A random ID is generated when get_random_string() is called from cmd_funcs.c. Several other functions are updated to cope with the new ID format.
* Fix quote and url autocompletion for MAM and historyMarcoPolo-PasTonMolo2023-02-136-17/+33
| | | | | | | | After adding MAM quote and url autocompletion wouldn't pick up messages from MAM or history(from DB) or would have them in the wrong order. This commit fixes that. Fixes https://github.com/profanity-im/profanity/issues/1770
* fix more memory leaksSteffen Jaeckel2023-01-181-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `/strophe` command to modify libstrophe-specific settingsSteffen Jaeckel2023-01-182-0/+17
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2023-01-1013-14/+14
|
* Improve MAM loading string.Martin Dosch2022-10-221-1/+1
| | | | | Replaced three dots `...` by a proper ellipsis `…`. Removed plenking (space between `messages` and ellipsis.
* Fix segfault when loading from MAMMarcoPolo-PasTonMolo2022-10-221-2/+13
| | | | | | When loading messages from MAM profanity would segfault. Reason was that we were freeing the timestamp of messages when displaying them and we needed it for loading MAM.
* Apply codigng style on new MAM codeMichael Vetter2022-10-212-2/+2
|
* Let users scroll up againMichael Vetter2022-10-211-4/+0
| | | | | | | | | | | | We removed this so that we don't get "[SCROLLED]" in the titlebar when there is actually not more text available. But now with MAM we can enable this again so that the user can scroll up and load more text out of the database. Maybe this also could use a check. This reverts commit c84b1b5e5d038684a6a475a251b738c3c5ffb9a5.
* Merge MAM improvements from #1724Michael Vetter2022-10-216-13/+158
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this PR already solves and improves the MAM situation a lot. What's @MarcoPolo-PasTonMolo still wanted to do in this branch is: * MAM for mucs * Check if url and quotes autocompletion works fine * Check if the api still works fine * Resolve conflicts Conflicts are solved with this commit. MAM for mucs can be another feature PR. The rest we can check while being on master. And more people can help testing.
| * Don't notify on MAM messagesMarcoPolo-PasTonMolo2022-08-201-7/+10
| |
| * Handle late deliveryMarcoPolo-PasTonMolo2022-08-202-6/+5
| |
| * Handle MAM when chatwin gets created from incoming messageMarcoPolo-PasTonMolo2022-07-101-1/+4
| |
| * Have ability to scroll through history even without MAMMarcoPolo-PasTonMolo2022-07-102-5/+5
| |
| * Handle scrolling down when buffer fills upMarcoPolo-PasTonMolo2022-07-103-7/+29
| |
| * CleanupMarcoPolo-PasTonMolo2022-07-053-12/+5
| |
| * Add loading history message on initial MAM requestMarcoPolo-PasTonMolo2022-07-053-2/+12
| | | | | | | | | | | | This prevents scrolling to top and initiating another MAM request while still fetching the initial one. Also free timestamp object in database.c
| * Fix initial MAM not displayingMarcoPolo-PasTonMolo2022-07-053-14/+16
| | | | | | | | | | | | Did this by waiting for a batch of MAM messages to arrive before prepending them to the buffer. Also limited the number of messages to fetch to 10 so that the user gets more frequent updates.
| * Add 'Loading messages' message when scrolling upMarcoPolo-PasTonMolo2022-07-043-5/+22
| |
| * Fech data from mam when all history gets displayedMarcoPolo-PasTonMolo2022-07-031-1/+7
| | | | | | | | | | | | Fetch from mam without displaying when all mam messages get received display new messages from db. Unstable, initial mam doesn't get displayed unless we start scrolling.
| * Get messages from history when scrolling up.MarcoPolo-PasTonMolo2022-07-036-5/+95
| |
* | Add vCard supportMarouane L2022-10-187-1/+326
| | | | | | | | | | | | | | | | | | | | | | | | Only nicknames, photos, birthdays, addresses, telephone numbers, emails, JIDs, titles, roles, notes, and URLs are supported Due to the synopsis array not having enough space, `/vcard photo open-self` and `/vcard photo save-self` are not documented properly in the synopsis section of the `/vcard` command, but they are documented in the arguments section Fixed memory leak in vcard autocomplete (thanks to debXwoody)
* | Fix first start detectionMichael Vetter2022-10-111-3/+3
| | | | | | | | | | | | Only display help message on first start. This is a fixup for: https://github.com/profanity-im/profanity/commit/27a5c9d287e856bd774988b4066667db54b65de7
* | Display a help message upon first start of ProfanityMichael Vetter2022-07-051-0/+24
| | | | | | | | Explaining how to register/connect/set up an account.
* | Exit *_incoming_msg functions when plain message is emptyMichael Vetter2022-07-043-0/+17
| | | | | | | | Fix https://github.com/profanity-im/profanity/issues/1733
* | Let slashguard ignore quoted messagesMichael Vetter2022-07-041-1/+2
| | | | | | | | | | | | This let's us whole `/me` messages and other messages starting with `>`. Fix https://github.com/profanity-im/profanity/issues/1732
* | Don't scroll if not neededMichael Vetter2022-06-291-0/+4
| | | | | | | | | | | | | | | | | | If we are in a window with a lot of text and press PAGE UP we scroll up and write [scrolled] in the titlebar. So far we also wrote [scrolled] in there even when actually nothing happened. Like when opening a new window (/msg someone) and there is no text inside.
* | Fix formattingMichael Vetter2022-06-221-1/+1
| |
* | Display log level information in preferencesMichael Vetter2022-06-221-0/+4
| |
* | Display mood preferencesMichael Vetter2022-06-222-0/+12
| |
* | Fix build without omemoMarcoPolo-PasTonMolo2022-06-171-0/+2
| |
* | Don't forget encryption status for OX and PGP.MarcoPolo-PasTonMolo2022-06-171-7/+53
|/ | | | | | | | Use a pgp.enabled and ox.enabled array the same way that omemo.enabled is used. Fixes https://github.com/profanity-im/profanity/issues/1694 Fixes https://github.com/profanity-im/profanity/issues/733
* Reset buffer correctlyMichael Vetter2022-06-151-5/+3
|
* remove memset in cons_show_qrcodeswirl2022-06-151-1/+1
| | | | Signed-off-by: swirl <swurl@swurl.xyz>
* remove VLAs in OMEMO QR Code functionswirl2022-06-141-7/+15
| | | | | | Removes the use of VLAs in favor of calloc Signed-off-by: swirl <swurl@swurl.xyz>
* Merge pull request #1717 from ↵Michael Vetter2022-06-111-1/+5
|\ | | | | | | | | MarcoPolo-PasTonMolo/fix/chat-with-self-duplicate-msgs Fix duplicate messages in chat with oneself.
| * Fix duplicate messages in chat with oneself.MarcoPolo-PasTonMolo2022-05-311-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Messages would get duplicated when you chat with yourself, worse if you had omemo enabled the duplicated message would say something along the lines of "Your client doesn't support OMEMO". The cause was carbons when the message was sent from another client, whilst it was a sent and received message when profanity was the one to send it. This commit ignores the carbon message in the 1st case and ignores the received one in the 2nd. Fixes https://github.com/profanity-im/profanity/issues/1595
* | Use our omemo sid/fingerprint in qr codeMichael Vetter2022-05-312-2/+2
| | | | | | | | | | | | | | Current clients sid/fingerprint will be shown in following format: `xmpp:<user@server>?omemo-sid-<numerical-sid>=<omemo-fingerprint-hex-string>` Fix https://github.com/profanity-im/profanity/issues/1320
* | Add command help for omemo qrcodeMichael Vetter2022-05-301-0/+2
| |
* | Reverse QR code colors and add paddingswirl2022-05-301-7/+19
| | | | | | | | | | | | | | All QR scanners should be able to recognize this, as it is now the correct color with some padding to prevent blending. Signed-off-by: swirl <swurl@swurl.xyz>
* | implement working OMEMO QR codeswirl2022-05-301-7/+6
| | | | | | | | | | | | | | | | TODO: We need to find a way to switch the colors of the QR code, so that more QR readers can detect it, without "blending" the edges of the QR code with the surrounding terminal window. Signed-off-by: swirl <swurl@swurl.xyz>
* | Add basic qrcode functionsMichael Vetter2022-05-302-0/+38
|/
* Update copyright yearMichael Vetter2022-05-0913-14/+14
|
* ox: show ox preferencesMichael Vetter2022-05-052-0/+26
|
* Restore default behaviour for stampsMichael Vetter2022-05-031-1/+1
| | | | | | | | | | | | @mdosch discovered that we now don't print `:` for messages from others anymore. Until https://github.com/profanity-im/profanity/pull/1663#issuecomment-1114625151 is fixed lets restore the default behaviour to always add `:` in `_win_print_internal()`. The result will be that a stamp set to `-->` will also look like `-->:`.