I've moved the key bindings in the main widget instead of the chat form given it
doesn't seem to be the chat form's responsibility to handle switching between
conversations it shouldn't know about in the first place. I've also included new
shortcuts to provide a more familiar feel to most people.
All in all this provides Ctrl+Tab and Ctrl+Shift+Tab for cycling as well as
Ctrl+PgUp and Ctrl+PgDown for cycling. This mimics common application behaviour.
In Qt chat boxes filter out events related to text editing, including tabs.
Unfortunately tabs with modifiers like those used to cycle through contacts are
being filtered despite not being used for anything.
This fixes the keybind for cycling forward through contacts (Ctrl+Tab).
I've implemented this by having the contacts list container return all contact
widgets in the order they appear each time it's time to cycle. It's perhaps
inefficient but given cycling isn't done often I don't see a need to optimize.
This code does make the assumption that the friends list isn't empty, which I'd
guess would be the case if there's an active conversation.
New friends must be added to the friend list before loading history, otherwise the history code won't find the friend in the friendlist, and the history will have blank names for the friend
askProfiles is a really dangerous function. Awful things happen when the user closes that message box. We now prevent it from being closed in more places
There are small instants on startup and while profile switching during which no profile is loaded but the GUI could still receive events, e.g. between two modal windows. Disable the GUI to prevent that.
Don't just let the user close the profile select box and continue with an empty value. We would create a new profile and save it back on top of the previous encrypted profile
- Add AvatarBroadcaster, in charge of making sure our friends have our avatar without spamming file transfers
- Fix file sending code not closing the file after transfer, which prevented file previews, and make the QFile a shared_ptr to fix the obvious memory leak
Some small additions to Core to support AvatarBroadcaster