aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
commit690d926ac444243611cd875fb84fabb4e6db2cf2 (patch)
treec8ef84056b295071f9a9207ffea5393c6cf4ad4d /util
parent1e8fe2bc14856fa16508686a28a85e72cb0e422c (diff)
downloadfluxbox_pavel-690d926ac444243611cd875fb84fabb4e6db2cf2.zip
fluxbox_pavel-690d926ac444243611cd875fb84fabb4e6db2cf2.tar.bz2
introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
Diffstat (limited to 'util')
-rw-r--r--util/fbrun/FbRun.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 3bf83aa..2843cff 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -334,11 +334,13 @@ void FbRun::nextHistoryItem() {
334 XBell(m_display, 0); 334 XBell(m_display, 0);
335 } else { 335 } else {
336 m_current_history_item++; 336 m_current_history_item++;
337 FbTk::BiDiString text("");
337 if (m_current_history_item == m_history.size()) { 338 if (m_current_history_item == m_history.size()) {
338 m_current_history_item = m_history.size(); 339 m_current_history_item = m_history.size();
339 setText(""); 340 } else
340 } else 341 text.setLogical((m_history[m_current_history_item]));
341 setText(m_history[m_current_history_item]); 342
343 setText(text);
342 } 344 }
343} 345}
344 346
@@ -347,7 +349,7 @@ void FbRun::firstHistoryItem() {
347 XBell(m_display, 0); 349 XBell(m_display, 0);
348 } else { 350 } else {
349 m_current_history_item = 0; 351 m_current_history_item = 0;
350 setText(m_history[m_current_history_item]); 352 setText(FbTk::BiDiString(m_history[m_current_history_item]));
351 } 353 }
352} 354}
353 355
@@ -357,7 +359,7 @@ void FbRun::lastHistoryItem() {
357 XBell(m_display, 0); 359 XBell(m_display, 0);
358 } else { 360 } else {
359 m_current_history_item = m_history.size(); 361 m_current_history_item = m_history.size();
360 setText(""); 362 setText(FbTk::BiDiString(""));
361 } 363 }
362} 364}
363 365
@@ -373,7 +375,7 @@ void FbRun::tabCompleteHistory() {
373 while (history_item != m_current_history_item && nr++ < m_history.size()) { 375 while (history_item != m_current_history_item && nr++ < m_history.size()) {
374 if (m_history[history_item].find(m_last_completion_prefix) == 0) { 376 if (m_history[history_item].find(m_last_completion_prefix) == 0) {
375 m_current_history_item = history_item; 377 m_current_history_item = history_item;
376 setText(m_history[m_current_history_item]); 378 setText(FbTk::BiDiString(m_history[m_current_history_item]));
377 cursorEnd(); 379 cursorEnd();
378 break; 380 break;
379 } 381 }