aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-20 02:45:57 (GMT)
committerrathnor <rathnor>2003-07-20 02:45:57 (GMT)
commitace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e (patch)
tree1943fde6b3bced84b1b6634b1f36bfa877ef6f29 /src/Screen.cc
parent1631ed814cb8665516673706637084dfa1485f87 (diff)
downloadfluxbox-ace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e.zip
fluxbox-ace3e2e6293fa0ae5a2b9d971f24fa45b317ba2e.tar.bz2
fix toolbarmode = OFF bug, plus add toolbar menu back to screen's config menu
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 2e05b9c..b3ba39a 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.204 2003/07/19 03:59:55 rathnor Exp $ 25// $Id: Screen.cc,v 1.205 2003/07/20 02:45:57 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -1940,10 +1940,29 @@ bool BScreen::parseMenuFile(ifstream &file, FbTk::Menu &menu, int &row) {
1940 return ((menu.numberOfItems() == 0) ? true : false); 1940 return ((menu.numberOfItems() == 0) ? true : false);
1941} 1941}
1942 1942
1943void BScreen::addConfigMenu(const char *label, FbTk::Menu &menu) {
1944 m_configmenu_list.push_back(std::make_pair(label, &menu));
1945 setupConfigmenu(*m_configmenu.get());
1946}
1947
1948void BScreen::removeConfigMenu(FbTk::Menu &menu) {
1949 Configmenus::iterator it = m_configmenu_list.begin();
1950 Configmenus::iterator it_end = m_configmenu_list.end();
1951 for (; it != it_end; ++it) {
1952 if (it->second == &menu) {
1953 m_configmenu_list.erase(it);
1954 break;
1955 }
1956 }
1957 setupConfigmenu(*m_configmenu.get());
1958}
1959
1943void BScreen::setupConfigmenu(FbTk::Menu &menu) { 1960void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1944 I18n *i18n = I18n::instance(); 1961 I18n *i18n = I18n::instance();
1945 using namespace FBNLS; 1962 using namespace FBNLS;
1946 1963
1964 menu.removeAll();
1965
1947 FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand(); 1966 FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand();
1948 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(*Fluxbox::instance(), 1967 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(*Fluxbox::instance(),
1949 &Fluxbox::save_rc)); 1968 &Fluxbox::save_rc));
@@ -1997,6 +2016,11 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1997 } 2016 }
1998#endif // SLIT 2017#endif // SLIT
1999 2018
2019 Configmenus::iterator it = m_configmenu_list.begin();
2020 Configmenus::iterator it_end = m_configmenu_list.end();
2021 for (; it != it_end; ++it)
2022 menu.insert(it->first, it->second);
2023
2000 menu.insert(new 2024 menu.insert(new
2001 BoolMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuImageDithering, 2025 BoolMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuImageDithering,
2002 "Image Dithering"), 2026 "Image Dithering"),