Use icu transliterator to convert i18n'ed name into ascii for initial
character grouping. Since AppsModel does not use group(), just use group
to store this value for convenience.
Relevant qt feature request for having a new mode for section:
https://bugreports.qt.io/browse/QTBUG-91258
Strategy used by this code mainly focused on CJK language.
1. Japanese locale will group all Han script together.
Katakana will be converted to hiragana.
2. Hangul will decompose and use consonant as group name.
3. Han will use icu "Han-Latin" transliteration to convert to pinyin.
BUG: 433297
BUG: 427530
Hunting this one down since mid-March...
In "native" Plasma containments like the panel, desktop, and plasmawindowed, the `LogindSessionBackend` in `libkworkspace` enters the "Ready" state nearly instantly, before any signals can even be attached. In other containments like Latte Dock and plasmoidviewer, however, the initialization takes some time to complete (unsure why). RootModel was not watching or waiting to check what the session backend's state was, resulting in validity checks being done too soon and never checked again.
Qt's foreach is deprecated and should be replaced with modern C++
range-for loops. Const qualifiers are added to variable declarations
and wrapper in std::as_const as required to prevent unnecessary
clones/detach.
And factored out some duplicated code on the way.
This is a more generic term that's less likely to be inappropriate
(every document is a file, but not every file is a document) and using
"Recent Files" brings Plasma into consistency with what KIO and Dolphin
call it.
CCBUG: 424007
Summary:
Most group have icons, this one did not. A new icon just got created for
all applications, it makes sense to be consistent.
This has no effect in the kicker-dash as that does not show icons, nor
kicker/kickoff as they don't show the all applications group.
Only third party menus will be affected.
Test Plan:
Looked at my custom menu
Looked at kicker-dash
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25294
Summary:
Introduces a new prop and turns it off by default.
Also rewrites the initial "all applications" data gathering avoid
a crash uncovered while working on this (it didn't check EntryType)
and reduces assumptions about the model topology.
It also makes it collect root-level apps now, which was forgotten
to be added when support for root-level apps were added.
This supercedes D22762 and D22890. It does less duplicate work and fixes
more bugs while also not breaking the Dashboard UI.
Reviewers: #plasma, davidedmundson, tcanabrava
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22901
Summary:
In file applets/kicker/package/contents/config/main.xml an option 'showIconsRootLevel' is mentioned. It has following description:
"Whether to show icons on the root level of the menu."
This change provides implementation for this option.
Test Plan:
Manual test:
1. Change menu to 'classic menu' (kicker), notice root level menu items have no icons
2. Open menu settings widget
3. Notice new checkbox 'Show icons on the root level of the menu'
4. Check that checkbox and hit 'Apply' button
5. Root menu items should now have icons similar which look similar to icons in 'modern menu' (kickoff)
Reviewers: hein, #plasma, #vdg, GB_2
Reviewed By: hein, #plasma, #vdg, GB_2
Subscribers: GB_2, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19829
Kickoff uses AppsModel instead of RootModel but since RootModel inherits AppsModel we can just move everything over here.
Differential Revision: https://phabricator.kde.org/D10506
Summary:
The favourites are based on KAStats (already released version) **and kactivitymanagerd master (to be released with the next Plasma release)**. It allows favourites to be set to all activities, or the user can choose which activities to show a specific favourite application on.
This change covers applications, files and contacts, other favourites are still based on the old model (now named SimpleFavoritesModel).
{F1028047}
Test Plan:
Tested in Kicker, Dashboard and Kickoff the following:
Transitioning mechanism:
- load default favorites for the blank user
- load custom default favorites set in the plasmoidsetupscripts script for Kicker
- transition old results - when transitioning, merge the favourites from all launchers. The ordering for each launcher is kept separate (newly added items due to the merge go to the end)
Favorite manipulation:
- right-click add favorite to all activities
- right-click remove favorite from all activities
- right-click add favorite to specific activity (current)
- right-click remove favorite from specific activity (current)
- right-click add favorite to specific activity (not current)
- right-click remove favorite from specific activity (not current)
- right-click move from all to specific
- right-click move from specific to all
- right-click move from one activity to another
- dnd reorder items in the model (up)
- dnd reorder items in the model (down)
- dnd add to favorites at a specific position
Other:
- launch the application
- ordering persists after restart
- ordering from the previous is kept on the activity that has no ordering
Reviewers: mart, hein
Reviewed By: hein
Subscribers: Zren, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3805
Summary:
This puts the frontend in charge of calling refresh() after the
favorites have been initially set by setting auto population at
completion to false. Also preserves original behavior by keeping
auto population default-on.
Fixes a regression from 3e88ac6.
BUG:374156
This is an alternative to D3910.
Reviewers: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3979
Summary:
This does three changes needed to support the Simple Menu UI:
* Support for pagination with configurable page size and related
API naming changes.
* Make showing the Power / Session top-level category optional.
* Emit a signal on wheel move events in WheelInterceptor.
As well as adding inheritance from QQmlParserStatus to RootModel
to avoid startup churn.
Reviewers: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3655
* Not just apps, also documents and contacts can now be added
to the favorites. All types of content have their full context
menu action list available also in the favorites sidebar.
* Contact favorites use the contact photo as icon, with a circular
alpha mask and the presence status icon as overlay badge.
* Adding/removing favorites from context menus now works every-
where, e.g. also in KRunner-based search results.
* Far fewer actions now cause a full rebuild of the model tree
and instead only delta updates, as a side-effect of adding a
mechanism for this to e.g. handle status changes for contact
items.
* Various bugs around hiding/unhiding apps got fixed.
* Lots of code cleanup + less coupling all around.
If menu flattening is enabled and a group actually has subgroups
that get flattened in, separators are ignored and entriees are
collated alphabetically.
Leading or trailing separators are always ignored, and multiple
consecutive separators are collapsed into one.
BUG:347412
Needs kactivities.git:ivan/libkactivities-experimental-stats
Known problems:
* The model class hierarchy in Kicker needs refactoring to
work properly with proxy models; lots of mess right now
just to get things to display for testing.
* Due to the above, the funnel model that enables proper
delegate instance reuse when switching a menu dialog
between sibling categories is currently disabled, causing
bad performance.
* Forget/Forget All for documents isn't available anymore
due to missing API in KActivities.
* KActivitiesStats' ResultModel isn't inserting rows when
new files are opened at runtime.
Ivan: This currently assumes my locally hacked up KActivities
copy to fix the CMake problems; please feel free to push to
this branch when you've made the upstream CMake changes to
make it build.
CCMAIL:ivan.cukic@kde.org