diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-09-08 18:17:21 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-09-08 18:17:21 (GMT) |
commit | 690d926ac444243611cd875fb84fabb4e6db2cf2 (patch) | |
tree | c8ef84056b295071f9a9207ffea5393c6cf4ad4d /src/WorkspaceMenu.cc | |
parent | 1e8fe2bc14856fa16508686a28a85e72cb0e422c (diff) | |
download | fluxbox-690d926ac444243611cd875fb84fabb4e6db2cf2.zip fluxbox-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 'src/WorkspaceMenu.cc')
-rw-r--r-- | src/WorkspaceMenu.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/WorkspaceMenu.cc b/src/WorkspaceMenu.cc index f03dd3c..a8a6399 100644 --- a/src/WorkspaceMenu.cc +++ b/src/WorkspaceMenu.cc | |||
@@ -72,9 +72,7 @@ void WorkspaceMenu::workspaceInfoChanged( BScreen& screen ) { | |||
72 | ++workspace) { | 72 | ++workspace) { |
73 | Workspace *wkspc = screen.getWorkspace(workspace); | 73 | Workspace *wkspc = screen.getWorkspace(workspace); |
74 | wkspc->menu().setInternalMenu(); | 74 | wkspc->menu().setInternalMenu(); |
75 | FbTk::MultiButtonMenuItem* mb_menu = new FbTk::MultiButtonMenuItem(5, | 75 | FbTk::MultiButtonMenuItem* mb_menu = new FbTk::MultiButtonMenuItem(5, FbTk::BiDiString(wkspc->name()), &wkspc->menu()); |
76 | wkspc->name().c_str(), | ||
77 | &wkspc->menu()); | ||
78 | FbTk::RefCount<FbTk::Command<void> > jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID())); | 76 | FbTk::RefCount<FbTk::Command<void> > jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID())); |
79 | mb_menu->setCommand(3, jump_cmd); | 77 | mb_menu->setCommand(3, jump_cmd); |
80 | insert(mb_menu, workspace + IDX_AFTER_ICONS); | 78 | insert(mb_menu, workspace + IDX_AFTER_ICONS); |
@@ -119,9 +117,7 @@ void WorkspaceMenu::init(BScreen &screen) { | |||
119 | for (size_t workspace = 0; workspace < screen.numberOfWorkspaces(); ++workspace) { | 117 | for (size_t workspace = 0; workspace < screen.numberOfWorkspaces(); ++workspace) { |
120 | Workspace *wkspc = screen.getWorkspace(workspace); | 118 | Workspace *wkspc = screen.getWorkspace(workspace); |
121 | wkspc->menu().setInternalMenu(); | 119 | wkspc->menu().setInternalMenu(); |
122 | FbTk::MultiButtonMenuItem* mb_menu = new FbTk::MultiButtonMenuItem(5, | 120 | FbTk::MultiButtonMenuItem* mb_menu = new FbTk::MultiButtonMenuItem(5, FbTk::BiDiString(wkspc->name()), &wkspc->menu()); |
123 | wkspc->name().c_str(), | ||
124 | &wkspc->menu()); | ||
125 | FbTk::RefCount<FbTk::Command<void> > jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID())); | 121 | FbTk::RefCount<FbTk::Command<void> > jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID())); |
126 | mb_menu->setCommand(3, jump_cmd); | 122 | mb_menu->setCommand(3, jump_cmd); |
127 | insert(mb_menu, workspace + IDX_AFTER_ICONS); | 123 | insert(mb_menu, workspace + IDX_AFTER_ICONS); |