about summary refs log tree commit diff stats
path: root/src/ui
Commit message (Collapse)AuthorAgeFilesLines
* Implement Color Vision Deficiencies settingMichael Vetter2019-12-122-3/+14
| | | | | | Implement settings for redgreen and blue blindness. Regards https://github.com/profanity-im/profanity/issues/1191
* Add initial support for XEP-0392Michael Vetter2019-12-092-0/+10
| | | | | | | | | | | | | | The last 3 commits added basic support. Thanks @aaptel! This commit adds basic settings interface to use it. See `/color on|off`. We still have to enable settings for color blindness. And maybe another setting to decide whether to color the occupantslist/roster with the same algo. Regards https://github.com/profanity-im/profanity/issues/1191
* XEP-0392: theme, ui: conditionally colorize user nicksAurelien Aptel2019-12-031-0/+4
| | | | | | | | | * add theme_hash_attrs() * when printing a user message check PREF_COLOR_NICK to decide whether to colorize it or not ideally we should hash the jid instead of the nick but this is already a first step.
* Call ncurses resize function before move functionMichael Vetter2019-12-022-2/+3
| | | | | | | | | | | | | | From @xaizek s comment on issue #1235: ``` If the move would cause the window to be off the screen, it is an error and the window is not moved. Resize on the other hand doesn't fail like this according to its documentation. So new size needs to be applied first. ``` Big thanks to @xaizek for taking a look at our code and helping us!! Regards https://github.com/profanity-im/profanity/issues/1235
* _win_print: Guard against time being nullMichael Vetter2019-12-011-1/+1
| | | | | | | | | | | | | | | This is encountered when biboumi is used. Example: `/join #debian-next%irc.oftc.net@biboumi.lebihan.pl` It seems then time can be null. g_date_time_format() will not work in this case although time_pref will not be "off". So let's not call g_date_time_format() in this case. But treat it like time is set to off. However message reflection will not work properly with biboumi. Probably we dont get origin-id. Fix https://github.com/profanity-im/profanity/issues/1230
* Add vim modelineMichael Vetter2019-11-1328-0/+28
|
* Merge /chlog and /grlog commands into /loggingMichael Vetter2019-11-122-13/+7
| | | | | | | Instead of `/chlog on` we now have `/logging chat on`. Instead of `/grlog on` we now have `/logging group on`. Fix https://github.com/profanity-im/profanity/issues/1224
* Merge /invite, /invites and /decline commandsMichael Vetter2019-11-051-1/+1
| | | | | | | | | | `/invite <contact>` became `/invite send <contact>. `/invites` became `/invite list`. `/decline` became `/invite decline`. Accept is still done via `/join`. Regards https://github.com/profanity-im/profanity/issues/1116
* Add `/titlebar show presence` commandMichael Vetter2019-11-051-0/+6
| | | | | | | Additionally to `/presence titlebar on` we now allow the setting via /titlebar show|hide presence` since it's about the titlebar. Regards https://github.com/profanity-im/profanity/issues/1116
* Display resource information in `/titlebar`Michael Vetter2019-11-051-0/+6
|
* Move /encwarn command into /titlebarMichael Vetter2019-11-052-17/+13
| | | | | | Instead of `/encwarn on|off` we now have `/titlebar show|hide encwarn`. Regards https://github.com/profanity-im/profanity/issues/1116
* Fix add_history usage in down arrow handlerMichael Vetter2019-11-051-4/+1
| | | | | | | | | | | | | | [Programming with GNU History](http://www.math.utah.edu/docs/info/hist_2.html) mentions using_history(). Chet, maintainer of readline told me about it. (Thanks Chet!) Seems like we need to call this so that the history offset is at the right end of the list. I assume it's called in the linehandler automatically. Fix https://github.com/profanity-im/profanity/issues/200
* Store current input line in historyMichael Vetter2019-11-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regards https://github.com/profanity-im/profanity/issues/200 This doesn't work yet. And I have no idea why. Weird behaviour: - start profanity - type 'ASDF' - ctrl+arrow down -> text vanishes (like intended) - arrow up -> nothing happens (intended is that the last history item [ASDF] appears) - type 'ABC' - press enter - arrow up -> ABC appears - enter - type 'UUU' - ctrl+arrow down - type 'ZZZ' - enter - arrow up - ZZZ appears - arrow up - UUU appears So in the latter case we added to history and deleted from the input line and then immediately entered new text and pressed enter, to add this to the history too. When we do this the not sent text succesfully was stored in history.
* Initialize ProfBufEntry->id correctlyMichael Vetter2019-11-011-1/+5
|
* Move id from DeliveryReceipt to ProfBuffEntry structMichael Vetter2019-11-013-26/+24
| | | | | | | | | | | | | | | | | XEP-0184: Message Delivery Receipts, *requires* the id attribute. Generally this is not the case. For this reason the id was only present in the DeliveryReceipt struct since it was only used for XEP-0184. For https://github.com/profanity-im/profanity/issues/660 XEP-0313 MAM and https://github.com/profanity-im/profanity/issues/805 XEP-0308 Last Message Correction we will also need the id. So in preparation for further work let's move the id to the general ProfBuffEntry. We will need to adapt code so that we actually always write the ID if we receive one.
* Remove not needed if blocksMichael Vetter2019-11-011-9/+2
|
* Don't override ProfMessage Id with origin-idMichael Vetter2019-10-311-1/+1
| | | | | | | | | | Profanity sends the same value for both. Other clients might not. Safe both since we could need them later. Once we implement Last Message Correction we will need the regular id. If we override it with origin-id and another client chooses to not use the same value for id and origin-id then we can't interpret the id sent with the LMC request correctly.
* Replace sent_messages list with algoMichael Vetter2019-10-314-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For OMEMO we had a list with our sent messages. It was used so that we don't decrypt our own messages in MUCs that come in via reflection. Recently for https://github.com/profanity-im/profanity/pull/1209 we started to use origin-id and use an algorithm so we can detect our own sent messages via checking origin-id. Profanity uses the same id for the message ID and origin-id. With 06f300a42c4c627b6f1817bd48d92f083ffd9883 we added the message_is_sent_by_us() function. We implemented XEP-0359 this way to fix https://github.com/profanity-im/profanity/issues/1201 so that we don't log our own messages in MUCs twice. We can now check whether the message was sent by us using this function and can get rid of the list. Probably we could also put many parts of the sv_ev_room_message() function inside (else) part of `if (!(g_strcmp0(mynick, message->jid->resourcepart) == 0 && message_is_sent_by_us(message))) {`. Have to look more closely whether any of this needs to be run in case the message actually comes from us.
* Put ifdef around tray.h functionsMichael Vetter2019-10-292-9/+8
| | | | Only define in case we built with GTK support.
* Remove not neede gtk_init() in tray.cMichael Vetter2019-10-291-1/+0
| | | | gtk_init_check() already has that functionality.
* Remove commentsMichael Vetter2019-10-291-6/+0
|
* Make sure date vars are initializedMichael Vetter2019-10-211-3/+3
|
* Properly display chatwin historyMichael Vetter2019-10-211-4/+10
| | | | | | | | | | | | | | | | | | | | So far if one had enabled `/history` and did `/msg somenick` the history was loaded from file and displayed like this: ``` 04-04-17 15:23 - 3/4/2017: 01-01-00 10:30 - me: .... 01-01-00 10:31 - somebody: .... 01-01-00 10:32 - somebody: .... ``` So the first line contained the actual date. But the date used in each line was always 01-01-2000. This date was for some reason hardcoded. This commit now actually uses that date to build the proper GDateTime instead of just printing it. Fix https://github.com/profanity-im/profanity/issues/922
* Add option to hilight unread rooms in /wins commandMichael Vetter2019-10-121-1/+5
| | | | | | | In the theme we can now set `cmd.wins.unread` to hvae a special color for the lines of the `/wins` output that have unread messages. Fix https://github.com/profanity-im/profanity/issues/895
* Merge pull request #874 from spiridoncha/masterMichael Vetter2019-10-051-1/+9
|\ | | | | Change /clear behaviour. Closes issue #855.
| * Makes /clear behavior configurable.Spiridonov Alexander2016-11-071-0/+5
| |
| * Change /clear behaviour. Closes issue #855.Spiridonov Alexander2016-10-221-1/+4
| |
* | Bind key to switch to next active windowMichael Vetter2019-09-303-0/+41
| | | | | | | | | | | | alt-a brings one to the next window with unread messages. Regards https://github.com/profanity-im/profanity/issues/1114
* | Define keybindings to switch to up to 20 windowsMichael Vetter2019-09-301-0/+100
| | | | | | | | | | | | | | | | | | | | alt-2 brings one ot the window. irssi supports alt + 1234567890qwertyuio to easily switch to 20 windows instead of just ten. Hardcode this too. Regards https://github.com/profanity-im/profanity/issues/1114
* | Remove not needed codeMichael Vetter2019-09-291-4/+0
| | | | | | | | Was left over from refactoring a long time ago.
* | Add comment about statusbar.currentMichael Vetter2019-09-291-0/+3
| |
* | Add coloring of statusbar.current tab in viewDaniel Lublin2019-09-242-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This theme color applies to the tab title text of the statusbar tab that is currently shown. The (somewhat confusingly named) `statusbar.active` theme color now applies to all other tabs (before, it applied to all tabs). Coloring of a tab that is highlighted/has new messages is done as before using the `statusbar.new` theme color. The default color is set to `cyan`, and thus causes no visible change for users -- until modified.
* | Print history color in theme propertiesMichael Vetter2019-09-111-0/+1
| | | | | | | | Also print `main.text.history` setting when `/theme properties' is run.
* | Allow colorization of history messagesMichael Vetter2019-09-101-2/+2
| | | | | | | | | | | | | | | | History was always printed with `THEME_DEFAULT` we now use `THEME_TEXT_HISTORY` which is accesible in theme files via `main.text.history`. Fix https://github.com/profanity-im/profanity/issues/1170
* | Don't crash if source jid doesn't contain the node partDmitry Podgorny2019-08-261-1/+3
| | | | | | | | | | | | | | | | Profanity uses the node part of a JID as display name for a tab. If such a JID doesn't contain the node part, Profanity crashes on NULL pointer dereference. In the above case, use barejid which is just a domain. Fixes #1153.
* | Hardcode James email adress in info messageMichael Vetter2019-08-241-1/+1
| | | | | | | | Dont rely on PACKAGE_BUGREPORT being James' mail.
* | Add 256 colour info to /theme coloursMichael Vetter2019-08-231-0/+7
| |
* | Remove dead assignmentsMichael Vetter2019-07-221-1/+1
| |
* | Remove unused assignmentsMichael Vetter2019-07-222-2/+1
| |
* | Reduce scope of num in ui_print_system_msg_from_recipient()Michael Vetter2019-07-221-3/+1
| |
* | Fix jump depending on uninit. value in statusbarMichael Vetter2019-07-101-1/+1
| |
* | Fix handling of encrypted carbonsPaul Fariello2019-06-212-5/+5
| |
* | Rename prof_message_t into ProfMessagePaul Fariello2019-06-206-8/+8
| |
* | Set foreground color for untrusted messagesPaul Fariello2019-06-203-8/+7
| |
* | Add prof_message_t to wrap all message attributesPaul Fariello2019-06-206-55/+62
| | | | | | | | | | | | | | Probably missing copy of body to plain in carbon and privmessage. Only covers the incoming message path because goal is OMEMO decryption of untrusted message. Cover some of the log functions but not all.
* | Use flags in xmmp/message.c for encryption and trustPaul Fariello2019-06-202-9/+12
| |
* | Fix prefs_get_string mem leaks in statusbarMichael Vetter2019-06-191-6/+18
| |
* | Free last_msg_timestampMichael Vetter2019-06-191-0/+4
| | | | | | | | Fix memory leak.
* | Add myself to copyrightMichael Vetter2019-06-174-0/+5
| | | | | | | | Like discussed with James.
* | Safe last MUC message timestamp per MUCMichael Vetter2019-06-112-0/+3
| | | | | | | | | | | | After pasis review of my code he thinks it's better to safe the timestamp per MUC so we can account for some problems that could occur with timing.