mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-22 04:49:02 +00:00
Use window title from session. Fixes #167
This commit is contained in:
parent
08ade0eb6f
commit
4b5827cb3e
@ -33,6 +33,8 @@ Item{
|
|||||||
property real dright: frame.item.displacementRight
|
property real dright: frame.item.displacementRight
|
||||||
property real dbottom: frame.item.displacementBottom
|
property real dbottom: frame.item.displacementBottom
|
||||||
|
|
||||||
|
property alias title: ksession.title
|
||||||
|
|
||||||
anchors.leftMargin: dleft
|
anchors.leftMargin: dleft
|
||||||
anchors.rightMargin: dright
|
anchors.rightMargin: dright
|
||||||
anchors.topMargin: dtop
|
anchors.topMargin: dtop
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
|
property alias title: terminal.title
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
id: scalableContent
|
id: scalableContent
|
||||||
width: parent.width * shadersettings.window_scaling
|
width: parent.width * shadersettings.window_scaling
|
||||||
|
@ -42,7 +42,7 @@ ApplicationWindow{
|
|||||||
: shadersettings.showMenubar ? defaultMenuBar : null
|
: shadersettings.showMenubar ? defaultMenuBar : null
|
||||||
|
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
title: qsTr("cool-retro-term")
|
title: terminalContainer.title || qsTr("cool-retro-term")
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: showMenubarAction
|
id: showMenubarAction
|
||||||
@ -113,6 +113,7 @@ ApplicationWindow{
|
|||||||
enableTimer: terminalWindow.visible
|
enableTimer: terminalWindow.visible
|
||||||
}
|
}
|
||||||
TerminalContainer{
|
TerminalContainer{
|
||||||
|
id: terminalContainer
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
SettingsWindow{
|
SettingsWindow{
|
||||||
|
@ -35,6 +35,7 @@ KSession::KSession(QObject *parent) :
|
|||||||
QObject(parent), m_session(createSession("KSession"))
|
QObject(parent), m_session(createSession("KSession"))
|
||||||
{
|
{
|
||||||
connect(m_session, SIGNAL(finished()), this, SLOT(sessionFinished()));
|
connect(m_session, SIGNAL(finished()), this, SLOT(sessionFinished()));
|
||||||
|
connect(m_session, SIGNAL(titleChanged()), this, SIGNAL(titleChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
KSession::~KSession()
|
KSession::~KSession()
|
||||||
@ -238,4 +239,7 @@ QString KSession::keyBindings()
|
|||||||
return m_session->keyBindings();
|
return m_session->keyBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString KSession::getTitle()
|
||||||
|
{
|
||||||
|
return m_session->userTitle();
|
||||||
|
}
|
||||||
|
@ -35,6 +35,7 @@ class KSession : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString kbScheme READ getKeyBindings WRITE setKeyBindings NOTIFY changedKeyBindings)
|
Q_PROPERTY(QString kbScheme READ getKeyBindings WRITE setKeyBindings NOTIFY changedKeyBindings)
|
||||||
Q_PROPERTY(QString initialWorkingDirectory READ getInitialWorkingDirectory WRITE setInitialWorkingDirectory)
|
Q_PROPERTY(QString initialWorkingDirectory READ getInitialWorkingDirectory WRITE setInitialWorkingDirectory)
|
||||||
|
Q_PROPERTY(QString title READ getTitle NOTIFY titleChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KSession(QObject *parent = 0);
|
KSession(QObject *parent = 0);
|
||||||
@ -84,6 +85,8 @@ public:
|
|||||||
//! Return current key bindings
|
//! Return current key bindings
|
||||||
QString keyBindings();
|
QString keyBindings();
|
||||||
|
|
||||||
|
QString getTitle();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void finished();
|
void finished();
|
||||||
void copyAvailable(bool);
|
void copyAvailable(bool);
|
||||||
@ -95,6 +98,7 @@ signals:
|
|||||||
|
|
||||||
void changedKeyBindings(QString kb);
|
void changedKeyBindings(QString kb);
|
||||||
|
|
||||||
|
void titleChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/*! Set named key binding for given widget
|
/*! Set named key binding for given widget
|
||||||
|
Loading…
x
Reference in New Issue
Block a user