Introduce EntryType. Retire userEntry boolean
Introduce EntryType, allowing to distnguish between: - inherietd entries: Those inherit their values from other entries, typcally system entries. They do not allow overwriting the value, except row/col. - system entries: those not created by the user in any way, usually .desktop files in /usr/share/applications/... - user entries: those that have been created by the user. they can however also inherit, and overwrite inherited values. inherited are used for the "favourites" feature.
This commit is contained in:
@ -94,7 +94,7 @@ void EntryPushButton::mousePressEvent(QMouseEvent *event)
|
||||
}
|
||||
if(event->button() == Qt::RightButton)
|
||||
{
|
||||
if(this->config.userEntry)
|
||||
if(this->config.type == EntryType::USER || this->config.type == EntryType::INHERIT)
|
||||
{
|
||||
this->userEntryMenu.exec(QCursor::pos());
|
||||
}
|
||||
@ -108,7 +108,7 @@ void EntryPushButton::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
void EntryPushButton::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if(!this->config.userEntry)
|
||||
if(this->config.type == EntryType::SYSTEM)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user