From c033c201c4254c11804713dc427d22940da05438 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Sat, 4 Oct 2008 19:49:28 -0700 Subject: remove menu modes --- ChangeLog | 2 ++ doc/asciidoc/fluxbox.1 | 6 ------ doc/asciidoc/fluxbox.txt | 6 ------ doc/fluxbox.1.in | 6 ------ src/FbTk/Menu.cc | 2 +- src/FbTk/MenuTheme.cc | 1 - src/FbTk/MenuTheme.hh | 8 ------- src/Makefile.am | 2 +- src/Screen.cc | 3 --- src/Screen.hh | 1 - src/ScreenResources.cc | 55 ------------------------------------------------ 11 files changed, 4 insertions(+), 88 deletions(-) delete mode 100644 src/ScreenResources.cc diff --git a/ChangeLog b/ChangeLog index feb89ac..ad55595 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.1.2 *08/10/05: + * Remove menu modes (Mark) + Screen.cc/hh ScreenResources.cc FbTk/MenuTheme.cc/hh FbTk/Menu.cc * Remove follow models (Mark) Screen.cc/hh ScreenResources.cc Window.cc * Remove line style resources from init file (Mark) diff --git a/doc/asciidoc/fluxbox.1 b/doc/asciidoc/fluxbox.1 index 372883b..9eae541 100644 --- a/doc/asciidoc/fluxbox.1 +++ b/doc/asciidoc/fluxbox.1 @@ -1788,12 +1788,6 @@ session\&.screen0\&.defaultDeco: options available to the `[Deco]\' option in the `apps\' file, described in the APPLICATIONS section\&. Default: NORMAL\&. -session\&.screen0\&.menuMode: Delay|Click - This setting controls the circumstances under which submenus open\&. With - `Click\', the user must click on the menu item in order for the submenu to - open\&. With `Delay\', submenus open when the mouse hovers over the menu - item\&. Default: Delay - session\&.screen0\&.menuDelay: This sets the delay in milliseconds for submenus to open with the previous option set to `Delay\'\&. Default: 0 diff --git a/doc/asciidoc/fluxbox.txt b/doc/asciidoc/fluxbox.txt index 9d03823..179818b 100644 --- a/doc/asciidoc/fluxbox.txt +++ b/doc/asciidoc/fluxbox.txt @@ -836,12 +836,6 @@ session.screen0.defaultDeco: options available to the `[Deco]' option in the `apps' file, described in the APPLICATIONS section. Default: NORMAL. -session.screen0.menuMode: Delay|Click - This setting controls the circumstances under which submenus open. With - `Click', the user must click on the menu item in order for the submenu to - open. With `Delay', submenus open when the mouse hovers over the menu - item. Default: Delay - session.screen0.menuDelay: This sets the delay in milliseconds for submenus to open with the previous option set to `Delay'. Default: 0 diff --git a/doc/fluxbox.1.in b/doc/fluxbox.1.in index 372883b..9eae541 100644 --- a/doc/fluxbox.1.in +++ b/doc/fluxbox.1.in @@ -1788,12 +1788,6 @@ session\&.screen0\&.defaultDeco: options available to the `[Deco]\' option in the `apps\' file, described in the APPLICATIONS section\&. Default: NORMAL\&. -session\&.screen0\&.menuMode: Delay|Click - This setting controls the circumstances under which submenus open\&. With - `Click\', the user must click on the menu item in order for the submenu to - open\&. With `Delay\', submenus open when the mouse hovers over the menu - item\&. Default: Delay - session\&.screen0\&.menuDelay: This sets the delay in milliseconds for submenus to open with the previous option set to `Delay\'\&. Default: 0 diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 7cb5599..a61bbc7 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -994,7 +994,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) { } - if (itmp->submenu() && theme()->menuMode() == MenuTheme::DELAY_OPEN) { + if (itmp->submenu()) { // start submenu open delay timeval timeout; timeout.tv_sec = 0; diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc index 12aee4d..b6e8f93 100644 --- a/src/FbTk/MenuTheme.cc +++ b/src/FbTk/MenuTheme.cc @@ -72,7 +72,6 @@ MenuTheme::MenuTheme(int screen_num): d_text_gc(RootWindow(m_display, screen_num)), hilite_gc(RootWindow(m_display, screen_num)), m_alpha(255), - m_menumode(DELAY_OPEN), m_delayopen(0), // no delay as default m_delayclose(0), // no delay as default m_real_title_height(*m_title_height), diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh index 70fc9b8..59fcbaf 100644 --- a/src/FbTk/MenuTheme.hh +++ b/src/FbTk/MenuTheme.hh @@ -34,11 +34,6 @@ namespace FbTk { class MenuTheme: public Theme, public ThemeProxy { public: - //!! TODO - // this isn't actually used with a theme item - // see setMenuMode() for more info - enum MenuMode {CLICK_OPEN, DELAY_OPEN}; - enum BulletType { EMPTY, SQUARE, TRIANGLE, DIAMOND}; MenuTheme(int screen_num); virtual ~MenuTheme(); @@ -116,8 +111,6 @@ public: // this isn't actually a theme item // but we'll let it be here for now, until there's a better way to // get resources into menu - void setMenuMode(MenuMode mode) { m_menumode = mode; } - MenuMode menuMode() const { return m_menumode; } void setDelayOpen(int msec) { m_delayopen = msec; } void setDelayClose(int msec) { m_delayclose = msec; } int delayOpen() const { return m_delayopen; } @@ -164,7 +157,6 @@ private: GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; unsigned char m_alpha; - MenuMode m_menumode; unsigned int m_delayopen; ///< in msec unsigned int m_delayclose; ///< in msec unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight) diff --git a/src/Makefile.am b/src/Makefile.am index cfc06b3..6861506 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -109,7 +109,7 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ FbRootWindow.hh FbRootWindow.cc \ OSDWindow.hh OSDWindow.cc \ TooltipWindow.hh TooltipWindow.cc \ - Screen.cc Screen.hh ScreenResources.cc \ + Screen.cc Screen.hh \ Slit.cc Slit.hh SlitTheme.hh SlitTheme.cc SlitClient.hh SlitClient.cc \ WinButton.hh WinButton.cc \ WinButtonTheme.hh WinButtonTheme.cc \ diff --git a/src/Screen.cc b/src/Screen.cc index 18138c9..07f55c4 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -308,7 +308,6 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, menu_delay_close(rm, 200, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"), tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"), - menu_mode(rm, FbTk::MenuTheme::DELAY_OPEN, scrname+".menuMode", altscrname+".MenuMode"), allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"), clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"), tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"), @@ -450,7 +449,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm, focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); m_menutheme->setAlpha(*resource.menu_alpha); - m_menutheme->setMenuMode(*resource.menu_mode); // clamp values if (*resource.menu_delay > 5000) *resource.menu_delay = 5000; @@ -910,7 +908,6 @@ void BScreen::reconfigure() { focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); m_menutheme->setAlpha(*resource.menu_alpha); - m_menutheme->setMenuMode(*resource.menu_mode); // clamp values if (*resource.menu_delay > 5000) diff --git a/src/Screen.hh b/src/Screen.hh index 9511e3f..91cf94a 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -547,7 +547,6 @@ private: FbTk::Resource workspaces, edge_snap_threshold, focused_alpha, unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, tab_width, tooltip_delay; - FbTk::Resource menu_mode; FbTk::Resource allow_remote_actions; FbTk::Resource clientmenu_use_pixmap; FbTk::Resource tabs_use_pixmap; diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc deleted file mode 100644 index 159ecaa..0000000 --- a/src/ScreenResources.cc +++ /dev/null @@ -1,55 +0,0 @@ -// ScreenResources.cc for Fluxbox Window Manager -// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -// holds screen resource handling - -#include "Screen.hh" -#ifdef HAVE_CSTRING - #include -#else - #include -#endif - -using std::string; - -namespace FbTk { - -template <> -string FbTk::Resource::getString() const { - switch (*(*this)) { - case FbTk::MenuTheme::DELAY_OPEN: - return string("Delay"); - case FbTk::MenuTheme::CLICK_OPEN: - return string("Click"); - } - return string("Delay"); -} - -template <> -void FbTk::Resource::setFromString(const char *str) { - if (strcasecmp(str, "Delay") == 0) - *(*this) = FbTk::MenuTheme::DELAY_OPEN; - else if (strcasecmp(str, "Click") == 0) - *(*this) = FbTk::MenuTheme::CLICK_OPEN; - else - setDefaultValue(); -} -} // end namespace FbTk -- cgit v0.11.2