]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabpage.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / dolphintabpage.cpp
index dbc1ff147ebb4baf81a2bb21a6a2256122b202d0..dbc55e7d62cdd2272594cb2e739c0e7c66562da7 100644 (file)
@@ -275,6 +275,10 @@ QByteArray DolphinTabPage::saveState() const
     stream << m_primaryViewActive;
     stream << m_splitter->saveState();
 
+    if (!m_customLabel.isEmpty()) {
+        stream << m_customLabel;
+    }
+
     return state;
 }
 
@@ -328,6 +332,12 @@ void DolphinTabPage::restoreState(const QByteArray &state)
     QByteArray splitterState;
     stream >> splitterState;
     m_splitter->restoreState(splitterState);
+
+    if (!stream.atEnd()) {
+        QString tabTitle;
+        stream >> tabTitle;
+        setCustomLabel(tabTitle);
+    }
 }
 
 void DolphinTabPage::setActive(bool active)
@@ -342,6 +352,16 @@ void DolphinTabPage::setActive(bool active)
     activeViewContainer()->setActive(active);
 }
 
+void DolphinTabPage::setCustomLabel(const QString &label)
+{
+    m_customLabel = label;
+}
+
+QString DolphinTabPage::customLabel() const
+{
+    return m_customLabel;
+}
+
 void DolphinTabPage::slotAnimationFinished()
 {
     for (int i = 0; i < m_splitter->count(); ++i) {