Commit be809352 authored by Eike Hein's avatar Eike Hein
Browse files

* Fix a regression that caused the "Show title bar contents in tab labels"

  preference to no longer work.
BUG:162384 
* Fix tab label not immediately being updated upon creating a new session
  when "Show title bar contents in tab labels" is enabled.


svn path=/trunk/extragear/utils/yakuake/; revision=810716
parent 46636fc6
......@@ -7,6 +7,10 @@ Changes since 2.9.2:
is already running, so that existing terminals won't be lost.
* Added an option to explicitly control whether the window will be shown on
all (virtual) desktops. Defaults to true, as before.
* Fixed a regression that caused the "Show title bar contents in tab labels"
preference to no longer work.
* Fixed tab label not immediately being updated upon creating a new session
when "Show title bar contents in tab labels" is enabled.
Changes in 2.9.2:
......
......@@ -75,10 +75,12 @@ MainWindow::MainWindow(QWidget* parent)
connect(m_tabBar, SIGNAL(tabSelected(int)), m_sessionStack, SLOT(raiseSession(int)));
connect(m_tabBar, SIGNAL(tabClosed(int)), m_sessionStack, SLOT(removeSession(int)));
connect(m_sessionStack, SIGNAL(sessionAdded(int)), m_tabBar, SLOT(addTab(int)));
connect(m_sessionStack, SIGNAL(sessionAdded(int, const QString&)),
m_tabBar, SLOT(addTab(int, const QString&)));
connect(m_sessionStack, SIGNAL(sessionRaised(int)), m_tabBar, SLOT(selectTab(int)));
connect(m_sessionStack, SIGNAL(sessionRemoved(int)), m_tabBar, SLOT(removeTab(int)));
connect(m_sessionStack, SIGNAL(activeTitleChanged(const QString&)), m_titleBar, SLOT(setTitle(const QString&)));
connect(m_sessionStack, SIGNAL(activeTitleChanged(const QString&)),
m_titleBar, SLOT(setTitle(const QString&)));
connect(&m_mousePoller, SIGNAL(timeout()), this, SLOT(pollMouse()));
......
......@@ -20,6 +20,7 @@
#include "sessionstack.h"
#include "settings.h"
#include <QtDBus/QtDBus>
......@@ -39,12 +40,17 @@ void SessionStack::addSession(Session::SessionType type)
{
Session* session = new Session(type, this);
connect(session, SIGNAL(destroyed(int)), this, SLOT(cleanup(int)));
connect(session, SIGNAL(titleChanged(int, const QString&)),
this, SIGNAL(titleChanged(int, const QString&)));
addWidget(session->widget());
m_sessions.insert(session->id(), session);
emit sessionAdded(session->id());
if (Settings::dynamicTabTitles())
emit sessionAdded(session->id(), session->title());
else
emit sessionAdded(session->id());
}
void SessionStack::addSessionTwoHorizontal()
......@@ -91,6 +97,7 @@ void SessionStack::raiseSession(int sessionId)
this, SIGNAL(activeTitleChanged(const QString&)));
emit sessionRaised(sessionId);
emit activeTitleChanged(m_sessions[sessionId]->title());
}
......
......@@ -72,7 +72,7 @@ class SessionStack : public QStackedWidget
signals:
void sessionAdded(int sessionId);
void sessionAdded(int sessionId, const QString& title = 0);
void sessionRaised(int sessionId);
void sessionRemoved(int sessionId);
......
......@@ -372,10 +372,14 @@ void TabBar::leaveEvent(QEvent* event)
QWidget::leaveEvent(event);
}
void TabBar::addTab(int sessionId)
void TabBar::addTab(int sessionId, const QString& title)
{
m_tabs.append(sessionId);
m_tabTitles.insert(sessionId, standardTabTitle());
if (title.isEmpty())
m_tabTitles.insert(sessionId, standardTabTitle());
else
m_tabTitles.insert(sessionId, title);
emit tabSelected(sessionId);
}
......
......@@ -52,7 +52,7 @@ class TabBar : public QWidget
public slots:
void addTab(int sessionId);
void addTab(int sessionId, const QString& title = 0);
void removeTab(int sessionId = -1);
void renameTab(int sessionId = -1, const QString& newTitle = 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment