aboutsummaryrefslogtreecommitdiff
path: root/src/ClientMenu.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-15 13:24:46 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-01-15 13:25:05 (GMT)
commit8387742c8860694777f7c2c62da0a90c9e836988 (patch)
treee5bd5a50c3e033ea73a9339474750287d06aeb3f /src/ClientMenu.cc
parentb4cd45549013e8b45f95bf3e123cd14684948e91 (diff)
downloadfluxbox-8387742c8860694777f7c2c62da0a90c9e836988.zip
fluxbox-8387742c8860694777f7c2c62da0a90c9e836988.tar.bz2
Refactor menu code: be more explicit and compact
This commit is a preparation step for some menu cleanup ahead. To make it easier to understand which types of MenuItems are added where and when, I converted the overloaded FbTk::Menu::insert() functions into explicit ones (Menu::insertSubmenu(), Menu::insertItem(), etc. ). This makes it possible to just grep for 'insertSubmenu()'. Side effect this commit: it trims down the very verbose creation of menu items in regards to how the labels are created. Minor: FbTk::Menu::shown and FbTk::Menu::s_focused are moved out of the class.
Diffstat (limited to 'src/ClientMenu.cc')
-rw-r--r--src/ClientMenu.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ClientMenu.cc b/src/ClientMenu.cc
index 96527ec..84f2025 100644
--- a/src/ClientMenu.cc
+++ b/src/ClientMenu.cc
@@ -118,9 +118,9 @@ void ClientMenu::refreshMenu() {
118 FluxboxWindow::ClientList::iterator client_it_end = 118 FluxboxWindow::ClientList::iterator client_it_end =
119 win->clientList().end(); 119 win->clientList().end();
120 for (; client_it != client_it_end; ++client_it) 120 for (; client_it != client_it_end; ++client_it)
121 insert(new ClientMenuItem(**client_it, *this)); 121 insertItem(new ClientMenuItem(**client_it, *this));
122 } else 122 } else
123 insert(new ClientMenuItem(**win_it, *this)); 123 insertItem(new ClientMenuItem(**win_it, *this));
124 } 124 }
125 125
126 updateMenu(); 126 updateMenu();