diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/asciidoc/fluxbox.1 | 6 | ||||
-rw-r--r-- | doc/asciidoc/fluxbox.txt | 6 | ||||
-rw-r--r-- | doc/fluxbox.1.in | 6 | ||||
-rw-r--r-- | src/FbTk/Menu.cc | 2 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.cc | 1 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.hh | 8 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Screen.cc | 3 | ||||
-rw-r--r-- | src/Screen.hh | 1 | ||||
-rw-r--r-- | src/ScreenResources.cc | 55 |
11 files changed, 4 insertions, 88 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.1.2 | 2 | Changes for 1.1.2 |
3 | *08/10/05: | 3 | *08/10/05: |
4 | * Remove menu modes (Mark) | ||
5 | Screen.cc/hh ScreenResources.cc FbTk/MenuTheme.cc/hh FbTk/Menu.cc | ||
4 | * Remove follow models (Mark) | 6 | * Remove follow models (Mark) |
5 | Screen.cc/hh ScreenResources.cc Window.cc | 7 | Screen.cc/hh ScreenResources.cc Window.cc |
6 | * Remove line style resources from init file (Mark) | 8 | * 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: <string> | |||
1788 | options available to the `[Deco]\' option in the `apps\' file, described in | 1788 | options available to the `[Deco]\' option in the `apps\' file, described in |
1789 | the APPLICATIONS section\&. Default: NORMAL\&. | 1789 | the APPLICATIONS section\&. Default: NORMAL\&. |
1790 | 1790 | ||
1791 | session\&.screen0\&.menuMode: Delay|Click | ||
1792 | This setting controls the circumstances under which submenus open\&. With | ||
1793 | `Click\', the user must click on the menu item in order for the submenu to | ||
1794 | open\&. With `Delay\', submenus open when the mouse hovers over the menu | ||
1795 | item\&. Default: Delay | ||
1796 | |||
1797 | session\&.screen0\&.menuDelay: <integer> | 1791 | session\&.screen0\&.menuDelay: <integer> |
1798 | This sets the delay in milliseconds for submenus to open with the previous | 1792 | This sets the delay in milliseconds for submenus to open with the previous |
1799 | option set to `Delay\'\&. Default: 0 | 1793 | 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: <string> | |||
836 | options available to the `[Deco]' option in the `apps' file, described in | 836 | options available to the `[Deco]' option in the `apps' file, described in |
837 | the APPLICATIONS section. Default: NORMAL. | 837 | the APPLICATIONS section. Default: NORMAL. |
838 | 838 | ||
839 | session.screen0.menuMode: Delay|Click | ||
840 | This setting controls the circumstances under which submenus open. With | ||
841 | `Click', the user must click on the menu item in order for the submenu to | ||
842 | open. With `Delay', submenus open when the mouse hovers over the menu | ||
843 | item. Default: Delay | ||
844 | |||
845 | session.screen0.menuDelay: <integer> | 839 | session.screen0.menuDelay: <integer> |
846 | This sets the delay in milliseconds for submenus to open with the previous | 840 | This sets the delay in milliseconds for submenus to open with the previous |
847 | option set to `Delay'. Default: 0 | 841 | 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: <string> | |||
1788 | options available to the `[Deco]\' option in the `apps\' file, described in | 1788 | options available to the `[Deco]\' option in the `apps\' file, described in |
1789 | the APPLICATIONS section\&. Default: NORMAL\&. | 1789 | the APPLICATIONS section\&. Default: NORMAL\&. |
1790 | 1790 | ||
1791 | session\&.screen0\&.menuMode: Delay|Click | ||
1792 | This setting controls the circumstances under which submenus open\&. With | ||
1793 | `Click\', the user must click on the menu item in order for the submenu to | ||
1794 | open\&. With `Delay\', submenus open when the mouse hovers over the menu | ||
1795 | item\&. Default: Delay | ||
1796 | |||
1797 | session\&.screen0\&.menuDelay: <integer> | 1791 | session\&.screen0\&.menuDelay: <integer> |
1798 | This sets the delay in milliseconds for submenus to open with the previous | 1792 | This sets the delay in milliseconds for submenus to open with the previous |
1799 | option set to `Delay\'\&. Default: 0 | 1793 | 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) { | |||
994 | 994 | ||
995 | } | 995 | } |
996 | 996 | ||
997 | if (itmp->submenu() && theme()->menuMode() == MenuTheme::DELAY_OPEN) { | 997 | if (itmp->submenu()) { |
998 | // start submenu open delay | 998 | // start submenu open delay |
999 | timeval timeout; | 999 | timeval timeout; |
1000 | timeout.tv_sec = 0; | 1000 | 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): | |||
72 | d_text_gc(RootWindow(m_display, screen_num)), | 72 | d_text_gc(RootWindow(m_display, screen_num)), |
73 | hilite_gc(RootWindow(m_display, screen_num)), | 73 | hilite_gc(RootWindow(m_display, screen_num)), |
74 | m_alpha(255), | 74 | m_alpha(255), |
75 | m_menumode(DELAY_OPEN), | ||
76 | m_delayopen(0), // no delay as default | 75 | m_delayopen(0), // no delay as default |
77 | m_delayclose(0), // no delay as default | 76 | m_delayclose(0), // no delay as default |
78 | m_real_title_height(*m_title_height), | 77 | 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 { | |||
34 | 34 | ||
35 | class MenuTheme: public Theme, public ThemeProxy<MenuTheme> { | 35 | class MenuTheme: public Theme, public ThemeProxy<MenuTheme> { |
36 | public: | 36 | public: |
37 | //!! TODO | ||
38 | // this isn't actually used with a theme item | ||
39 | // see setMenuMode() for more info | ||
40 | enum MenuMode {CLICK_OPEN, DELAY_OPEN}; | ||
41 | |||
42 | enum BulletType { EMPTY, SQUARE, TRIANGLE, DIAMOND}; | 37 | enum BulletType { EMPTY, SQUARE, TRIANGLE, DIAMOND}; |
43 | MenuTheme(int screen_num); | 38 | MenuTheme(int screen_num); |
44 | virtual ~MenuTheme(); | 39 | virtual ~MenuTheme(); |
@@ -116,8 +111,6 @@ public: | |||
116 | // this isn't actually a theme item | 111 | // this isn't actually a theme item |
117 | // but we'll let it be here for now, until there's a better way to | 112 | // but we'll let it be here for now, until there's a better way to |
118 | // get resources into menu | 113 | // get resources into menu |
119 | void setMenuMode(MenuMode mode) { m_menumode = mode; } | ||
120 | MenuMode menuMode() const { return m_menumode; } | ||
121 | void setDelayOpen(int msec) { m_delayopen = msec; } | 114 | void setDelayOpen(int msec) { m_delayopen = msec; } |
122 | void setDelayClose(int msec) { m_delayclose = msec; } | 115 | void setDelayClose(int msec) { m_delayclose = msec; } |
123 | int delayOpen() const { return m_delayopen; } | 116 | int delayOpen() const { return m_delayopen; } |
@@ -164,7 +157,6 @@ private: | |||
164 | GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; | 157 | GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; |
165 | 158 | ||
166 | unsigned char m_alpha; | 159 | unsigned char m_alpha; |
167 | MenuMode m_menumode; | ||
168 | unsigned int m_delayopen; ///< in msec | 160 | unsigned int m_delayopen; ///< in msec |
169 | unsigned int m_delayclose; ///< in msec | 161 | unsigned int m_delayclose; ///< in msec |
170 | unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight) | 162 | 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 \ | |||
109 | FbRootWindow.hh FbRootWindow.cc \ | 109 | FbRootWindow.hh FbRootWindow.cc \ |
110 | OSDWindow.hh OSDWindow.cc \ | 110 | OSDWindow.hh OSDWindow.cc \ |
111 | TooltipWindow.hh TooltipWindow.cc \ | 111 | TooltipWindow.hh TooltipWindow.cc \ |
112 | Screen.cc Screen.hh ScreenResources.cc \ | 112 | Screen.cc Screen.hh \ |
113 | Slit.cc Slit.hh SlitTheme.hh SlitTheme.cc SlitClient.hh SlitClient.cc \ | 113 | Slit.cc Slit.hh SlitTheme.hh SlitTheme.cc SlitClient.hh SlitClient.cc \ |
114 | WinButton.hh WinButton.cc \ | 114 | WinButton.hh WinButton.cc \ |
115 | WinButtonTheme.hh WinButtonTheme.cc \ | 115 | 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, | |||
308 | menu_delay_close(rm, 200, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"), | 308 | menu_delay_close(rm, 200, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"), |
309 | tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), | 309 | tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), |
310 | tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"), | 310 | tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"), |
311 | menu_mode(rm, FbTk::MenuTheme::DELAY_OPEN, scrname+".menuMode", altscrname+".MenuMode"), | ||
312 | allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"), | 311 | allow_remote_actions(rm, false, scrname+".allowRemoteActions", altscrname+".AllowRemoteActions"), |
313 | clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"), | 312 | clientmenu_use_pixmap(rm, true, scrname+".clientMenu.usePixmap", altscrname+".ClientMenu.UsePixmap"), |
314 | tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"), | 313 | tabs_use_pixmap(rm, true, scrname+".tabs.usePixmap", altscrname+".Tabs.UsePixmap"), |
@@ -450,7 +449,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
450 | focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); | 449 | focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); |
451 | unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); | 450 | unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); |
452 | m_menutheme->setAlpha(*resource.menu_alpha); | 451 | m_menutheme->setAlpha(*resource.menu_alpha); |
453 | m_menutheme->setMenuMode(*resource.menu_mode); | ||
454 | // clamp values | 452 | // clamp values |
455 | if (*resource.menu_delay > 5000) | 453 | if (*resource.menu_delay > 5000) |
456 | *resource.menu_delay = 5000; | 454 | *resource.menu_delay = 5000; |
@@ -910,7 +908,6 @@ void BScreen::reconfigure() { | |||
910 | focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); | 908 | focusedWinFrameTheme()->setAlpha(*resource.focused_alpha); |
911 | unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); | 909 | unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha); |
912 | m_menutheme->setAlpha(*resource.menu_alpha); | 910 | m_menutheme->setAlpha(*resource.menu_alpha); |
913 | m_menutheme->setMenuMode(*resource.menu_mode); | ||
914 | 911 | ||
915 | // clamp values | 912 | // clamp values |
916 | if (*resource.menu_delay > 5000) | 913 | 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: | |||
547 | FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, | 547 | FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, |
548 | unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, | 548 | unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, |
549 | tab_width, tooltip_delay; | 549 | tab_width, tooltip_delay; |
550 | FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode; | ||
551 | FbTk::Resource<bool> allow_remote_actions; | 550 | FbTk::Resource<bool> allow_remote_actions; |
552 | FbTk::Resource<bool> clientmenu_use_pixmap; | 551 | FbTk::Resource<bool> clientmenu_use_pixmap; |
553 | FbTk::Resource<bool> tabs_use_pixmap; | 552 | FbTk::Resource<bool> 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 @@ | |||
1 | // ScreenResources.cc for Fluxbox Window Manager | ||
2 | // Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) | ||
3 | // | ||
4 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | // copy of this software and associated documentation files (the "Software"), | ||
6 | // to deal in the Software without restriction, including without limitation | ||
7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | // and/or sell copies of the Software, and to permit persons to whom the | ||
9 | // Software is furnished to do so, subject to the following conditions: | ||
10 | // | ||
11 | // The above copyright notice and this permission notice shall be included in | ||
12 | // all copies or substantial portions of the Software. | ||
13 | // | ||
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | // DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | // holds screen resource handling | ||
23 | |||
24 | #include "Screen.hh" | ||
25 | #ifdef HAVE_CSTRING | ||
26 | #include <cstring> | ||
27 | #else | ||
28 | #include <string.h> | ||
29 | #endif | ||
30 | |||
31 | using std::string; | ||
32 | |||
33 | namespace FbTk { | ||
34 | |||
35 | template <> | ||
36 | string FbTk::Resource<FbTk::MenuTheme::MenuMode>::getString() const { | ||
37 | switch (*(*this)) { | ||
38 | case FbTk::MenuTheme::DELAY_OPEN: | ||
39 | return string("Delay"); | ||
40 | case FbTk::MenuTheme::CLICK_OPEN: | ||
41 | return string("Click"); | ||
42 | } | ||
43 | return string("Delay"); | ||
44 | } | ||
45 | |||
46 | template <> | ||
47 | void FbTk::Resource<FbTk::MenuTheme::MenuMode>::setFromString(const char *str) { | ||
48 | if (strcasecmp(str, "Delay") == 0) | ||
49 | *(*this) = FbTk::MenuTheme::DELAY_OPEN; | ||
50 | else if (strcasecmp(str, "Click") == 0) | ||
51 | *(*this) = FbTk::MenuTheme::CLICK_OPEN; | ||
52 | else | ||
53 | setDefaultValue(); | ||
54 | } | ||
55 | } // end namespace FbTk | ||