diff --git a/entryprovider.h b/entryprovider.h index 3a86181..ab98bdc 100644 --- a/entryprovider.h +++ b/entryprovider.h @@ -19,7 +19,8 @@ enum EntryType { USER, INHERIT, - SYSTEM + SYSTEM, + DYNAMIC }; class EntryConfig diff --git a/entrypushbutton.cpp b/entrypushbutton.cpp index c2d29bf..e7fabb1 100644 --- a/entrypushbutton.cpp +++ b/entrypushbutton.cpp @@ -106,7 +106,7 @@ void EntryPushButton::mousePressEvent(QMouseEvent *event) { this->userEntryMenu.exec(QCursor::pos()); } - else + else if(this->config.type == EntryType::SYSTEM) { this->systemEntryMenu.exec(QCursor::pos()); } diff --git a/window.cpp b/window.cpp index bfd07d4..22e685a 100644 --- a/window.cpp +++ b/window.cpp @@ -266,6 +266,7 @@ void Window::addPATHSuggestion(const QString &text) e.row = 0; e.command = suggestions[0]; e.iconPath = suggestions[0]; + e.type = EntryType::DYNAMIC; EntryPushButton *button = createEntryButton(e); clearGrid(); grid->addWidget(button, 0, 0); @@ -343,6 +344,7 @@ void Window::lineEditTextChanged(QString text) } e.command = arguments[0]; e.iconPath = "utilities-terminal"; + e.type = EntryType::DYNAMIC; EntryPushButton *button = createEntryButton(e); clearGrid();