[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] kate/app: Improve statusbar performance
From: Christian Loose <christian.loose () hamburg ! de>
Date: 2011-09-14 17:21:09
Message-ID: 20110914172109.0163CA607A () git ! kde ! org
[Download RAW message or body]
Git commit 4f851cf69381dd866399ae31557c8b544daed4e7 by Christian Loose.
Committed on 13/09/2011 at 20:32.
Pushed by cloose into branch 'master'.
Improve statusbar performance
Only update total characters label in the statusbar when it's visible.
M +11 -3 kate/app/kateviewspace.cpp
http://commits.kde.org/kate/4f851cf69381dd866399ae31557c8b544daed4e7
diff --git a/kate/app/kateviewspace.cpp b/kate/app/kateviewspace.cpp
index 1644634..03dcef2 100644
--- a/kate/app/kateviewspace.cpp
+++ b/kate/app/kateviewspace.cpp
@@ -388,9 +388,12 @@ void KateVSStatusBar::cursorPositionChanged ( KTextEditor::View \
*view ) m_lineColLabel->setText(
i18n(" Line: %1 Col: %2 ", KGlobal::locale()->formatNumber(position.line() + 1, \
0), KGlobal::locale()->formatNumber(position.column() + 1, 0)) );
-
- m_charsLabel->setText(
- i18n(" Characters: %1 ", \
KGlobal::locale()->formatNumber(view->document()->totalCharacters(), 0))); +
+ if (!m_charsLabel->isHidden())
+ {
+ m_charsLabel->setText(
+ i18n(" Characters: %1 ", \
KGlobal::locale()->formatNumber(view->document()->totalCharacters(), 0))); + }
}
void KateVSStatusBar::selectionChanged (KTextEditor::View *view)
@@ -461,6 +464,11 @@ void KateVSStatusBar::cursorPositionItemVisibilityChanged(bool \
visible) void KateVSStatusBar::charactersCountItemVisibilityChanged(bool visible)
{
m_charsLabel->setVisible(visible);
+
+ if (visible)
+ {
+ updateStatus();
+ }
}
void KateVSStatusBar::insertModeItemVisibilityChanged(bool visible)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic