diff options
Diffstat (limited to 'src/AlphaMenu.cc')
-rw-r--r-- | src/AlphaMenu.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/AlphaMenu.cc b/src/AlphaMenu.cc index 8985fc7..8cd225a 100644 --- a/src/AlphaMenu.cc +++ b/src/AlphaMenu.cc | |||
@@ -47,13 +47,6 @@ AlphaMenu::AlphaMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | |||
47 | 47 | ||
48 | // build menu... | 48 | // build menu... |
49 | 49 | ||
50 | const FbTk::FbString usedefault_label = _FB_XTEXT(Windowmenu, DefaultAlpha, | ||
51 | "Use Defaults", | ||
52 | "Default transparency settings for this window"); | ||
53 | FbTk::MenuItem *usedefault_item = | ||
54 | new AlphaMenuSelectItem(usedefault_label, &object, *this); | ||
55 | insert(usedefault_item); | ||
56 | |||
57 | const FbTk::FbString focused_alpha_label = | 50 | const FbTk::FbString focused_alpha_label = |
58 | _FB_XTEXT(Configmenu, FocusedAlpha, | 51 | _FB_XTEXT(Configmenu, FocusedAlpha, |
59 | "Focused Window Alpha", | 52 | "Focused Window Alpha", |
@@ -72,6 +65,13 @@ AlphaMenu::AlphaMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | |||
72 | new IntResMenuItem< ObjectResource<AlphaObject, int> >(unfocused_alpha_label, m_unfocused_alpha_resource, 0, 255, *this); | 65 | new IntResMenuItem< ObjectResource<AlphaObject, int> >(unfocused_alpha_label, m_unfocused_alpha_resource, 0, 255, *this); |
73 | insert(unfocused_alpha_item); | 66 | insert(unfocused_alpha_item); |
74 | 67 | ||
68 | const FbTk::FbString usedefault_label = _FB_XTEXT(Windowmenu, DefaultAlpha, | ||
69 | "Use Defaults", | ||
70 | "Default transparency settings for this window"); | ||
71 | FbTk::MenuItem *usedefault_item = | ||
72 | new AlphaMenuSelectItem(usedefault_label, &object, *this); | ||
73 | insert(usedefault_item); | ||
74 | |||
75 | updateMenu(); | 75 | updateMenu(); |
76 | } | 76 | } |
77 | 77 | ||
@@ -80,18 +80,18 @@ void AlphaMenu::move(int x, int y) { | |||
80 | FbTk::Menu::move(x, y); | 80 | FbTk::Menu::move(x, y); |
81 | 81 | ||
82 | if (isVisible()) { | 82 | if (isVisible()) { |
83 | ((AlphaMenuSelectItem *)find(0))->updateLabel(); | 83 | // TODO: hardcoding the indices is a bad idea |
84 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(0))->updateLabel(); | ||
84 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(1))->updateLabel(); | 85 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(1))->updateLabel(); |
85 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(2))->updateLabel(); | ||
86 | frameWindow().updateBackground(false); | 86 | frameWindow().updateBackground(false); |
87 | FbTk::Menu::clearWindow(); | 87 | FbTk::Menu::clearWindow(); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | void AlphaMenu::show() { | 91 | void AlphaMenu::show() { |
92 | ((AlphaMenuSelectItem *)find(0))->updateLabel(); | 92 | // TODO: hardcoding the indices is a bad idea |
93 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(0))->updateLabel(); | ||
93 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(1))->updateLabel(); | 94 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(1))->updateLabel(); |
94 | ((IntResMenuItem< ObjectResource<AlphaObject, int> >*)find(2))->updateLabel(); | ||
95 | frameWindow().updateBackground(false); | 95 | frameWindow().updateBackground(false); |
96 | FbTk::Menu::clearWindow(); | 96 | FbTk::Menu::clearWindow(); |
97 | 97 | ||