Skip to content

Commit

Permalink
Merge pull request #518 from ghutchis/disable-register-molequeue
Browse files Browse the repository at this point in the history
Disable code for register Molequeue - can bring back when it's updated
  • Loading branch information
ghutchis authored Oct 31, 2024
2 parents 40d89ee + d620bdd commit 380d860
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions avogadro/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2366,32 +2366,34 @@ bool MainWindow::saveFileIfNeeded()

void MainWindow::registerMoleQueue()
{
#ifdef Avogadro_ENABLE_RPC
MoleQueue::Client client;
if (!client.connectToServer() || !client.isConnected())
return;

// Get all extensions;
typedef std::vector<std::string> StringList;
FileFormatManager& ffm = FileFormatManager::instance();
StringList exts = ffm.fileExtensions(FileFormat::Read | FileFormat::File);
/*
#ifdef Avogadro_ENABLE_RPC
MoleQueue::Client client;
if (!client.connectToServer() || !client.isConnected())
return;
// Create patterns list
QList<QRegularExpression> patterns;
for (auto it = exts.begin(), itEnd = exts.end(); it != itEnd; ++it) {
patterns << QRegularExpression(
QRegularExpression::wildcardToRegularExpression(
extensionToWildCard(QString::fromStdString(*it))),
QRegularExpression::CaseInsensitive);
}
// Get all extensions;
typedef std::vector<std::string> StringList;
FileFormatManager& ffm = FileFormatManager::instance();
StringList exts = ffm.fileExtensions(FileFormat::Read | FileFormat::File);
// Create patterns list
QList<QRegularExpression> patterns;
for (auto it = exts.begin(), itEnd = exts.end(); it != itEnd; ++it) {
patterns << QRegularExpression(
QRegularExpression::wildcardToRegularExpression(
extensionToWildCard(QString::fromStdString(*it))),
QRegularExpression::CaseInsensitive);
}
// Register the executable:
client.registerOpenWith("Avogadro2 (new)", qApp->applicationFilePath(),
patterns);
// Register the executable:
client.registerOpenWith("Avogadro2 (new)", qApp->applicationFilePath(),
patterns);
client.registerOpenWith("Avogadro2 (running)", "avogadro", "openFile",
patterns);
#endif // Avogadro_ENABLE_RPC
client.registerOpenWith("Avogadro2 (running)", "avogadro", "openFile",
patterns);
#endif // Avogadro_ENABLE_RPC
*/
}

void MainWindow::showAboutDialog()
Expand Down

0 comments on commit 380d860

Please sign in to comment.