remove menu modes

This commit is contained in:
Mark Tiefenbruck 2008-10-04 19:49:28 -07:00
parent 86a072e7fd
commit c033c201c4
11 changed files with 4 additions and 88 deletions

View file

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

View file

@ -1788,12 +1788,6 @@ session\&.screen0\&.defaultDeco: <string>
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

View file

@ -836,12 +836,6 @@ session.screen0.defaultDeco: <string>
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

View file

@ -1788,12 +1788,6 @@ session\&.screen0\&.defaultDeco: <string>
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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -547,7 +547,6 @@ private:
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;

View file

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