[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [konsole] src: Correct handling %u when changing tab title via Rename Tab dialog
From: Kurt Hindenburg <kurt.hindenburg () gmail ! com>
Date: 2016-11-09 0:06:39
Message-ID: E1c4GPX-0002na-5T () code ! kde ! org
[Download RAW message or body]
Git commit a5ca90345378262825b2450ff89db7addcf89309 by Kurt Hindenburg.
Committed on 09/11/2016 at 00:04.
Pushed by hindenburg into branch 'master'.
Correct handling %u when changing tab title via Rename Tab dialog
Recent code changed how %u is handled (only when %u is required, poll
/proc filesystem). This correct an issue when %u is added/removed from
the Rename Tab dialog.
M +2 -1 src/ProcessInfo.h
M +5 -2 src/Session.cpp
http://commits.kde.org/konsole/a5ca90345378262825b2450ff89db7addcf89309
diff --git a/src/ProcessInfo.h b/src/ProcessInfo.h
index b28a364..4c04758 100644
--- a/src/ProcessInfo.h
+++ b/src/ProcessInfo.h
@@ -189,6 +189,8 @@ public:
// space-constrained UI elements (eg. tabs)
QString formatShortDir(const QString& dirPath) const;
+ void setUserNameRequired(bool need);
+
protected:
/**
* Constructs a new process instance. You should not call the constructor
@@ -259,7 +261,6 @@ protected:
*/
void clearArguments();
- void setUserNameRequired(bool need);
bool userNameRequired() const;
private:
diff --git a/src/Session.cpp b/src/Session.cpp
index 302bddc..4ecec95 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -574,10 +574,13 @@ QString Session::userTitle() const
}
void Session::setTabTitleFormat(TabTitleContext context , const QString& format)
{
- if (context == LocalTabTitle)
+ if (context == LocalTabTitle) {
_localTabTitleFormat = format;
- else if (context == RemoteTabTitle)
+ ProcessInfo* process = getProcessInfo();
+ process->setUserNameRequired(format.contains(QLatin1String("%u")));
+ } else if (context == RemoteTabTitle) {
_remoteTabTitleFormat = format;
+ }
}
QString Session::tabTitleFormat(TabTitleContext context) const
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic