Сравнить коммиты
Нет общих коммитов. «1ce3a6c39726ae42e6ca59aca5ee8b232685af7e» и «bf8f09ec669536b3a7c66a6739fc8eecb81bae40» имеют совершенно разные истории.
1ce3a6c397
...
bf8f09ec66
@ -79,10 +79,6 @@ EntryConfig EntryProvider::readFromDesktopFile(const QString &path)
|
||||
{
|
||||
result.hidden = args == "true";
|
||||
}
|
||||
if(key == "terminal")
|
||||
{
|
||||
result.isTerminalCommand = args == "true";
|
||||
}
|
||||
}
|
||||
result.type = EntryType::SYSTEM;
|
||||
return result;
|
||||
@ -223,7 +219,6 @@ EntryConfig EntryProvider::readqsrunFile(const QString &path)
|
||||
}
|
||||
result.col = map["col"].toInt();
|
||||
result.row = map["row"].toInt();
|
||||
result.isTerminalCommand = map["terminal"] == "true";
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ class EntryConfig
|
||||
public:
|
||||
EntryType type = SYSTEM;
|
||||
bool hidden = false;
|
||||
bool isTerminalCommand = false;
|
||||
QString entryPath;
|
||||
QString key;
|
||||
QString name;
|
||||
|
@ -23,15 +23,7 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton()
|
||||
{
|
||||
this->setText(config.name);
|
||||
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
QIcon icon;
|
||||
if(config.isTerminalCommand && config.iconPath.isEmpty())
|
||||
{
|
||||
icon = resolveIcon("utilities-terminal");
|
||||
}
|
||||
else
|
||||
{
|
||||
icon = resolveIcon(config.iconPath);
|
||||
}
|
||||
QIcon icon = resolveIcon(config.iconPath);
|
||||
this->setIcon(icon);
|
||||
if(!icon.availableSizes().isEmpty())
|
||||
{
|
||||
|
@ -28,8 +28,3 @@ bool SettingsProvider::singleInstanceMode() const
|
||||
{
|
||||
return settings->value("singleInstance", true).toBool();
|
||||
}
|
||||
|
||||
QString SettingsProvider::getTerminalCommand() const
|
||||
{
|
||||
return settings->value("terminal", "/usr/bin/x-terminal-emulator -e %c").toString();
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ class SettingsProvider
|
||||
virtual QStringList systemApplicationsEntriesPaths() const;
|
||||
virtual int getMaxCols() const;
|
||||
virtual bool singleInstanceMode() const;
|
||||
QString getTerminalCommand() const;
|
||||
};
|
||||
|
||||
#endif // SETTINGSPROVIDER_H
|
||||
|
11
window.cpp
11
window.cpp
@ -120,16 +120,7 @@ void Window::populateGrid(const QVector<EntryPushButton *> &list)
|
||||
|
||||
void Window::executeConfig(const EntryConfig &config)
|
||||
{
|
||||
if(config.isTerminalCommand)
|
||||
{
|
||||
QString cmd = settingsProvider->getTerminalCommand();
|
||||
cmd.replace("%c", config.command + " " + config.arguments.join(' '));
|
||||
QProcess::startDetached(cmd);
|
||||
}
|
||||
else
|
||||
{
|
||||
QProcess::startDetached(config.command, config.arguments);
|
||||
}
|
||||
QProcess::startDetached(config.command, config.arguments);
|
||||
this->closeWindow();
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user