Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "..." to all input generators to indicate opening a dialog #743

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions avogadro/qtplugins/apbs/apbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Apbs::Apbs(QObject* parent_)
m_progressDialog(nullptr), m_dialog(nullptr)
{
QAction* action = new QAction(this);
action->setText(tr("Run APBS"));
action->setText(tr("Run APBS..."));
connect(action, SIGNAL(triggered()), this, SLOT(onRunApbs()));
m_actions.append(action);

action = new QAction(this);
action->setText(tr("Open Output File"));
action->setText(tr("Open Output File..."));
connect(action, SIGNAL(triggered()), this, SLOT(onOpenOutputFile()));
m_actions.append(action);
}
Expand Down
2 changes: 1 addition & 1 deletion avogadro/qtplugins/cp2kinput/cp2kinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Cp2kInput::Cp2kInput(QObject* parent_)
m_dialog(nullptr), m_outputFormat(nullptr)
{
m_action->setEnabled(true);
m_action->setText(tr("&CP2K"));
m_action->setText(tr("&CP2K..."));
connect(m_action, SIGNAL(triggered()), SLOT(menuActivated()));
}

Expand Down
2 changes: 1 addition & 1 deletion avogadro/qtplugins/gamessinput/gamessinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GamessInput::GamessInput(QObject* parent_)
m_dialog(nullptr), m_outputFormat(nullptr)
{
m_action->setEnabled(true);
m_action->setText(tr("&GAMESS"));
m_action->setText(tr("&GAMESS..."));
connect(m_action, SIGNAL(triggered()), SLOT(menuActivated()));
}

Expand Down
2 changes: 1 addition & 1 deletion avogadro/qtplugins/lammpsinput/lammpsinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ LammpsInput::LammpsInput(QObject* parent_)
m_dialog(nullptr), m_outputFormat(nullptr)
{
m_action->setEnabled(true);
m_action->setText(tr("&LAMMPS Input"));
m_action->setText(tr("&LAMMPS..."));
connect(m_action, SIGNAL(triggered()), SLOT(menuActivated()));
}

Expand Down
2 changes: 1 addition & 1 deletion avogadro/qtplugins/openmminput/openmminput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ OpenMMInput::OpenMMInput(QObject* parent_)
m_dialog(nullptr), m_outputFormat(nullptr)
{
m_action->setEnabled(true);
m_action->setText(tr("&OpenMM Script Builder"));
m_action->setText(tr("&OpenMM Script..."));
connect(m_action, SIGNAL(triggered()), SLOT(menuActivated()));
}

Expand Down
8 changes: 6 additions & 2 deletions avogadro/qtplugins/quantuminput/quantuminput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,15 @@ void QuantumInput::updateActions()
QStringList scripts = m_inputGeneratorScripts.values(programName);
// Include the full path if there are multiple generators with the same
// name.
QString label = programName;
if (!label.endsWith("..."))
label.append("...");

if (scripts.size() == 1) {
addAction(programName, scripts.first());
addAction(label, scripts.first());
} else {
foreach (const QString& filePath, scripts) {
addAction(QString("%1 (%2)").arg(programName, filePath), filePath);
addAction(QString("%1 (%2)").arg(label, filePath), filePath);
}
}
}
Expand Down