* Split up Window Layout loading into a loading and application stage
Previously, we were creating UI elements at while we were reading the window-layout.json file.
We now read the window-layout.json file fully first, which results in a
WindowLayout struct which is built up of a list of windows with a list
of tabs with a root node which contains containers and splits.
This WindowLayout can then be applied.
This will enable PRs like #1940 to start Chatterino with Window Layouts
that aren't defined in a json file.
This commit has deprecated loading of v1 window layouts (we're now on v2). If a v1 window layout is there, it will just be ignored and Chatterino will boot up as if it did not have a window layout at all, and on save that old window layout will be gone.
* Fix compile error for mac
* Proof of Concept for Quick Switcher
* Fix crash when suggestions are empty
* QuickSwitcher: Use tab name instead of a single channel
* Rebase later
* Add missing include for <functional>
* Move QuickSwitcher related classes into own subfolder
* Refactor switcher list items
Now, items are responsible for taking the right action when selected in
the switcher list. This should allow for more focused code and
responsibilities.
* Add note about memory management
* Add option to open channel in a new tab
* Add support for using the mouse
* Spawn switcher popup in the middle of the window
Works reliably on i3 at least. Might need some additional testing on
other WMs (and especially on Windows!).
* Add some icons for switcher items
Note that the final design of the list is not final but I do plan to
incorporate these in the future.
* Set Qt::Dialog window flag on switcher popup
Prevents tiling window managers like i3 from trying to tile the window.
* Rename "SwitcherItem" to "AbstractSwitcherItem"
* Add comments about what items are inserted
* Use custom model and view
Still missing: Currently selected item is not highlighted yet. You can
move between selected items with tab and arrow keys though.
* Add helper function to convert QVariant to AbstractSwitcherItem *
* Remove useless constant
* Highlight currently selected switcher item
* Use a different method for centering QuickSwitcherPopup window
* QuickSwitcherModel: Add documentation
* Add default parameter to QuickSwitcherModel::rowCount
* QuickSwitcherPopup: Add comments
* Remove outdated TODO
* QuickSwitcherModel: Init vector with default capacity
* Remove outdated comment
* Add comment about 0 ms timeout interval
* NewTabItem: Simplify interface
* Only fetch opened splits once
This is better than the prior approach since opened splits cannot change
anyways while the switcher is open.
* Use SplitContainer to pass information instead of custom type
* Allow searching for tab titles as well
Before this commit, only channel names could be searched.
* Refactor switcher item interface to be more flexible
Also show tab name and channel name in the switcher list.
* Add documentation for AbstractSwitcherItem
* Add documentation for NewTabItem
* Add comments about {begin,end}{Insert,Remove}Rows
* Remove unused method
* Replace magic size with named constant
* Add change log entry
Co-authored-by: fourtf <tf.four@gmail.com>
This commit adds support for uploading images to i.nuuls.com from clipboard or by dragging an image into a split.
Documentation for how to self-host the image uploader is available in ENV.md
By default, you will be asked before an image upload takes place. There's an option in the dialog to not be asked again, if that option is chosen you can revert that choice in the settings dialog.
There's a document in src/providers/twitch/api which describes how we interact with the Twitch API.
Keeping this up to date might be a healthy way for us to ensure we keep using the right APIs for the right job.
* Support for user-defined sounds and colors
* Make color & sound columns selectable
* Add custom row for subscription highlights
* Add subscriptions to custom highlights and centrally manage highlight colors
* Dynamically update message highlight colors
* Introduce crossPlatformCopy()
It sets the text of the clipboard and also syncs it with the selection
clipboard if it is supported. Such behaviour is pretty common for X11
application on Unix-like Operating Systems.
* Fix clang-format remarks
* Fix weird clang-format config discrepancy between my machine and CI
* Remove clipboard argument from crossPlatformCopy
* Fix clang-format remarks
* Ran clang-format
* Implement user-specific search in message history
This functionality was originally requested in #1236.
This commit changes the SearchPopup::performSearch method so that only
messages from specific users can be shown.
In order to filter for a specific user, enter their username with a
leading '@' in the search popup. You can also add an additional search
phrase which will also be considered in the search.
* Naive implementation for "from:" tags
Rebase later?
* Cleverer (?) version using Predicates
Commit adds two POC predicates: one for the author of messages, and one
for substring search in messages.
Problems/TODOs:
* Best way to register new predicates?
* Clean up tags (e.g. "from:") or not?
* Test combinations of different predicates
* Add a predicate to check for links in messages
* Remove a dumb TODO
* Rewrite SearchPopup::performSearch to be cleaner
* Ran clang-format on all files
* Remove TODO I missed earlier
* Forgot to run clang-format
peepoSadDank
* Re-use {}-initialization
Was accidentally removed when fixing earlier merge conflict.
* Does this fix line endings?
No diffs are shown locally, hopefully Git doesn't lie to me.
* Rename "predicates" directory to "search"
Resolving one conversation in the review of #1237.
* Use LinkParser in LinkPredicate
Resolving a conversation in the review of #1237.
* Predicates: Use unique_ptr instead of shared_ptr
Resolves a conversation in the review of #1237.
* Refactor of SearchPopup and AuthorPredicate
Resolving some points from the review in #1237.
* Moved parsing of comma-seperated values into AuthorPredicate
constructor.
* Rewrite SearchPopup::parsePredicates as suggested.
* Deleted now redundant methods in SearchPopup.
* MessagePredicate::appliesTo now takes a Message&
... instead of a MessagePtr.
This resolves a conversation in the review of #1237.
* Run clang-format on two files I missed
* AuthorPredicate: Check for displayName & loginName
Resolving conversation on #1237.