Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
msys
git-svn-id: http://svn.osgeo.org/qgis/trunk@4855 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 15, 2006
1 parent 793296f commit d7148fb
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions src/plugins/grass/qgsgrasstools.cpp
Expand Up @@ -132,9 +132,13 @@ QgsGrassTools::QgsGrassTools ( QgisApp *qgisApp, QgisIface *iface,
//QString conf = QgsApplication::pkgDataPath() + "/grass/config/default.qgc";
QString conf = mAppDir + "/share/qgis/grass/config/default.qgc";

restorePosition();

// Show before loadConfig() so that user can see loading
mModulesListView->show();

loadConfig ( conf );
//statusBar()->hide();
restorePosition();
}

void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
Expand All @@ -159,12 +163,24 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
if ( name == "shell" )
{
#ifdef WIN32
QMessageBox::warning( 0, "Warning",
"GRASS Shell is not supported on Windows." );

// This does not work:
//QProcess *proc = new QProcess();
//proc->start ("cmd.exe");
// Run MSYS if available
// Note: I was not able to run cmd.exe and command.com
// with QProcess

QString msysPath = mAppDir + "/msys/msys.bat";
QFile file ( msysPath );

if ( !file.exists() )
{
QMessageBox::warning( 0, "Warning",
"Cannot find MSYS (" + msysPath + ")" );
}
else
{
QProcess *proc = new QProcess(this);
proc->start (msysPath);
}
return;
#else

#ifdef HAVE_OPENPTY
Expand Down

0 comments on commit d7148fb

Please sign in to comment.