merge menuDelay and menuDelayClose options
This commit is contained in:
parent
e5fd401f4e
commit
5b07791ed4
9 changed files with 22 additions and 96 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.1.2
|
||||
*08/10/13:
|
||||
* Merge menuDelay and menuDelayClose options in init (Mark)
|
||||
Screen.cc/hh FbTk/MenuTheme.cc/hh FbTk/Menu.cc
|
||||
*08/10/07:
|
||||
* Allow relative paths for background images in style files (Mark)
|
||||
RootTheme.cc FbTk/Image.cc/hh
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
.\" Title: fluxbox
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
|
||||
.\" Date: 10/04/2008
|
||||
.\" Date: 10/12/2008
|
||||
.\" Manual: [FIXME: manual]
|
||||
.\" Source: [FIXME: source]
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "FLUXBOX" "1" "10/04/2008" "[FIXME: source]" "[FIXME: manual]"
|
||||
.TH "FLUXBOX" "1" "10/12/2008" "[FIXME: source]" "[FIXME: manual]"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * (re)Define some macros
|
||||
.\" -----------------------------------------------------------------
|
||||
|
@ -845,26 +845,6 @@ Button 3 (Un)Maximize window horizontally\&.
|
|||
.SS "Workspace Menu"
|
||||
.sp
|
||||
The workspace menu can be found by middle clicking on the background\&. A menu will popup giving you the option to add or remove a workspace\&. You will also see your workspaces listed there; middle clicking on a workspace name will take you to that workspace, whereas clicking on a window name in one of the per\-workspace submenus will take you to the workspace that window is on, and select the window\&. Last but not least you will notice the Icons menu\&. This is for applications which have been `iconified\'\&.
|
||||
.SS "Menu Behavior"
|
||||
.sp
|
||||
The behavior of the submenus in a menu can be configured in the `init\' file, with the following entries (default for both is 0):
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.fam C
|
||||
.ps -1
|
||||
.nf
|
||||
.BB lightgray
|
||||
session\&.screen0\&.menuDelay: <msec>
|
||||
session\&.screen0\&.menuDelayClose: <msec>
|
||||
.EB lightgray
|
||||
.fi
|
||||
.fam
|
||||
.ps +1
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SS "Menu Syntax"
|
||||
.sp
|
||||
There are up to four fields in a menu line\&. They are of the form:
|
||||
|
@ -1789,12 +1769,8 @@ session\&.screen0\&.defaultDeco: <string>
|
|||
the APPLICATIONS section\&. Default: NORMAL\&.
|
||||
|
||||
session\&.screen0\&.menuDelay: <integer>
|
||||
This sets the delay in milliseconds for submenus to open with the previous
|
||||
option set to `Delay\'\&. Default: 0
|
||||
|
||||
session\&.screen0\&.menuDelayClose: 0
|
||||
This value sets the delay in milliseconds that you would like the menu to
|
||||
remain visible after you\'ve clicked out of it\&. Default: 0
|
||||
This sets the delay in milliseconds for submenus to open when you hover
|
||||
over them or to close when you hover over another item\&. Default: 200
|
||||
|
||||
session\&.screen0\&.focusNewWindows: <boolean>
|
||||
This sets whether or not new windows will become focused automatically\&.
|
||||
|
|
|
@ -367,14 +367,6 @@ workspace that window is on, and select the window. Last but not least
|
|||
you will notice the Icons menu. This is for applications which have
|
||||
been `iconified'.
|
||||
|
||||
Menu Behavior
|
||||
~~~~~~~~~~~~~
|
||||
The behavior of the submenus in a menu can be configured in the `init'
|
||||
file, with the following entries (default for both is 0):
|
||||
|
||||
session.screen0.menuDelay: <msec>
|
||||
session.screen0.menuDelayClose: <msec>
|
||||
|
||||
Menu Syntax
|
||||
~~~~~~~~~~~
|
||||
There are up to four fields in a menu line. They are of the form:
|
||||
|
@ -837,12 +829,8 @@ session.screen0.defaultDeco: <string>
|
|||
the APPLICATIONS section. Default: NORMAL.
|
||||
|
||||
session.screen0.menuDelay: <integer>
|
||||
This sets the delay in milliseconds for submenus to open with the previous
|
||||
option set to `Delay'. Default: 0
|
||||
|
||||
session.screen0.menuDelayClose: 0
|
||||
This value sets the delay in milliseconds that you would like the menu to
|
||||
remain visible after you've clicked out of it. Default: 0
|
||||
This sets the delay in milliseconds for submenus to open when you hover
|
||||
over them or to close when you hover over another item. Default: 200
|
||||
|
||||
session.screen0.focusNewWindows: <boolean>
|
||||
This sets whether or not new windows will become focused automatically.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
.\" Title: fluxbox
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
|
||||
.\" Date: 10/04/2008
|
||||
.\" Date: 10/12/2008
|
||||
.\" Manual: [FIXME: manual]
|
||||
.\" Source: [FIXME: source]
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "FLUXBOX" "1" "10/04/2008" "[FIXME: source]" "[FIXME: manual]"
|
||||
.TH "FLUXBOX" "1" "10/12/2008" "[FIXME: source]" "[FIXME: manual]"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * (re)Define some macros
|
||||
.\" -----------------------------------------------------------------
|
||||
|
@ -845,26 +845,6 @@ Button 3 (Un)Maximize window horizontally\&.
|
|||
.SS "Workspace Menu"
|
||||
.sp
|
||||
The workspace menu can be found by middle clicking on the background\&. A menu will popup giving you the option to add or remove a workspace\&. You will also see your workspaces listed there; middle clicking on a workspace name will take you to that workspace, whereas clicking on a window name in one of the per\-workspace submenus will take you to the workspace that window is on, and select the window\&. Last but not least you will notice the Icons menu\&. This is for applications which have been `iconified\'\&.
|
||||
.SS "Menu Behavior"
|
||||
.sp
|
||||
The behavior of the submenus in a menu can be configured in the `init\' file, with the following entries (default for both is 0):
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.fam C
|
||||
.ps -1
|
||||
.nf
|
||||
.BB lightgray
|
||||
session\&.screen0\&.menuDelay: <msec>
|
||||
session\&.screen0\&.menuDelayClose: <msec>
|
||||
.EB lightgray
|
||||
.fi
|
||||
.fam
|
||||
.ps +1
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SS "Menu Syntax"
|
||||
.sp
|
||||
There are up to four fields in a menu line\&. They are of the form:
|
||||
|
@ -1789,12 +1769,8 @@ session\&.screen0\&.defaultDeco: <string>
|
|||
the APPLICATIONS section\&. Default: NORMAL\&.
|
||||
|
||||
session\&.screen0\&.menuDelay: <integer>
|
||||
This sets the delay in milliseconds for submenus to open with the previous
|
||||
option set to `Delay\'\&. Default: 0
|
||||
|
||||
session\&.screen0\&.menuDelayClose: 0
|
||||
This value sets the delay in milliseconds that you would like the menu to
|
||||
remain visible after you\'ve clicked out of it\&. Default: 0
|
||||
This sets the delay in milliseconds for submenus to open when you hover
|
||||
over them or to close when you hover over another item\&. Default: 200
|
||||
|
||||
session\&.screen0\&.focusNewWindows: <boolean>
|
||||
This sets whether or not new windows will become focused automatically\&.
|
||||
|
|
|
@ -998,7 +998,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
|
|||
// start submenu open delay
|
||||
timeval timeout;
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = theme()->delayOpen() * 1000; // transformed to usec
|
||||
timeout.tv_usec = theme()->getDelay() * 1000; // transformed to usec
|
||||
m_submenu_timer.setTimeout(timeout);
|
||||
m_submenu_timer.start();
|
||||
} else if (isItemSelectable(w)){
|
||||
|
@ -1191,7 +1191,7 @@ void Menu::closeMenu() {
|
|||
void Menu::startHide() {
|
||||
timeval timeout;
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = theme()->delayClose() * 1000; // transformed to usec
|
||||
timeout.tv_usec = theme()->getDelay() * 1000; // transformed to usec
|
||||
m_hide_timer.setTimeout(timeout);
|
||||
m_hide_timer.start();
|
||||
}
|
||||
|
|
|
@ -72,8 +72,7 @@ MenuTheme::MenuTheme(int screen_num):
|
|||
d_text_gc(RootWindow(m_display, screen_num)),
|
||||
hilite_gc(RootWindow(m_display, screen_num)),
|
||||
m_alpha(255),
|
||||
m_delayopen(0), // no delay as default
|
||||
m_delayclose(0), // no delay as default
|
||||
m_delay(0), // no delay as default
|
||||
m_real_title_height(*m_title_height),
|
||||
m_real_item_height(*m_item_height)
|
||||
{
|
||||
|
|
|
@ -111,10 +111,8 @@ 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 setDelayOpen(int msec) { m_delayopen = msec; }
|
||||
void setDelayClose(int msec) { m_delayclose = msec; }
|
||||
int delayOpen() const { return m_delayopen; }
|
||||
int delayClose() const { return m_delayclose; }
|
||||
void setDelay(int msec) { m_delay = msec; }
|
||||
int getDelay() const { return m_delay; }
|
||||
|
||||
const Color &borderColor() const { return *m_border_color; }
|
||||
Shape::ShapePlace shapePlaces() const { return *m_shapeplace; }
|
||||
|
@ -157,8 +155,7 @@ private:
|
|||
GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc;
|
||||
|
||||
unsigned char m_alpha;
|
||||
unsigned int m_delayopen; ///< in msec
|
||||
unsigned int m_delayclose; ///< in msec
|
||||
unsigned int m_delay; ///< in msec
|
||||
unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight)
|
||||
unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight)
|
||||
};
|
||||
|
|
|
@ -305,7 +305,6 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
|
|||
unfocused_alpha(rm, 255, scrname+".window.unfocus.alpha", altscrname+".Window.Unfocus.Alpha"),
|
||||
menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"),
|
||||
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"),
|
||||
allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"),
|
||||
|
@ -455,13 +454,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
|||
if (*resource.menu_delay < 0)
|
||||
*resource.menu_delay = 0;
|
||||
|
||||
if (*resource.menu_delay_close > 5000)
|
||||
*resource.menu_delay_close = 5000;
|
||||
if (*resource.menu_delay_close < 0)
|
||||
*resource.menu_delay_close = 0;
|
||||
|
||||
m_menutheme->setDelayOpen(*resource.menu_delay);
|
||||
m_menutheme->setDelayClose(*resource.menu_delay_close);
|
||||
m_menutheme->setDelay(*resource.menu_delay);
|
||||
|
||||
focusedWinFrameTheme()->reconfigSig().attach(this);// for geom window
|
||||
|
||||
|
@ -915,13 +908,7 @@ void BScreen::reconfigure() {
|
|||
if (*resource.menu_delay < 0)
|
||||
*resource.menu_delay = 0;
|
||||
|
||||
if (*resource.menu_delay_close > 5000)
|
||||
*resource.menu_delay_close = 5000;
|
||||
if (*resource.menu_delay_close < 0)
|
||||
*resource.menu_delay_close = 0;
|
||||
|
||||
m_menutheme->setDelayOpen(*resource.menu_delay);
|
||||
m_menutheme->setDelayClose(*resource.menu_delay_close);
|
||||
m_menutheme->setDelay(*resource.menu_delay);
|
||||
|
||||
// realize the number of workspaces from the init-file
|
||||
const unsigned int nr_ws = *resource.workspaces;
|
||||
|
|
|
@ -545,7 +545,7 @@ private:
|
|||
FbTk::Resource<std::string> windowmenufile;
|
||||
FbTk::Resource<unsigned int> typing_delay;
|
||||
FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,
|
||||
unfocused_alpha, menu_alpha, menu_delay, menu_delay_close,
|
||||
unfocused_alpha, menu_alpha, menu_delay,
|
||||
tab_width, tooltip_delay;
|
||||
FbTk::Resource<bool> allow_remote_actions;
|
||||
FbTk::Resource<bool> clientmenu_use_pixmap;
|
||||
|
|
Loading…
Reference in a new issue