comparison 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
comparison
equal deleted inserted replaced
471:8a10d3c396e8 472:2d57b81671de
1716 return true; 1716 return true;
1717 } 1717 }
1718 1718
1719 void MainWindow::settings() 1719 void MainWindow::settings()
1720 { 1720 {
1721 settings(SettingsDialog::PersonalDetailsTab);
1722 }
1723
1724 void MainWindow::settings(SettingsDialog::Tab tab)
1725 {
1721 SettingsDialog *settingsDlg = new SettingsDialog(this); 1726 SettingsDialog *settingsDlg = new SettingsDialog(this);
1727 settingsDlg->setCurrentTab(tab);
1722 settingsDlg->exec(); 1728 settingsDlg->exec();
1723 1729
1724 if (settingsDlg->presentationChanged()) { 1730 if (settingsDlg->presentationChanged()) {
1725 m_hgTabs->updateFileStates(); 1731 m_hgTabs->updateFileStates();
1726 updateToolBarStyle(); 1732 updateToolBarStyle();
2036 (this, 2042 (this,
2037 tr("Failed to run Mercurial"), 2043 tr("Failed to run Mercurial"),
2038 tr("Failed to run Mercurial"), 2044 tr("Failed to run Mercurial"),
2039 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), 2045 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),
2040 output); 2046 output);
2041 settings(); 2047 settings(SettingsDialog::PathsTab);
2042 return; 2048 return;
2043 case ACT_TEST_HG_EXT: 2049 case ACT_TEST_HG_EXT:
2044 MoreInformationDialog::warning 2050 MoreInformationDialog::warning
2045 (this, 2051 (this,
2046 tr("Failed to run Mercurial"), 2052 tr("Failed to run Mercurial"),
2047 tr("Failed to run Mercurial with extension enabled"), 2053 tr("Failed to run Mercurial with extension enabled"),
2048 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), 2054 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),
2049 output); 2055 output);
2050 settings(); 2056 settings(SettingsDialog::PathsTab);
2051 return; 2057 return;
2052 case ACT_CLONEFROMREMOTE: 2058 case ACT_CLONEFROMREMOTE:
2053 // if clone fails, we have no repo 2059 // if clone fails, we have no repo
2054 m_workFolderPath = ""; 2060 m_workFolderPath = "";
2055 enableDisableActions(); 2061 enableDisableActions();