diff src/mainwindow.cpp @ 472:2d57b81671de

Open the settings dialog at Paths tab when invoking it because of a failure to run hg
author Chris Cannam
date Thu, 14 Jul 2011 13:56:20 +0100
parents ff2306c67852
children 101d113943c2 2f59333952ce
line wrap: on
line diff
--- a/src/mainwindow.cpp	Thu Jul 14 13:31:07 2011 +0100
+++ b/src/mainwindow.cpp	Thu Jul 14 13:56:20 2011 +0100
@@ -1718,7 +1718,13 @@
 
 void MainWindow::settings()
 {
+    settings(SettingsDialog::PersonalDetailsTab);
+}
+
+void MainWindow::settings(SettingsDialog::Tab tab)
+{
     SettingsDialog *settingsDlg = new SettingsDialog(this);
+    settingsDlg->setCurrentTab(tab);
     settingsDlg->exec();
 
     if (settingsDlg->presentationChanged()) {
@@ -2038,7 +2044,7 @@
              tr("Failed to run Mercurial"),
              tr("The Mercurial program either could not be found or failed to run.<br>Check that the Mercurial program path is correct in %1.").arg(setstr),
              output);
-        settings();
+        settings(SettingsDialog::PathsTab);
         return;
     case ACT_TEST_HG_EXT:
         MoreInformationDialog::warning
@@ -2047,7 +2053,7 @@
              tr("Failed to run Mercurial with extension enabled"),
              tr("The Mercurial program failed to run with the EasyMercurial interaction extension enabled.<br>This may indicate an installation problem.<br><br>You may be able to continue working if you switch off &ldquo;Use EasyHg Mercurial Extension&rdquo; in %1.  Note that remote repositories that require authentication might not work if you do this.").arg(setstr),
              output);
-        settings();
+        settings(SettingsDialog::PathsTab);
         return;
     case ACT_CLONEFROMREMOTE:
         // if clone fails, we have no repo