all repos — fluxbox @ c033c201c4254c11804713dc427d22940da05438

custom fork of the fluxbox windowmanager

remove menu modes
Mark Tiefenbruck mark@fluxbox.org
commit

c033c201c4254c11804713dc427d22940da05438

parent

86a072e7fdbaa92744eb78ecc2e39e462477fd2e

M ChangeLogChangeLog

@@ -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)
M doc/asciidoc/fluxbox.1doc/asciidoc/fluxbox.1

@@ -1788,12 +1788,6 @@ This specifies the default window decorations, according to the same

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: <integer> This sets the delay in milliseconds for submenus to open with the previous option set to `Delay\'\&. Default: 0
M doc/asciidoc/fluxbox.txtdoc/asciidoc/fluxbox.txt

@@ -836,12 +836,6 @@ This specifies the default window decorations, according to the same

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: <integer> This sets the delay in milliseconds for submenus to open with the previous option set to `Delay'. Default: 0
M doc/fluxbox.1.indoc/fluxbox.1.in

@@ -1788,12 +1788,6 @@ This specifies the default window decorations, according to the same

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: <integer> This sets the delay in milliseconds for submenus to open with the previous option set to `Delay\'\&. Default: 0
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -994,7 +994,7 @@ }

} - if (itmp->submenu() && theme()->menuMode() == MenuTheme::DELAY_OPEN) { + if (itmp->submenu()) { // start submenu open delay timeval timeout; timeout.tv_sec = 0;
M src/FbTk/MenuTheme.ccsrc/FbTk/MenuTheme.cc

@@ -72,7 +72,6 @@ h_text_gc(RootWindow(m_display, 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),
M src/FbTk/MenuTheme.hhsrc/FbTk/MenuTheme.hh

@@ -34,11 +34,6 @@ namespace FbTk {

class MenuTheme: public Theme, public ThemeProxy<MenuTheme> { 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 @@ void setAlpha(unsigned char alpha) { m_alpha = alpha; }

// 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 @@ Display *m_display;

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)
M src/Makefile.amsrc/Makefile.am

@@ -109,7 +109,7 @@ RootTheme.hh RootTheme.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 \
M src/Screen.ccsrc/Screen.cc

@@ -308,7 +308,6 @@ menu_delay(rm, 200, scrname + ".menuDelay", altscrname+".MenuDelay"),

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 @@

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 @@

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)
M src/Screen.hhsrc/Screen.hh

@@ -547,7 +547,6 @@ FbTk::Resource<unsigned int> typing_delay;

FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, tab_width, tooltip_delay; - FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode; FbTk::Resource<bool> allow_remote_actions; FbTk::Resource<bool> clientmenu_use_pixmap; FbTk::Resource<bool> tabs_use_pixmap;
D src/ScreenResources.cc

@@ -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 <cstring> -#else - #include <string.h> -#endif - -using std::string; - -namespace FbTk { - -template <> -string FbTk::Resource<FbTk::MenuTheme::MenuMode>::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<FbTk::MenuTheme::MenuMode>::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