diff filestatuswidget.cpp @ 287:3fbafca196e4 status_outside_tabs

Move work-folder state area outside tabs widget
author Chris Cannam
date Mon, 21 Feb 2011 11:07:21 +0000
parents bc39f2e28da8
children e4284fab6962
line wrap: on
line diff
--- a/filestatuswidget.cpp	Mon Feb 21 09:13:33 2011 +0000
+++ b/filestatuswidget.cpp	Mon Feb 21 11:07:21 2011 +0000
@@ -18,7 +18,6 @@
 #include "filestatuswidget.h"
 #include "debug.h"
 #include "multichoicedialog.h"
-#include "workstatuswidget.h"
 
 #include <QLabel>
 #include <QListWidget>
@@ -43,10 +42,6 @@
 
     int row = 0;
 
-    m_workStatus = new WorkStatusWidget(this);
-    layout->addWidget(m_workStatus, row, 0, 1, 3);
-    ++row;
-
     m_noModificationsLabel = new QLabel;
     setNoModificationsLabelText();
     layout->addWidget(m_noModificationsLabel, row, 1, 1, 2);
@@ -362,13 +357,13 @@
 QString
 FileStatusWidget::localPath() const
 {
-    return m_workStatus->localPath();
+    return m_localPath;
 }
 
 void
 FileStatusWidget::setLocalPath(QString p)
 {
-    m_workStatus->setLocalPath(p);
+    m_localPath = p;
     delete m_dateReference;
     m_dateReference = new QFileInfo(p + "/.hg/dirstate");
     if (!m_dateReference->exists() ||
@@ -383,30 +378,6 @@
     }
 }
 
-QString
-FileStatusWidget::remoteURL() const
-{
-    return m_workStatus->remoteURL();
-}
-
-void
-FileStatusWidget::setRemoteURL(QString r)
-{
-    m_workStatus->setRemoteURL(r);
-}
-
-QString
-FileStatusWidget::state() const
-{
-    return m_workStatus->state();
-}
-
-void
-FileStatusWidget::setState(QString b)
-{
-    m_workStatus->setState(b);
-}
-
 void
 FileStatusWidget::setFileStates(FileStates p)
 {
@@ -443,7 +414,7 @@
             if (s == FileStates::Unknown) {
                 // We want to highlight untracked files that have appeared
                 // since the last interaction with the repo
-                QString fn(m_workStatus->localPath() + "/" + file);
+                QString fn(m_localPath + "/" + file);
                 DEBUG << "comparing with " << fn << endl;
                 QFileInfo fi(fn);
                 if (fi.exists() && fi.created() > lastInteractionTime) {