aboutsummaryrefslogtreecommitdiff
path: root/src/AlphaMenu.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/AlphaMenu.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/AlphaMenu.cc')
-rw-r--r--src/AlphaMenu.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/AlphaMenu.cc b/src/AlphaMenu.cc
index 219d6ea..032e5b3 100644
--- a/src/AlphaMenu.cc
+++ b/src/AlphaMenu.cc
@@ -53,7 +53,7 @@ AlphaMenu::AlphaMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
53 53
54 m_focused_alpha_item = 54 m_focused_alpha_item =
55 new FbTk::IntMenuItem(focused_alpha_label, m_focused_alpha, 0, 255, *this); 55 new FbTk::IntMenuItem(focused_alpha_label, m_focused_alpha, 0, 255, *this);
56 insert(m_focused_alpha_item); 56 insertItem(m_focused_alpha_item);
57 57
58 const FbTk::FbString unfocused_alpha_label = 58 const FbTk::FbString unfocused_alpha_label =
59 _FB_XTEXT(Configmenu, UnfocusedAlpha, 59 _FB_XTEXT(Configmenu, UnfocusedAlpha,
@@ -62,14 +62,14 @@ AlphaMenu::AlphaMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
62 62
63 m_unfocused_alpha_item = 63 m_unfocused_alpha_item =
64 new FbTk::IntMenuItem(unfocused_alpha_label, m_unfocused_alpha, 0, 255, *this); 64 new FbTk::IntMenuItem(unfocused_alpha_label, m_unfocused_alpha, 0, 255, *this);
65 insert(m_unfocused_alpha_item); 65 insertItem(m_unfocused_alpha_item);
66 66
67 const FbTk::FbString usedefault_label = _FB_XTEXT(Windowmenu, DefaultAlpha, 67 const FbTk::FbString usedefault_label = _FB_XTEXT(Windowmenu, DefaultAlpha,
68 "Use Defaults", 68 "Use Defaults",
69 "Default transparency settings for this window"); 69 "Default transparency settings for this window");
70 FbTk::MenuItem *usedefault_item = 70 FbTk::MenuItem *usedefault_item =
71 new AlphaMenuSelectItem(usedefault_label, *this); 71 new AlphaMenuSelectItem(usedefault_label, *this);
72 insert(usedefault_item); 72 insertItem(usedefault_item);
73 73
74 updateMenu(); 74 updateMenu();
75} 75}