diff hgtabwidget.cpp @ 153:70fe12873106

* Show both parents of uncommitted merge; fixes to right-button menus
author Chris Cannam
date Thu, 02 Dec 2010 17:55:21 +0000
parents 2b997861174b
children 6bcb4a4d6521
line wrap: on
line diff
--- a/hgtabwidget.cpp	Thu Dec 02 11:51:15 2010 +0000
+++ b/hgtabwidget.cpp	Thu Dec 02 17:55:21 2010 +0000
@@ -52,6 +52,9 @@
     connect(m_historyWidget, SIGNAL(diffWorkingFolder()),
             this, SIGNAL(diffWorkingFolder()));
 
+    connect(m_historyWidget, SIGNAL(showWork()),
+            this, SLOT(showWorkTab()));
+
     connect(m_historyWidget, SIGNAL(updateTo(QString)),
             this, SIGNAL(updateTo(QString)));
 
@@ -73,9 +76,9 @@
     m_fileStatusWidget->clearSelections();
 }
 
-void HgTabWidget::setCurrent(QStringList ids)
+void HgTabWidget::setCurrent(QStringList ids, QString branch)
 {
-    m_historyWidget->setCurrent(ids, canCommit());
+    m_historyWidget->setCurrent(ids, branch, canCommit());
 }
 
 bool HgTabWidget::canCommit() const
@@ -160,7 +163,7 @@
 {
     m_historyWidget->parseNewLog(hgLogList);
     if (m_historyWidget->haveNewItems()) {
-        setCurrentWidget(m_historyWidget);
+        showHistoryTab();
     }
 }
 
@@ -168,7 +171,7 @@
 {
     m_historyWidget->parseIncrementalLog(hgLogList);
     if (m_historyWidget->haveNewItems()) {
-        setCurrentWidget(m_historyWidget);
+        showHistoryTab();
     }
 }
 
@@ -182,3 +185,14 @@
 {
     m_fileStatusWidget->setState(state);
 }
+
+void HgTabWidget::showWorkTab()
+{
+    setCurrentWidget(m_fileStatusWidget);
+}
+
+void HgTabWidget::showHistoryTab()
+{
+    setCurrentWidget(m_historyWidget);
+}
+