File tree 3 files changed +11
-10
lines changed
src/services/status_notifier
3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ DBusResult<Status::Enum> DBusDataTransform<Status::Enum>::fromWire(const QString
352
352
353
353
DBusResult<Category::Enum> DBusDataTransform<Category::Enum>::fromWire(const QString& wire) {
354
354
if (wire == " ApplicationStatus" ) return DBusResult (Category::ApplicationStatus);
355
+ if (wire == " Communications" ) return DBusResult (Category::Communications);
355
356
if (wire == " SystemServices" ) return DBusResult (Category::SystemServices);
356
357
if (wire == " Hardware" ) return DBusResult (Category::Hardware);
357
358
Original file line number Diff line number Diff line change @@ -44,13 +44,15 @@ Q_NAMESPACE;
44
44
QML_ELEMENT;
45
45
46
46
enum Enum : quint8 {
47
- // / The fallback category for general applications or anything that does
48
- // / not fit into a different category.
49
- ApplicationStatus = 0 ,
47
+ // / Hardware controls like battery indicators or volume control.
48
+ Hardware = 0 ,
50
49
// / System services such as IMEs or disk indexing.
51
50
SystemServices = 1 ,
52
- // / Hardware controls like battery indicators or volume control.
53
- Hardware = 2 ,
51
+ // / The fallback category for general applications or anything that does
52
+ // / not fit into a different category.
53
+ ApplicationStatus = 2 ,
54
+ // / Communication related applications such as instant messengers or email clients.
55
+ Communications = 3 ,
54
56
};
55
57
Q_ENUM_NS (Enum);
56
58
} // namespace Category
Original file line number Diff line number Diff line change 1
1
#include " qml.hpp"
2
2
3
+ #include < qnamespace.h>
3
4
#include < qobject.h>
4
5
5
6
#include " ../../core/model.hpp"
@@ -28,9 +29,6 @@ void SystemTray::onItemRegistered(StatusNotifierItem* item) {
28
29
void SystemTray::onItemUnregistered (StatusNotifierItem* item) { this ->mItems .removeObject (item); }
29
30
ObjectModel<StatusNotifierItem>* SystemTray::items () { return &this ->mItems ; }
30
31
31
- bool SystemTray::compareItems (
32
- qs::service::sni::StatusNotifierItem* a,
33
- qs::service::sni::StatusNotifierItem* b
34
- ) {
35
- return a->category () > b->category () || a->id ().compare (b->id (), Qt::CaseInsensitive) >= 0 ;
32
+ bool SystemTray::compareItems (StatusNotifierItem* a, StatusNotifierItem* b) {
33
+ return a->category () < b->category () || a->id ().compare (b->id (), Qt::CaseInsensitive) >= 0 ;
36
34
}
You can’t perform that action at this time.
0 commit comments