Compare commits
3 Commits
master
...
wip/termin
Author | SHA1 | Date | |
---|---|---|---|
1ce3a6c397 | |||
0183ad58b8 | |||
2b1fb5b0c2 |
@ -223,6 +223,7 @@ EntryConfig EntryProvider::readqsrunFile(const QString &path)
|
|||||||
}
|
}
|
||||||
result.col = map["col"].toInt();
|
result.col = map["col"].toInt();
|
||||||
result.row = map["row"].toInt();
|
result.row = map["row"].toInt();
|
||||||
|
result.isTerminalCommand = map["terminal"] == "true";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,15 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton()
|
|||||||
{
|
{
|
||||||
this->setText(config.name);
|
this->setText(config.name);
|
||||||
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
QIcon icon = resolveIcon(config.iconPath);
|
QIcon icon;
|
||||||
|
if(config.isTerminalCommand && config.iconPath.isEmpty())
|
||||||
|
{
|
||||||
|
icon = resolveIcon("utilities-terminal");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
icon = resolveIcon(config.iconPath);
|
||||||
|
}
|
||||||
this->setIcon(icon);
|
this->setIcon(icon);
|
||||||
if(!icon.availableSizes().isEmpty())
|
if(!icon.availableSizes().isEmpty())
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ void Window::executeConfig(const EntryConfig &config)
|
|||||||
if(config.isTerminalCommand)
|
if(config.isTerminalCommand)
|
||||||
{
|
{
|
||||||
QString cmd = settingsProvider->getTerminalCommand();
|
QString cmd = settingsProvider->getTerminalCommand();
|
||||||
cmd.replace("%c", config.command);
|
cmd.replace("%c", config.command + " " + config.arguments.join(' '));
|
||||||
QProcess::startDetached(cmd);
|
QProcess::startDetached(cmd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user