wip/dynamics_buttons #26

Manually merged
crtxcr merged 3 commits from wip/dynamics_buttons into master 2020-12-10 22:50:27 +01:00
3 changed files with 5 additions and 2 deletions
Showing only changes of commit bb74d156c9 - Show all commits

View File

@ -19,7 +19,8 @@ enum EntryType
{ {
USER, USER,
INHERIT, INHERIT,
SYSTEM SYSTEM,
DYNAMIC
}; };
class EntryConfig class EntryConfig

View File

@ -106,7 +106,7 @@ void EntryPushButton::mousePressEvent(QMouseEvent *event)
{ {
this->userEntryMenu.exec(QCursor::pos()); this->userEntryMenu.exec(QCursor::pos());
} }
else else if(this->config.type == EntryType::SYSTEM)
{ {
this->systemEntryMenu.exec(QCursor::pos()); this->systemEntryMenu.exec(QCursor::pos());
} }

View File

@ -266,6 +266,7 @@ void Window::addPATHSuggestion(const QString &text)
e.row = 0; e.row = 0;
e.command = suggestions[0]; e.command = suggestions[0];
e.iconPath = suggestions[0]; e.iconPath = suggestions[0];
e.type = EntryType::DYNAMIC;
EntryPushButton *button = createEntryButton(e); EntryPushButton *button = createEntryButton(e);
clearGrid(); clearGrid();
grid->addWidget(button, 0, 0); grid->addWidget(button, 0, 0);
@ -343,6 +344,7 @@ void Window::lineEditTextChanged(QString text)
} }
e.command = arguments[0]; e.command = arguments[0];
e.iconPath = "utilities-terminal"; e.iconPath = "utilities-terminal";
e.type = EntryType::DYNAMIC;
EntryPushButton *button = createEntryButton(e); EntryPushButton *button = createEntryButton(e);
clearGrid(); clearGrid();