# HG changeset patch # User Sam Izzo # Date 1345995926 -36000 # Node ID 58ac1b19766642cc94cc7418d51976b217a8f69d # Parent db62a0cb303791f026f696bacfbb5fe26a0f56f3 * Added setting to show history automatically when it changes (defaults to true) diff -r db62a0cb3037 -r 58ac1b197666 src/hgtabwidget.cpp --- a/src/hgtabwidget.cpp Mon Aug 27 01:26:57 2012 +1000 +++ b/src/hgtabwidget.cpp Mon Aug 27 01:45:26 2012 +1000 @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -281,7 +282,11 @@ { m_historyWidget->parseIncrementalLog(hgLogList); if (m_historyWidget->haveNewItems()) { - showHistoryTab(); + QSettings settings; + settings.beginGroup("Presentation"); + if (settings.value("showHistoryAutomatically", true).toBool()) { + showHistoryTab(); + } } } diff -r db62a0cb3037 -r 58ac1b197666 src/settingsdialog.cpp --- a/src/settingsdialog.cpp Mon Aug 27 01:26:57 2012 +1000 +++ b/src/settingsdialog.cpp Mon Aug 27 01:45:26 2012 +1000 @@ -87,6 +87,9 @@ m_showExtraText = new QCheckBox(tr("Show long descriptions for file status headings")); lookLayout->addWidget(m_showExtraText, row++, 0, 1, 2); + m_showHistoryAutomatically = new QCheckBox(tr("Switch to history tab automatically when history changes")); + lookLayout->addWidget(m_showHistoryAutomatically, row++, 0, 1, 2); + #ifdef NOT_IMPLEMENTED_YET lookLayout->addWidget(new QLabel(tr("Place the work and history views")), row, 0); m_workHistoryArrangement = new QComboBox(); @@ -417,6 +420,7 @@ settings.beginGroup("Presentation"); settings.remove("showiconlabels"); settings.remove("showhelpfultext"); + settings.remove("showHistoryAutomatically"); settings.remove("dateformat"); settings.endGroup(); settings.beginGroup("Locations"); @@ -444,6 +448,7 @@ settings.beginGroup("Presentation"); m_showIconLabels->setChecked(settings.value("showiconlabels", true).toBool()); m_showExtraText->setChecked(settings.value("showhelpfultext", true).toBool()); + m_showHistoryAutomatically->setChecked(settings.value("showHistoryAutomatically", true).toBool()); #ifdef NOT_IMPLEMENTED_YET m_workHistoryArrangement->setCurrentIndex(settings.value("workhistoryarrangement", 0).toInt()); #endif @@ -485,6 +490,7 @@ settings.setValue("showhelpfultext", b); m_presentationChanged = true; } + settings.setValue("showHistoryAutomatically", m_showHistoryAutomatically->isChecked()); int i; #ifdef NOT_IMPLEMENTED_YET i = m_workHistoryArrangement->currentIndex(); diff -r db62a0cb3037 -r 58ac1b197666 src/settingsdialog.h --- a/src/settingsdialog.h Mon Aug 27 01:26:57 2012 +1000 +++ b/src/settingsdialog.h Mon Aug 27 01:45:26 2012 +1000 @@ -72,11 +72,15 @@ QLineEdit *m_mergePathLabel; QLineEdit *m_sshPathLabel; + QPushButton *m_extensionBrowse; + + QCheckBox *m_multipleDiffInstances; QCheckBox *m_useExtension; QLineEdit *m_extensionPathLabel; QCheckBox *m_showIconLabels; QCheckBox *m_showExtraText; + QCheckBox *m_showHistoryAutomatically; QComboBox *m_dateFormat; QDateEdit *m_dateFrom; @@ -85,9 +89,6 @@ QComboBox *m_workHistoryArrangement; #endif - QCheckBox *m_multipleDiffInstances; - - QPushButton *m_extensionBrowse; QPushButton *m_ok; bool m_presentationChanged;